Re: Re: fopen a URL with = in it

From: Date: Sat, 04 Aug 2001 03:19:05 +0000
Subject: Re: Re: fopen a URL with = in it
Groups: php.general 
Request: Send a blank email to php-general+get-61217@lists.php.net to get a copy of this message
So you're saying that I should be able to pass the = sign in just fine into the fopen call with no errors? I understand what you mean that if = was what the variable was defined as, then THAT is where I'd use urlencode ;) I wasn't too sure about that, but now I am. Quite odd that it reports errors then when passing in an = sign. Perhaps PHP does not like to load url's like that.. > You would only want URLEncode if "thething" had the "=" in it as part of the > data... > > "http://whatever.com/foo.php?operand=" . > urlencode("=") > > might be a URL for math geeks to talk about the "=" sign :-) > > -- > WARNING richard@zend.com address is an endangered species -- Use > ceo@l-i-e.com > Wanna help me out? Like Music? Buy a CD: http://l-i- e.com/artists.htm > Volunteer a little time: http://chatmusic.com/volunteer.htm > ----- Original Message ----- > From: Corey Chapman <ze0@xnull.com> > Newsgroups: php.general > To: <php-general@lists.php.net> > Sent: Friday, August 03, 2001 1:45 PM > Subject: fopen a URL with = in it > > > > Something that's been driving me crazy for a few days. Could it > > be a bug in PHP? > > > > Using the fopen function (or even the file function), I want to open a > > web page for read. Sounds easy? Well, say I want to have an "=" sign in > > the URL.. well that is where the problem comes. I have tried things > > like this: > > > > $eq = urlencode("="); > > $URL = > > "http://www.something.com/file.php?thing".$eq."thething";; > > > > I have tried many other combinations as well.. the problem is this: > > when PHP calls fopen(), it does not allow the = sign in the variable > > passed in. So I figured I should escape it.. > > > > > > fopen("http://www.something.com/file.php?thing\=thething","r";); > > > > But that did not work either. It allows me to pass it in, but then it > > tries to open the literal \= in the url, which of course doesn't > > exist. The url has just an =. I thought encoding the whole or part URL > > would work. well it loads the page, but the page itself doesn't > > recognize the encoded = sign as being an = sign.. > > > > Bah! Anyone have any ideas.. ? > > > > > > Corey Chapman > > Xnull CEO > > (Chat with us: http://forum.xnull.com) > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list- admin@lists.php.net > > > Corey Chapman Xnull CEO (Chat with us: http://forum.xnull.com)

« previous php.general (#61217) next »