good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Passing params to a php file via perl cgi script.by dmmiller2k (Chaplain) |
on Jan 20, 2002 at 02:12 UTC ( [id://140139]=note: print w/replies, xml ) | Need Help?? |
I'll bet what's happening is that your cgi script is being called with the following parameters:
As a result, when you attempt to call your get() subroutine with the value of the 'url' parameter, you are only passing 'http://www.asite.com/result.php'. To avoid this, you should replace the non-alpha (e.g., ? and &) characters in your url to their encoded equivalents:
Which would mean calling your cgi script with the following as a 'url' parameter: http://www.mysite.com/cgi-bin/my_perl.cgi?url=http%3A%2F%2Fwww.asite.com%2Fresult.php%3Fmode%3Dn%26color%3Dblue%26age%3D18dmm If you GIVE a man a fish you feed him for a dayBut, TEACH him to fish and you feed him for a lifetime
In Section
Seekers of Perl Wisdom
|
|