July 25, 201115 yr Hey, Pretty simple problem, but not sure what it is. I am pulling a number from a database, and then using a while loop to go through each row 1 by 1. Basically these numbers can be used with the Steam xml, and I want to grab the customURL for the steamID64. Heres an example: $number = 76561197970745785 Thats an example number I grab (so 1 row). Then, I use: $xml = simplexml_load_file("http://steamcommunity.com/profiles/$number/?xml=1") So it goes to this link: http://steamcommunity.com/profiles/76561197970745785/?xml=1 On there I want to get the customURL, pretty simple: $customURL = $xml->customURL; echo $customURL . "<br />"; So thats basically going around in a while loop with the mysql_fetch_assoc function. However... There is about 30-40 numbers that I am querying, and it takes like 60 seconds for the page to load. It all works when it does, but thats taking way too long. I did a timer on each loop and its like 2 seconds per user to get the customURL. Can anyone tell me if there is a way to make this code more efficiant or something? Or any alternatives to grabbing the data like that and using it. Thanks
July 26, 201115 yr Author Well I think, in my head, to solve this I would have to load the data and store it in my own xml file and use that data. if it wants to be refreshed i would have to click a button that runs a page again and overwrites that file. Not sure though :/
Create an account or sign in to comment