Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //POST /class12/cbse122013.asp HTTP/1.1
- //Host: cbseresults.nic.in
- //User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:21.0) Gecko/20100101 Firefox/21.0
- //Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
- //Accept-Language: en-US,en;q=0.5
- //Accept-Encoding: gzip, deflate
- //Referer: http://cbseresults.nic.in/class12/cbse122013.htm
- //Connection: keep-alive
- $rollno = $_GET['rollno'];
- $postdata = http_build_query(
- array(
- 'regno' => $rollno,
- 'B1' => 'Submit'
- )
- );
- $referer = "http://cbseresults.nic.in/class12/cbse122013.htm";
- $opts = array('http' =>
- array(
- 'header'=>array("Referer: $referer\r\n"),
- 'method' => 'POST',
- 'content' => $postdata
- )
- );
- $context = stream_context_create($opts);
- $result = file_get_contents('http://cbseresults.nic.in/class12/cbse122013.asp', false, $context);
- echo $result;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement