TDotBoy2011 Posted May 23, 2011 Share Posted May 23, 2011 Hi all, I'm php stupid but from what I read its what I need. I am looking to grab just the number this page outputs http://api.radioreference.com/audio/listeners.php?feedId=2798 and put it on a page for some tracking software. When you view the source page of the page it needs to show the number and not the coding for it so Javascripting is out of the question. Can anyone help me? Link to comment https://forums.phpfreaks.com/topic/237176-how-to-scrape/ Share on other sites More sharing options...
TDotBoy2011 Posted May 23, 2011 Author Share Posted May 23, 2011 I got this. <?php $curl_handle=curl_init(); curl_setopt($curl_handle,CURLOPT_URL,'http://api.radioreference.com/audio/listeners.php?feedId=2798'); curl_exec($curl_handle); curl_close($curl_handle); ?> It outputs the page but I cannot figure out how to only get the numbers. Link to comment https://forums.phpfreaks.com/topic/237176-how-to-scrape/#findComment-1219088 Share on other sites More sharing options...
Pikachu2000 Posted May 23, 2011 Share Posted May 23, 2011 What number are you talking about? Link to comment https://forums.phpfreaks.com/topic/237176-how-to-scrape/#findComment-1219090 Share on other sites More sharing options...
TDotBoy2011 Posted May 23, 2011 Author Share Posted May 23, 2011 What number are you talking about? Looks like that feed went down. This one works. <?php $curl_handle=curl_init(); curl_setopt($curl_handle,CURLOPT_URL,'http://api.radioreference.com/audio/listeners.php?feedId=763'); curl_exec($curl_handle); curl_close($curl_handle); ?> Link to comment https://forums.phpfreaks.com/topic/237176-how-to-scrape/#findComment-1219092 Share on other sites More sharing options...
Pikachu2000 Posted May 23, 2011 Share Posted May 23, 2011 That appears to be down also. Link to comment https://forums.phpfreaks.com/topic/237176-how-to-scrape/#findComment-1219093 Share on other sites More sharing options...
TDotBoy2011 Posted May 23, 2011 Author Share Posted May 23, 2011 That appears to be down also. if I put in http://api.radioreference.com/audio/listeners.php?feedId=763 it shows 222 at the moment I am typing this. document.write('222'); the 222 is the number I am trying to grab. Link to comment https://forums.phpfreaks.com/topic/237176-how-to-scrape/#findComment-1219094 Share on other sites More sharing options...
TDotBoy2011 Posted May 23, 2011 Author Share Posted May 23, 2011 That appears to be down also. The org. one is back not that it matters. <?php $curl_handle=curl_init(); curl_setopt($curl_handle,CURLOPT_URL,'http://api.radioreference.com/audio/listeners.php?feedId=2798'); curl_exec($curl_handle); curl_close($curl_handle); ?> Link to comment https://forums.phpfreaks.com/topic/237176-how-to-scrape/#findComment-1219159 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.