The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End To fetch the form results from an external website and displaying on my site

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #161328

    i’m new to php but i tried to make my own edu website but i’m facing lot of problem bu using php
    when the students enter their usn no(eg:1db12cs005) when user hit submit button it must fetch result from external website(eg:‎ but I don’t want to redirected to the external website, where results can be seen. Instead, I want the results to be displayed on the same website. I’m open to to all kinds of suggestion!
    i’m new to php so plz help me by giving complete code

    i got this from some website but it’s not working properly.when the student enter their usn no and when they hit submit button its just accessing their name but its not showing their marks and also it’s showing its result in sidebar i want to display in new windows(their r many website for eg,vtualerts they fetch from website )

    echo '


    $location = ‘;;

    $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” => $_POST[‘rid’],
    “submit” => “submit”
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array);
    $response = curl_exec($ch);

    $start = ”;
    $end = ”;

    $response = strstr($response, $start);
    $end = stripos($response, $end);
    $response = substr($response, strlen($start), $end – strlen($start));

    echo $response.””;


Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.