Archives for posts with tag: php

Creating a REST service with PHP:

http://www.gen-x-design.com/archives/create-a-rest-api-with-php/

Archiviato in: , , ,

Super simple way to work with Twitter API (PHP + CSS)

http://woork.blogspot.com/2009/06/super-simple-way-to-work-with-twitter.html

Archiviato in: , , ,

Una funzione php comoda per scoprire se un URL esiste (che poi in realtà con php 5 dovrebbe essere sufficiente la cara e vecchia file_exists()):

function url_exists($url) {
    if(!strstr($url, "http://")) {
		$url = "http://".$url;
	}
    $resURL = curl_init();
    curl_setopt($resURL, CURLOPT_URL, $url);
    curl_setopt($resURL, CURLOPT_BINARYTRANSFER, 1);
    curl_setopt($resURL, CURLOPT_HEADERFUNCTION, 'curlHeaderCallback');
    curl_setopt($resURL, CURLOPT_FAILONERROR, 1);
    curl_exec ($resURL);
    $intReturnCode = curl_getinfo($resURL, CURLINFO_HTTP_CODE);
    curl_close ($resURL);
    if ($intReturnCode != 200 && $intReturnCode != 302 && $intReturnCode != 304) {
       return false;
    } else {
		return true ;
    }
} 

Archiviato in: , , ,

Utili cheatsheets per chi sviluppa web:

http://webdesignledger.com/resources/18-seriously-helpful-cheat-sheets-for-easier-coding

Archiviato in: , , , , , , , , , , , , , , , ,

Classe php per filtrare gli input degli utenti. Elimina i rischi si SQL Injection, XSS e palle varie.

http://www.phpclasses.org/browse/package/2189.html

Prende in input i singoli valori o interi array (ad esempio $_POST, $_GET, ecc. ecc. ecc.).

Archiviato in: , , , ,

Search engine optimization by SEO Design Solutions