Arkadaşlar merhaba. Sitedeki kullanıcı adları ve id lerini almak için bir bot yaptım(tamamen amatör olarak)

Bot siteye giriş yapıyor ve istediğim sayfayı listeliyor.Fakat bu listelen verileri db ye kaydetmek istiyorum (isim ve id olarak) bu konuda yardımcı olabilir misiniz ? Kodları aşağı ekledim. Şimdiden herkese teşekkürler

<?php
$username="System";
$password="12344321";
$url="http://zerox.ogamespeed.net/index.php";
$url2="http://zerox.ogamespeed.net/game.php?page=statistics&range=1";
$cookie="cookie.txt";

$postdata = "username=". $username ."&password=". $password ."";
$ch = curl_init();
$ch2 = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url );
curl_setopt ($ch2, CURLOPT_URL, $url2 );

curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");
curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
//curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt ($ch, CURLOPT_REFERER, $url2 );

curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt ($ch, CURLOPT_POST, 1);

$result2 = curl_exec ($ch2);
curl_close($ch);
?>