Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['g-recaptcha-response'])){
- $cookie="cookie.txt";
- if(!file_exists($cookie)){
- $fh = fopen($cookie, "w");
- fwrite($fh, "");
- fclose($fh);
- }
- $captcha=$_POST['g-recaptcha-response'];
- $postdata = "username=xxx&password=xxx&g-recaptcha-response=$captcha";
- $ch = curl_init();
- curl_setopt ($ch, CURLOPT_URL, "REMOTE URL LOGIN");
- curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
- curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");
- curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
- curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
- curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt ($ch, CURLOPT_COOKIE,1);
- curl_setopt ($ch, CURLOPT_COOKIEJAR,$cookie);
- curl_setopt ($ch, CURLOPT_COOKIEFILE,$cookie);
- curl_setopt ($ch, CURLOPT_POSTFIELDS, $postdata);
- curl_setopt ($ch, CURLOPT_POST, 1);
- $result = curl_exec($ch);
- echo $result;
- }else{
- ?>
- <script src="//www.google.com/recaptcha/api.js" type="text/javascript"></script>
- <form method="post" action="" name="signup-form">
- <center><div class="g-recaptcha" data-theme="light" data-sitekey="SITEKEYREMOTELOGIN"></div></center>
- <button type="submit" name="submit">SUBMIT</button>
- </form>
- <?php
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement