I am trying to pass URL variables via file_get_contents("http://url.com/?var1=foo&var2=bar") ... but the variables aren't being passed. Please help!
| SitePoint Sponsor |
I am trying to pass URL variables via file_get_contents("http://url.com/?var1=foo&var2=bar") ... but the variables aren't being passed. Please help!
have you tried:
$va1 = $_GET['var1'];
$var2 = $_GET['var2'];
echo $var1. '<br />'. $var2;
Don't Panic
that doesn't solve my problem though.. i am trying to send variables via file_get_contents
What makes you think the variables aren't being passed? Give us a quick test script (for both sending and receiving) which displays this behaviour.





I have found that you have to do
http://url.com/index.php?var1=foo&var2=bar
insead of
http://url.com/?var1=foo&var2=bar
What I lack in acuracy I make up for in misteaks
Bookmarks