title: What is the difference between these two simplexml_load_file submissions PHP?
body: <p>One is working (the string url), and the other is giving me a invalid signature failure in Oauth.</p>
  
  <pre><code>$whaturl=$endpoint.'?'.$link_string.'&amp;oauth_signature='.$signature;
  $newVenueXML = simplexml_load_file($whaturl) or die ("Error: Cannot create object");
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$newVenueXML = simplexml_load_file('http://api.eventful.com/rest/venues/new?address=1101%20Grand%20Ave&amp;app_key=my_app_key&amp;city=Grand%20Lake&amp;country=United%20States&amp;name=Sagebrush%20Barbecue%20and%20Grill&amp;oauth_consumer_key=my_consumer_key&amp;oauth_nonce=718522065&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_timestamp=1474394973&amp;oauth_token=my_token&amp;oauth_version=1.0&amp;postal_code=80447&amp;region=Colorado&amp;oauth_signature=nfOiJ1R7X%2Bw4d9I%2FY4duZ62TeFw%3D') or die ("Error: Cannot create object");
  </code></pre>
  
  <p>Where the components are all the same (i.e. the string is identical as far as I can tell using <a href="https://text-compare.com/" rel="nofollow">https://text-compare.com/</a>). I must be missing something, because using the variable isn't working and the pure string is.</p>
  
  <p>When I paste the $whaturl in the browser, I get the correct response.</p>
  
  <p>Now, when I copy and paste the address bar from a correct submission, and then compare the two strings ($whaturl and the URL from the copy/paste of the address bar, $whaturl2), I see a difference when I echo the two variables where the &amp;region= gets turned into &reg;ion= Is it possible that this same translation is taking place within the simplexml_load_file and therefore invalidating my $signature?</p>
  
  <p>If so, any suggestions on how to handle this as I have escaped the &amp;?</p>