note 60701 added to function.curl-setopt
| From: | Nazin at osu1 dot php dot net | Date: | Sat, 14 Jan 2006 12:05:09 +0000 |
| Subject: | note 60701 added to function.curl-setopt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-101746@lists.php.net to get a copy of this message | ||
I've got this code:
<?php
$cookie = 'cookie.txt';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.examplesite.com/login.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'username=Login&password=pass');
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$store = curl_exec($ch);
curl_setopt($ch, CURLOPT_URL, 'http://www.examplesite.com/members/index.php?go=next');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec($ch);
echo $content;
curl_close($ch);
echo '<meta http-equiv="Refresh" content="2">';
?>
This is for simply autoclicker but, this only work one time, why? It goes to http://www.examplesite.com/members/index.php?go=next
nad if it refresh page is in the same place. Why? Could you help me?
----
Manual Page -- http://www.php.net/manual/en/function.curl-setopt.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60701
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60701&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60701&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60701&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60701&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60701&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60701&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60701&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60701&report=yes
Search -- http://master.php.net/manage/user-notes.php