curl-and-php
login and get data from site
Date: Wed, 23 Feb 2005 18:23:02 +0100
Hi,
I tried search a players that have value great than>x at site
http://www.managerzone.com/?p=players
<http://www.managerzone.com/?p=players&tid=105542> &tid=105542.
But this site required login into.
Username is: testowe
Password is: testowe
I don't know how do that.
I try login:
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://www.managerzone.com");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"p=login&username=testowe&password=testowe");
ob_start();
curl_exec ($ch);
ob_end_clean();
curl_close ($ch);
unset($ch);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_URL," http://www.managerzone.com/?p=players
<http://www.managerzone.com/?p=players&tid=105542> &tid=105542.");
$wynik = curl_exec ($ch);
curl_close ($ch);
echo $wynik;
?>
but this doesn't work.
Please help.
Sincerely
Abaddon
PS. Sorry for my bad English;-)
Received on 2005-02-23