Need help with file request from url

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
xexe
Forum Newbie
Posts: 2
Joined: Thu Feb 20, 2003 3:15 am
Contact:

Need help with file request from url

Post by xexe »

this is url http://demonscity.combats.ru/inf.pl?log ... rz&short=1
if u put this url in ie status bar u ll get text line back
so I wrote script:
<?PHP
$path="http://demonscity.combats.ru/inf.pl?log ... rz&short=1";
$file=file($path);
$count=count($file);
for ($i=0;$i<$count;$i++) {
$Row=$i+1;
$R.="line ".$Row.">".$file[$i]."<br>\n";
}
echo "read from url:".$path."<br>\n";
echo "lines in file : ".$count."<br>\n";
echo "file:<br>\n".$R."\n";
?>
it works correctly as i need on
http://www.vremiatour.ru/test/test3.php

and same script on http://www.blackfraers.com/test3.php
give me back something ugly
what shall I do?
xexe
Forum Newbie
Posts: 2
Joined: Thu Feb 20, 2003 3:15 am
Contact:

Post by xexe »

or tell me pls what shall I do to get this text line from browser into php var?
Post Reply