Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php /*
- $user = "";
- $password = "";
- $url = "mysite/index.php?action=login2";
- $cookie="cookie.txt";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_POST, true);
- curl_setopt($ch, CURLOPT_HEADER, true);
- curl_setopt($ch, CURLOPT_VERBOSE, 1);
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
- curl_setopt($ch, CURLOPT_TIMEOUT, 10);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_POSTFIELDS, "&user=$user&passwrd=$password&cookielength=-1&submit=Login");
- curl_setopt ($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- $result = curl_exec($ch);
- if (curl_error($ch)) {
- echo curl_error($ch);
- }
- echo $result;
- */ ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement