Jump to content

Locating and Copying specific information from a websites Source Code


Styles2304

Recommended Posts

My goal is to make one of those dynamic sig images in php that update my characters status in game and what not. There is no way to retrieve the data directly from the server every time but the data is posted and updated weekly here:

http://starwarsgalaxies.station.sony.com/en_US/players/officers.vm?id=66953.

 

So basically, my question is how do I extract just the row from the table where my information is? The rest I've got.

Link to comment
Share on other sites

try

<?php
$your_name = 'SecretADC';
$patern = "/<td>$your_name<\/td><td>(.*?)<\/td><td>(.*?)<\/td><td>(.*?)<\/td><td align=\"right\">(.*?)<\/td>/";
$page = file_get_contents('http://starwarsgalaxies.station.sony.com/en_US/players/officers.vm?id=66953');
preg_match($patern,$page,$out);
print_r($out);
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.