Belirttiğiniz doğrultuda aşağıdaki gibi düzenledim. Fakat veri hep boş geliyor. Komple kodu ekledim teşekkür ederim yardımınız için

<?php
$baglan = mysql_connect("localhost","veriadi","sifre");   
if(!$baglan){ die('Bağlantı Hatası:' . mysql_error());}
$db_select = mysql_select_db("veritabani");

$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);
//$result = curl_exec ($ch);
$result2 = curl_exec ($ch2);
preg_match('#<th align="left">(.+?)</th>#',$result2,$veri);
mysql_query("insert into veri (veri1, veri2) values ('".$veri[1]."', '".$veri[2]."')") ;
curl_close($ch);
?>