Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //used Export Cookies extension to get NC cookie
- $ch = curl_init ();
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- $timeout = 0;
- $myHITurl = "https://www.newbiecontest.org/epreuves/prog/prog1.php";
- curl_setopt ( $ch, CURLOPT_URL, $myHITurl );
- curl_setopt ( $ch, CURLOPT_HEADER, 0 );
- curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
- curl_setopt ( $ch, CURLOPT_CONNECTTIMEOUT, $timeout );
- curl_setopt($ch, CURLOPT_COOKIEFILE, 'C:/Temp/cookies.txt');
- curl_setopt($ch, CURLOPT_VERBOSE, true);
- $file_contents = curl_exec ( $ch );
- if (curl_errno ( $ch )) {
- echo curl_error ( $ch );
- curl_close ( $ch );
- exit ();
- }
- curl_close ( $ch );
- $int = (int) filter_var($file_contents, FILTER_SANITIZE_NUMBER_INT);
- $subm = "https://www.newbiecontest.org/epreuves/prog/verifpr1.php?solution=" . $int;
- echo $subm;
- header("Location: $subm");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement