PDA

View Full Version : Recall information from another website


Evultoad
July 21st, 2006, 03:45
hi, im kinda new to Php and was wondering how i could recall information from one site and include it on my site, but i only want certain information not all of it

the_pm
July 21st, 2006, 04:00
Welcome to IWDN, Eultoad :hi:

If you're talking about information that's being stored in a database, you'll need to have the username and password to that database. Then you simply connect and pull the appropriate information from the appropriate table.

You can try pulling in information using an include statement, though you'll need to be on the same server as the information being pulled, and you'll need some sort of scripted mechanism tot filter out everything but the content you desire. It's tough to think of how that mechanism will look without seeing the actual site in question.

If the site is housed on another server, you'd need to call it using the URL, and chances are the server has this functionality blocked (if the server admins are doing their jobs, remote calls to a a URL should be blocked).

Evultoad
July 21st, 2006, 04:00
not sure wether this is in right rection or not sorry if its not, i read php in topic text, and i think this is php related

Evultoad
July 21st, 2006, 04:02
well, i know this sounds pretty lame, but im trying to recall highscores for a game that i play.....the highscore database is interlinked with the agme its self obviously....i know it can be done because ive seen people do it on other sites

Cameron
July 21st, 2006, 04:03
Depending on the format... You may wish to look into PEAR's XML_RSS package (http://pear.php.net/package/XML_RSS), or the cURL (http://www.php.net/curl) extension.

[edit: can't spell :S]

Evultoad
July 21st, 2006, 04:06
:S completely confused by php more of a html person myself :(
where can a newbie at php go to learn i know basics.....and i mean basics

Cameron
July 21st, 2006, 04:09
Google (http://www.google.com/search?q=PHP+tutorials) and the PHP manual (http://www.php.net/manual/en/index.php) are good places to look for examples and tutorials ;)

Also, XML_RSS depends upon XML_Parser, which requires allow_url_fopen set to on, so if your host has it off, cURL may be your best option.

Evultoad
July 21st, 2006, 04:21
thanks ill come back soon for more help, cheers guys

the_pm
July 21st, 2006, 04:22
Unfortunately, it doesn't appear there's a magic bullet answer to this question. It will take some learning in order to make it happen, and I imagine some knowledge of the system that's housing your scores.

chaos
July 21st, 2006, 04:26
Unfortunately, it doesn't appear there's a magic bullet
You mean "Silver Bullet (http://en.wikipedia.org/wiki/Silver_bullet)" correct? :lol:

Cameron
July 21st, 2006, 04:30
Generally it depends on the game, for flash games, its probably sending the data to some kind of backend (either an XML file, or a script/app that will take the xml data that flash sends it). If the latter (script that stores the data) you may very well be SOL.

However, if its something along the lines of Half-life, BF2, etc thats a different ball park, as you need to capture the data from the server you play on, and have a general understanding of at least being able to read understand hex/binary, along with sockets, and what not. (It's doable, and I believe there are a few open source scripts that do just this).

the_pm
July 21st, 2006, 05:19
You mean "Silver Bullet (http://en.wikipedia.org/wiki/Silver_bullet)" correct? :lol::ot:

No, I actually meant "Magic Bullet (http://en.wikipedia.org/wiki/Magic_bullet)" ;) (they can almost be used interchangeably, though you are correct, Silver Bullet does have a meaning specific to technology)

chaos
July 21st, 2006, 05:40
Very :ot: : Wow, I learned something new today; I have never heard the phrase magic bullet until today, but I guess you told me.

Back on topic:
If the game is Halo 2 you are talking about (which is the most popular game to get stats from), it shouldn't be too difficult to do what you are asking, as the stats are made readily available and in usable form if I am not mistaken, having checked my stats back when I had Xbox Live. BF2 isn't difficult either, as several sites already take care of those stats, so a simple cut and paste of code should do the trick. Most other games though don't have Browser interfaces and are entirely in game, so you will have to do some reverse engineering (definitely not for beginners), or find a premade script.

Alex
July 22nd, 2006, 07:34
http://hotscripts.com/Detailed/3240.html

http://hotscripts.com/PHP/Scripts_and_Programs/Web_Fetching/index.html and here you have 15 pages worth of scripts that might contain what you want...