Arkadaşlar bir bot hazırlamaya çalışıyorum.site adresini gizlemeden kodları yazıyorum...

<?php
/*
 *      stewart.php
 *      
 *      Copyright 2010 Onur Ağtaş <external@linuxmail.org>
 *      
 *      This program is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation; either version 2 of the License, or
 *      (at your option) any later version.
 *      
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *      
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
	<title>isimsiz</title>
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<meta name="generator" content="Geany 0.18" />
</head>

<body>
<?
$value=1;
$url="http://www.robertpattinson-tr.com/blog/?paged=1";
$ch=curl_init($url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,$value);
$data=curl_exec($ch);
curl_close($ch);
preg_match_all('|<h2>			<a href="(.*?)" rel="bookmark" title="(.*?)">(.*?)</a>|si',$data,$ll,PREG_SET_ORDER);
for($i=1; $i<=9; $i++){
    $linki=$ll[$i][1];
    $title=$ll[$i][2];

    $ci=curl_init($linki);
    curl_setopt ($ci, CURLOPT_POST, 1);
    curl_setopt ($ci, CURLOPT_POSTFIELDS, 'log=By_System&pwd=123456');
    curl_setopt ($ci, CURLOPT_COOKIEJAR, 'dosya.txt');
    curl_setopt($ci, CURLOPT_COOKIEFILE, 'dosya.txt');
    curl_setopt($ci,CURLOPT_FOLLOWLOCATION, $value);
    curl_setopt($ci,CURLOPT_RETURNTRANSFER, $value);
	$data2=curl_exec($ci);
    curl_close($ci);
    preg_match('|<div class="post-bodycopy clearfix">(.*?)</div>|si',$data2,$haberi);
	echo $bilgi=$haberi[1];
}
?>
</body>
</html>
kodlar böyle ama dosya.txt dosyasına cookie yazdırmıyor ve kullanıcı girişi yani loginde takılıyor. sizce nasıl üstesinden gelebilirim ?