It does not work with the = right in the URL.. PHP gives me a warning 
about the fopen statement or file statement if I do.. and then returns 
nothing.

If I escape it, it loads the proper URL, but then the page it opens 
does not recognize the defined variables because it loads 
http://www.something.com/file.php?thing\=thething instead of 
http://www.something.com/file.php?thing=thething...

> why dont you try:
> fopen("http://www.something.com/file.php?thing=thething","r";);
> 
> ...and are you sure it's "not working", or just
> not returning anything???
> 
> try putting checks on *all* IO/net functions:
> 
> $fp = fopen( ... ) 
>       or die("Cannot open file!");
> 
> 
> 
> 
> > -----Original Message-----
> > From: Corey Chapman [mailto:[EMAIL PROTECTED]]On Behalf Of Corey
> > Chapman
> > Sent: Friday, August 03, 2001 2:46 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: php-list-
[EMAIL PROTECTED]
> > 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: php-list-
[EMAIL PROTECTED]
> 
> 
> 

Corey Chapman
Xnull CEO
(Chat with us: http://forum.xnull.com)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to