View Full Version : Gather information from another website

04-24-2011, 07:39 AM
I want to extract information from playstation website to use on my forums for VBulletin.

For example

I want to extract the level (35) and number of trophies (7861) and use them on my forums, in my postbit. I make VBulletin modifications, and know some php, but dealing with another website confuses me, and I'd like to learn more.

If Playstation had an API, I would use it, but unfortunately they don't. This website can do it somehow, and I would like to learn how.

I tried something like this to no extent... =[

$source = file_get_contents("http://us.playstation.com/publictrophy/index.htm?onlinename=Roughdawg4");
if ($source = file_get_contents("http://us.playstation.com/publictrophy/index.htm?onlinename=Roughdawg4")) {
$search = "Level";
$newText = substr($source,strpos($source, $search)+strlen($search), 100);
echo $newText;
} else {