Показать сообщение отдельно

  #5  
Старый 14.04.2009, 11:10
j0ker13
Участник форума
Регистрация: 28.07.2008
Сообщений: 199
С нами: 9361870

Репутация: 58
По умолчанию

пытаюсь получить индекс.пхп чата бородина.
PHP код:
sub sends{
  use 
LWP::UserAgent;
  
my $ua LWP::UserAgent->new();
  
$url1=$_[0];
  
$post=$_[1];
  
$ua->agent("Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en; rv:1.8.1.4pre) Gecko/20070511 Camino/1.6pre");
  
$ua->default_header('Accept-Language' => "en-US,en;q=0.5");
  
$ua->default_header('Accept' => "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5");
  
$ua->default_header('Accept-Charset' => "windows-1251,utf-8;q=0.7,*;q=0.7");
  
my $url $host."/".$url1;
  
my $req HTTP::Request->newPOST => $url );
  
$req->content($post);
  
my $res $ua->request($req);
  
my $response $res->content();
  return 
$response;
}

sends("index.php","PHPSESSID=".$session."&clean-ident=1239095243&br_init_quot=%27php%22spb%22ru%27&br_servtime=1239095249&br_width=".$br_width."&br_height=".$br_height."&br_color=".$br_color."&br_zone=".$br_zone."&br_plugin=false&br_jsreferer=&br_usertime=1239095331906"); 
 
Ответить с цитированием