Laman

Senin, 12 Desember 2011

Get HTML Code alternative curl and file get contents

Description :
Get HTML code or similiar with cURL or file_get_contents



Function :
    function getHtmlCode($url){
        $returnStr="";
        $fp=fopen($url, "r");
        while (!feof($fp)) {
            $returnStr.=fgetc($fp);
        }
        fclose($fp);
        return $returnStr;
    }

Tidak ada komentar:

Posting Komentar