NYCPHP Meetup

NYPHP.org

[nycphp-talk] Mantis/Subversion integration

Greg Rundlett greg.rundlett at gmail.com
Thu Sep 15 15:51:10 EDT 2005


quick and easy

 *function* openUrl($url) {
       *// Fake the browser type*
       *// ini_set('user_agent','MSIE 4\.0b2;');*
    $handle = fopen($url, "rb");
    $contents = '';
    if($handle) {
        while (!feof($handle)) {
            $contents .= fread($handle, 8192);
        }
        fclose($handle);       
    }
    else {
        $contents = 'Error opening $url' . $url;
    }
    return $contents;
} 



print $contents = openUrl('http://www.google.com');
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20050915/5f53eb10/attachment.html>


More information about the talk mailing list