note 30664 added to function.file
| From: | webmaster at rack1 dot php dot net | Date: | Tue, 25 Mar 2003 10:35:00 +0000 |
| Subject: | note 30664 added to function.file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-45787@lists.php.net to get a copy of this message | ||
If you want to send a URL via GET to a script and want to open this URL via file() there are
problems if there is a & sign in the URL, all after die & sign is cut.
TO fix this an get it working with the & sign in the URL
@$myopenedcontent= implode("", file ("$url"));
$myopenedcontent=eregi_replace('&','{KU}',$myopenedcontent);
so all & signs are replaced by {KU}
before use the file() function you have to rereplace it, the whole code:
$url=eregi_replace('{KU}','&,$url);
@$myopenedcontent= implode("", file ("$url"));
$myopenedcontent=eregi_replace('&','{KU}',$myopenedcontent);
echo "$myopenedcontent";
hope it is helpful ;)
Bye
Afterburner
--
http://www.php.net/manual/en/function.file.php
http://master.php.net/manage/user-notes.php?action=edit+30664
http://master.php.net/manage/user-notes.php?action=delete+30664
http://master.php.net/manage/user-notes.php?action=reject+30664