title: Why SimpleXML_load_file Returning Blank Output?
body: <p>Not wasting a second, check out this code:</p>
  
  <pre><code>$gp=$_GET["gp"];
  
  function googleplus($gp) {
  $furl = "http://query.yahooapis.com/v1/public/yql?q=SELECT * from html where url='https://plus.google.com/%252B".$gp."' AND xpath=\"//div[@class='Nn']//div[@class='rw Uc']//div[@class='Zi']//div[@class='V9b nhe']//div[@class='tQE8Kd BnqoOb']//div[@class='Qhb eZa']//div[@class='vkb']//p\"&amp;format=xml";
  $api = simplexml_load_file($furl);
  $followers = $api-&gt;results-&gt;p;
  return $followers;
  }
  </code></pre>
  
  <p>Okay. When I do </p>
  
  <pre><code>&lt;?php echo googleplus($gp); ?&gt; 
  </code></pre>
  
  <p>with parameter gp=mehulmohan in the URL, it should return something like this:</p>
  
  <p>539 have him in circles</p>
  
  <p>Check this URL associated with mehulmohan</p>
  
  <p><a href="http://query.yahooapis.com/v1/public/yql?q=SELECT%20%2a%20from%20html%20where%20url=%27https://plus.google.com/%252Bmehulmohan%27AND%20xpath=%22//div%5B@class=%27Nn%27%5D//div%5B@class=%27rw%20Uc%27%5D//div%5B@class=%27Zi%27%5D//div%5B@class=%27V9b%20nhe%27%5D//div%5B@class=%27tQE8Kd%20BnqoOb%27%5D//div%5B@class=%27Qhb%20eZa%27%5D//div%5B@class=%27vkb%27%5D//p%22&amp;format=xml" rel="nofollow">http://query.yahooapis.com/v1/public/yql?q=SELECT%20*%20from%20html%20where%20url=%27https://plus.google.com/%252Bmehulmohan%27AND%20xpath=%22//div[@class=%27Nn%27]//div[@class=%27rw%20Uc%27]//div[@class=%27Zi%27]//div[@class=%27V9b%20nhe%27]//div[@class=%27tQE8Kd%20BnqoOb%27]//div[@class=%27Qhb%20eZa%27]//div[@class=%27vkb%27]//p%22&amp;format=xml</a></p>
  
  <p>But actually, it returns blank. Why?</p>
  
  <p>Please help. All other social media like pinterest and twitter are returning correct results but Google+ returns blank.</p>
  
  <p>Point to note: I've parsed the "+" symbol 2 times in the URL as in 1 time, it is not accepting the XML but second time it takes.</p>
  
  <p>"+" = %2B = %252B</p>