absenm
New Member
- Messages
- 16
- Reaction score
- 0
- Points
- 0
I am encountering a nightmare of a problem when it comes to acquiring remote data from a website to include in the php files of my website. My website is a Runescape fan site and Jagex, the company that makes the online game, has created a striped down version of their player high scores page so that fan sites can easily incorporate the data into their sites. The page from their site looks like this:
It is specifically designed for easy parsing. My problem is that I can not seem to get my php file to recognize the files address. And before anyone asks, I requested and received medium level php security from x10hosting. And I did recieve the second e-mail. And Jagex made the page I am requesting specifically for php retrieval so they don't have any blocks on it. Also, the link, http://hiscore.runescape.com/index_lite.ws?player=absenm, works perfectly in a browser. I fear that it may be the 'hiscore' subdomain that may be the issue, but I am not sure.
There are dozens of scripts available on the internet designed to retrieve this information page from Runescape. Right now I am only concerned with the connectivity, not the parsing abilities. There is no need to worry about the parsing if there is nothing to parse. Anyway, all of the scripts I tried, and I tried everyone I could find, comes back with similar errors to those below:
Here is one of the many scripts that I tried. It is not obviously what I am going to use in the end, but it is useful for testing my connectivity.
Please, any help would be greatly welcomed. I would rather not have to request the expert level php security level from x10hosting as I am not all that framiliar with php to begin with. But retrieval of this data from Runescape is very important to the future design of my website.
683917,1127,4423878 910344,69,726876 721075,68,615536 921816,70,774510 898926,69,695525 -1,-1,-1 1119603,44,56683 -1,-1,-1 1449695,54,152509 1984951,50,104415 1300840,37,27900 1073647,60,274972 1288527,49,93270 1150143,46,73547 973616,50,105027 782088,62,338221 519020,37,27538 525863,46,70160 617990,49,91733 591071,38,33385 441811,30,13394 -1,-1,-1 -1,-1,-1 621021,30,13433 167027,39,34321 -1,-1 -1,-1 -1,-1 -1,-1
It is specifically designed for easy parsing. My problem is that I can not seem to get my php file to recognize the files address. And before anyone asks, I requested and received medium level php security from x10hosting. And I did recieve the second e-mail. And Jagex made the page I am requesting specifically for php retrieval so they don't have any blocks on it. Also, the link, http://hiscore.runescape.com/index_lite.ws?player=absenm, works perfectly in a browser. I fear that it may be the 'hiscore' subdomain that may be the issue, but I am not sure.
There are dozens of scripts available on the internet designed to retrieve this information page from Runescape. Right now I am only concerned with the connectivity, not the parsing abilities. There is no need to worry about the parsing if there is nothing to parse. Anyway, all of the scripts I tried, and I tried everyone I could find, comes back with similar errors to those below:
Warning: file() [function.file]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/absen/public_html/hs.php on line 29
Warning: file(http://hiscore.runescape.com/index_lite.ws?player=Zezima) [function.file]: failed to open stream: Inappropriate ioctl for device in /home/absen/public_html/hs.php on line 29
Warning: CURL error: "Couldn't resolve host 'hiscore.runescape.com'" in /home/absen/public_html/RSHiLib/RSHiLib_Core/library.php on line 121
Here is one of the many scripts that I tried. It is not obviously what I am going to use in the end, but it is useful for testing my connectivity.
PHP:
<?PHP
$user="absenm";
$txt=file_get_contents('http://hiscore.runescape.com/index_lite.ws?player='.$user);
$data = explode ("\n", $txt);
$looper=0;
$skillno=0;
while ($looper<30){
$type = explode(",",$data[$looper]);
$rank[$skillno]=$type[0];
$lvl[$skillno]=$type[1];
$xp[$skillno]=$type[2];
$looper++;
$skillno++;
}
?>
Please, any help would be greatly welcomed. I would rather not have to request the expert level php security level from x10hosting as I am not all that framiliar with php to begin with. But retrieval of this data from Runescape is very important to the future design of my website.
Last edited: