Esq Posted December 11, 2011 Share Posted December 11, 2011 Hello guys, I have intermediate level PHP and I am currently working on a website. I need to write a function that will get me some specific information from a website. I need this function to go write the users name on the search bar over there: http://competitive.eune.leagueoflegends.com/ladders/eune/current/rankedsolo5x5 after it founds which page the user is on I want the information of that user registered on my database. But I am not sure where to start.. An example would be like http://competitive.eune.leagueoflegends.com/ladders/eune/current/rankedsolo5x5?summoner_name=&page=4 page 5: rank 121 Sokoren 42 22 1877 I already know the name, I just need the other numerical information and get them into my database. I only want this function to work when a certain nick name is entered. Any help would be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/252956-collecting-data-from-another-website/ Share on other sites More sharing options...
premiso Posted December 12, 2011 Share Posted December 12, 2011 I do not know many people who would be willing to help unless you have consent of the owner of leagueoflegends.com. Quote Link to comment https://forums.phpfreaks.com/topic/252956-collecting-data-from-another-website/#findComment-1296995 Share on other sites More sharing options...
Esq Posted December 12, 2011 Author Share Posted December 12, 2011 thats funny cause i wouldnt need help if i was the owner of league of legends (1.i would have the money to make someone do it, 2.it would already be in my database not that hard to pull from there ^^) anyways I also found this line in V. CODE OF CONDUCT: K. Accessing or attempting to access areas of the Game or Game servers that have not been made available to the public; this is the only restriction regarding data. so it is ok by the website that i take information that is available to public Quote Link to comment https://forums.phpfreaks.com/topic/252956-collecting-data-from-another-website/#findComment-1297079 Share on other sites More sharing options...
Winstons Posted December 12, 2011 Share Posted December 12, 2011 Do you want parse username from leagueoflegends.com ? Quote Link to comment https://forums.phpfreaks.com/topic/252956-collecting-data-from-another-website/#findComment-1297082 Share on other sites More sharing options...
Esq Posted December 12, 2011 Author Share Posted December 12, 2011 Do you want parse username from leagueoflegends.com ? For the function I am creating, the users will manually enter their own username, then the function will find what their rating, rank, win, lose are. Quote Link to comment https://forums.phpfreaks.com/topic/252956-collecting-data-from-another-website/#findComment-1297245 Share on other sites More sharing options...
getRyan Posted December 13, 2011 Share Posted December 13, 2011 I'd vote to use cURL to grab the info then DOMDocument to find the data in the code.. it's not hiding too far down there. Quote Link to comment https://forums.phpfreaks.com/topic/252956-collecting-data-from-another-website/#findComment-1297391 Share on other sites More sharing options...
Esq Posted December 14, 2011 Author Share Posted December 14, 2011 thanks I'll look up on those Quote Link to comment https://forums.phpfreaks.com/topic/252956-collecting-data-from-another-website/#findComment-1297694 Share on other sites More sharing options...
jcbones Posted December 14, 2011 Share Posted December 14, 2011 I'll second Ryans suggestion, but be aware DOMDocument can be tedious at times. Perhaps you could contact the site admin, and see if they have an API available for this type of project. Most game servers do, and would make it much easier (and it won't break when site design changes). Quote Link to comment https://forums.phpfreaks.com/topic/252956-collecting-data-from-another-website/#findComment-1297698 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.