Re: [PHP] read file local not remote

2007-02-26 Thread Joker7
In news: [EMAIL PROTECTED], "Martin Zvarík" said: >> Difference: You don't call file as http://www.myweb.com/ but instead >> you use the path like c:\some.txt or ../some.txt etc. >> >> PHP 5 >> = >> echo file_get_contents("some.txt"); Works a treat Cheers Chris -- Cheap As Chips Bro

Re: [PHP] read file local not remote

2007-02-25 Thread Martin Zvarík
Difference: You don't call file as http://www.myweb.com/ but instead you use the path like c:\some.txt or ../some.txt etc. PHP 5 = echo file_get_contents("some.txt"); PHP 4 = $fp = fopen("some.txt", "r"); echo fread($fp, filesize ("some.txt")); fclose($fp); Another solution

[PHP] read file local not remote

2007-02-25 Thread Joker7
$url =www.mysite.ru/some.txt; $fa = fopen($url,"r"); /* $fa = fsockopen("http://mysite.ru";, 80, &$num_error, &$str_error, 30); if(!$fa) { print "Weather is not available: $str_error ($num_error)\n"; } else { fputs($fa,"GET /some.txt HTTP/1.0\n\n"); $answer=fgets($fa,128); I use the abo