read file local not remote
| From: | Joker7 | Date: | Sun, 25 Feb 2007 22:51:16 +0000 |
| Subject: | read file local not remote | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-249413@lists.php.net to get a copy of this message | ||
$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 above code to read a file on remote server but now I need to read
it on local server,question is how.
Cheers
Chris