php file_get_content and &

Posted by Patrick on Stack Overflow See other posts from Stack Overflow or by Patrick
Published on 2010-04-17T02:09:54Z Indexed on 2010/04/17 2:13 UTC
Read the original article Hit count: 269

Filed under:

Hello all,

I'm trying to use php's file_get_content('a url');

The thing is if the url has '&' in it, for example

file_get_content('http://wwww.google.com/?var1=1&var2=2')

it automatically make a requests to wwww.google.com/?var1=1&var2=2

How do I prevent that from happening?

© Stack Overflow or respective owner

Related posts about php