Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = 'USERNAME';
- $password = 'PASSWORD';
- $post_data = 'account='.$username.'&pass='.$password.'&login=Login';
- $login_url = 'http://www.lastwow.com/login.action.php';
- $url1 = 'http://www.lastwow.com/vote.wow?num=1';
- $url2 = 'http://www.lastwow.com/vote.wow?num=2';
- $url3 = 'http://www.lastwow.com/vote.wow?num=3';
- //Create a curl object
- $ch = curl_init();
- //Set the useragent
- $agent = $_SERVER["HTTP_USER_AGENT"];
- curl_setopt($ch, CURLOPT_USERAGENT, $agent);
- //Set the URL
- curl_setopt($ch, CURLOPT_URL, $login_url );
- //This is a POST query
- curl_setopt($ch, CURLOPT_POST, 1 );
- //Set the post data
- curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
- //We want the content after the query
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- //Follow Location redirects
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
- /*
- Set the cookie storing files
- Cookie files are necessary since we are logging and session data needs to be saved
- */
- curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
- curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
- //Execute the action to login
- $postResult = curl_exec($ch);
- curl_setopt($ch, CURLOPT_URL, $url1);
- curl_exec($ch);
- curl_setopt($ch, CURLOPT_URL, $url2);
- curl_exec($ch);
- curl_setopt($ch, CURLOPT_URL, $url3);
- curl_exec($ch);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement