Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First line should be:</p> <pre><code>echo '&lt;form action="' . $_SERVER[PHP_SELF] . '" method="post"&gt; </code></pre> <p>Then above your last line where you echo, put this:</p> <pre><code>$response = curl_exec($ch); </code></pre> <p>Also, change your location line to this:</p> <pre><code>$location = 'http://results.vtu.ac.in/vitavi.php'; </code></pre> <p>-----EDIT-----</p> <p>I added some code to parse the response for you, final code would be:</p> <pre><code>&lt;?php echo '&lt;form action="' . $_SERVER[PHP_SELF] . '" method="post"&gt; &lt;input type="text" name="rid"&gt; &lt;input type="submit" name="submit" value="submit"&gt; &lt;/form&gt;'; if(isset($_POST['submit'])&amp;&amp;(!empty($_POST['rid']))) { $location = 'http://results.vtu.ac.in/vitavi.php'; $userAgent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)'; $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, $userAgent); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_URL, $location ); $post_array = array( "rid" =&gt; $_POST['rid'], "submit" =&gt; "submit" ); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array); $response = curl_exec($ch); $start = '&lt;TD width="513"&gt;'; $end = '&lt;br&gt;'; $response = strstr($response, $start); $end = stripos($response, $end); $response = substr($response, strlen($start), $end - strlen($start)); echo $response."&lt;br/&gt;"; } ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload