Pass a full url with Params in PHP
<p>I want to pass a url as a parameter in my PHP script. The URL is coming from my Android app which passes a url and the PHP script custom formats XML to return to the app. So I would pass the url I wanted to format and the PHP script would do stuff and echo the results.</p>

<p>For instance I want to pass this url: </p>

<blockquote>
  <p>differentwebpage.com/search/?query=ford%20f150&amp;</p>
</blockquote>

<p>in my php script (mywebpage.com/script.php):</p>

<pre><code>$url = $_GET['url'];
$str = file_get_contents($url);
echo $str;
</code></pre>

<p>So the full url would be:</p>

<blockquote>
  <p>mywebpage.com/script.php?url=differentwebpage.com/search/?query=ford%20f150&amp;</p>
</blockquote>

<p>But this doesn't work. I think I need to URL encode/decode but I haven't had any success. How can I pass a full URL as a parameter?</p>
