I've seen many sites that take data from one site (take Steam for instance) and place the user's data on the page, depending the ID they enter. How are you able to accomplish this? Something like Drunken R00l's site, tf2items.
Otherwise, disregard this post of it's too much.
If the site provides an SDK or API that is one way to gain access. If nothing is provided you got to the tried and true method of scraping the site for the data.
Thats pretty easy:
file_get_contents
preg_match(BEFORETEXT(.*)AFTERTEXT)
€:
From Steam you can get most of the shit via xml
Use CURL + [url]http://simplehtmldom.sourceforge.net/[/url]
You can use regex, but that little parser makes things tons easier to scrape stuff from web pages.
[QUOTE=SteveUK;17082314]Use CURL + [url]http://simplehtmldom.sourceforge.net/[/url]
You can use regex, but that little parser makes things tons easier to scrape stuff from web pages.[/QUOTE]
file_get_contents does the job fine.
[QUOTE=jaybuz;17082924]file_get_contents does the job fine.[/QUOTE]
Yeah but not if you're picking out specific parts of the data...
Look at my post, works fine >.>
facepunch: always over complicating things.
see: steveuk
Doesn't work fine if you need to send POST Variables to get specific data, Curl handles that for you.
Unless I missed something :downs:
[QUOTE=efeX;17096771]facepunch: always over complicating things.
see: steveuk[/QUOTE]
barely complicated, especially if you want to send POST data. omg a whole 3 lines more, curl_init, setopt for the URL and to return the transfer, and the exec line.
Sorry, you need to Log In to post a reply to this thread.