Jump to content

Storing Information from an auto generated list in a database


al3x8730

Recommended Posts

I have an auto generated list:

 

<?php
$test = file_get_contents('http://game.endless-online.com/playerlist.html');
//echo $test;
preg_match_all('|<td width="155"><font face="Arial" size="2" color ="#111111">\s+(.*?)</font>\s+</td><td width="155"><font face="Arial" size="2" color ="#111111">\s+(.*?)</font>\s+</td><td width="50"><font face="Arial" size="2" color ="#111111">\s+(.*?)</font>\s+</td><td width="100"><font face="Arial" size="2" color ="#111111">\s+(.*?)</font>\s+</td><td width="70"><font face="Arial" size="2" color ="#111111">\s+(.*?)</font>\s+</td>|is',$test, $out);
echo '<table><tr><td><b><u>Name</u></b></td><td><b><u>Title</u></b></td><td><b><u>Level</u></b></td><td><b><u>Experience</u><b/></td><td><b><u>Gender</u></b></td></tr>';
foreach ($out[0] as $k => $v){
echo '<tr><td>', $out[1][$k], '</td><td>', $out[2][$k], '</td><td>', $out[3][$k], '</td><td>', $out[4][$k], '</td><td>',$out[5][$k], "</td></tr>";
}
echo '</table>';
?>

 

Now that outputs a player list which gives the Username, Title, Level, Experience, and gender. Now I want to make something that will add the users to the database, if not already in it, and update the info if it changes. Then be able to recall information from the database by a form. They would type in a username and it would output the information that's in the database.

 

Also if they're online or not (The list is an online list, if they're currently on the list, it would say online, if they're not current on the list it would say offline).

 

If someone can help me with this, because it's large I'm offering to pay, just post here. And we can discuss it, thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.