Advertisement
timetraveller1992

Results Page

May 27th, 2013
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. <?php
  2. //POST /class12/cbse122013.asp HTTP/1.1
  3. //Host: cbseresults.nic.in
  4. //User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:21.0) Gecko/20100101 Firefox/21.0
  5. //Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  6. //Accept-Language: en-US,en;q=0.5
  7. //Accept-Encoding: gzip, deflate
  8. //Referer: http://cbseresults.nic.in/class12/cbse122013.htm
  9. //Connection: keep-alive
  10. $rollno = $_GET['rollno'];
  11. $postdata = http_build_query(
  12.     array(
  13.         'regno' => $rollno,
  14.         'B1' => 'Submit'
  15.     )
  16. );
  17. $referer = "http://cbseresults.nic.in/class12/cbse122013.htm";
  18. $opts = array('http' =>
  19.     array(
  20.         'header'=>array("Referer: $referer\r\n"),
  21.         'method'  => 'POST',
  22.         'content' => $postdata
  23.     )
  24. );
  25.  
  26. $context  = stream_context_create($opts);
  27.  
  28. $result = file_get_contents('http://cbseresults.nic.in/class12/cbse122013.asp', false, $context);
  29. echo $result;
  30. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement