Thursday, August 4, 2011

#Note PHP get contents of a remotely hosted file without cross-domain ajax

$file = file_get_contents('http://qa.agrinova.intuit.com/webmetrics/farmerCount.groovy');
echo $file;

Output :

<?xml version="1.0"?>
<webmetrics xmlns='http://agrinova.intuit.com'>
  <farmer_count>290158</farmer_count>
  <statewise_count state='GJ' count='135070' />
  <statewise_count state='AP' count='155088' />
</webmetrics>

 


Powered By Blogger
Custom Search