ikmyer Posted May 21, 2007 Share Posted May 21, 2007 Would anyone be willing to tell me or show me a site that explains how to do something like the following... http://h2.halowiki.net/p/Special:Gamesaver For an example, put in Game ID: 697764150 How can I get the information they collect from http://www.bungie.net/Stats/GameStatsHalo2.aspx?gameid=697764150 Quote Link to comment https://forums.phpfreaks.com/topic/52362-solved-how-does-this-work/ Share on other sites More sharing options...
chigley Posted May 21, 2007 Share Posted May 21, 2007 <?php $id = $_GET['id']; $content = file_get_contents("http://www.bungie.net/Stats/GameStatsHalo2.aspx?gameid=$id"); echo $content; ?> You then need to go on to fish out the data you want from that Quote Link to comment https://forums.phpfreaks.com/topic/52362-solved-how-does-this-work/#findComment-258397 Share on other sites More sharing options...
trq Posted May 21, 2007 Share Posted May 21, 2007 Sorry... what exactly are you wanting to do? Build a page like the first, or scrape the infomation from the second? Quote Link to comment https://forums.phpfreaks.com/topic/52362-solved-how-does-this-work/#findComment-258399 Share on other sites More sharing options...
ikmyer Posted May 21, 2007 Author Share Posted May 21, 2007 Thanks chigley, that is interesting. thorpe, I want to do Both, being that they are one in the same. I want to build a page like http://h2.halowiki.net/p/Special:Gamesaver though I want to do different stuff with the data like store in a database. That part I will have no trouble with. The problem I have right now is "getting" the information or as you say "scrape the information from the second?" Quote Link to comment https://forums.phpfreaks.com/topic/52362-solved-how-does-this-work/#findComment-258411 Share on other sites More sharing options...
chigley Posted May 21, 2007 Share Posted May 21, 2007 What you need to do is parse the HTML code received in the $content variable from the source I posted above. You can then "fish out" the bits that you want and do whatever you like with them Quote Link to comment https://forums.phpfreaks.com/topic/52362-solved-how-does-this-work/#findComment-258416 Share on other sites More sharing options...
ikmyer Posted May 21, 2007 Author Share Posted May 21, 2007 yeah, i was afraid of that :-\ Thank you for getting me on the right track!! Quote Link to comment https://forums.phpfreaks.com/topic/52362-solved-how-does-this-work/#findComment-258435 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.