Ask the php experts for help and how to remotely call parameters

Source: Internet
Author: User
Please help php experts. how can I remotely call parameters? This post was last edited by kwdpx at 2014-02-22:52:42. this is a webpage on another website: & lt ;? Phprequire_once (header. php); $ qgsselect & nbsp; * & nbsp; from & nbsp; members & nbsp; wh ask the php experts for help. how to remotely call parameters?

This post was last edited by kwdpx at 11:52:42

This is a webpage on another website:

require_once("header.php");


$qgs="select * from members where username='$user'";
$rgs=$obj_db->simplequery($qgs);
$ngs=mysql_num_rows($rgs);
if ($ngs=="1"){
$jd_bbs="1";

}else{
$jd_bbs="0";
}
?>



I want to call the parameter $ jd_bbs obtained by running the webpage on this website

File_get_contents ("http://www.xxx.com/ B /index.php? User = $ user ");

If ($ jd_bbs! = "1 "){
Echo "$ jd_bbs"; // How do I get it?
Exit ();
}
?>

------ Solution --------------------
Require_once ("header. php ");


$ Qgs = "select * from members where username = '$ user '";
$ Rgs = $ obj_db-> simplequery ($ qgs );
$ Ngs = mysql_num_rows ($ rgs );
$ Jd_bbs = 0;
If ($ ngs = "1 "){
$ Jd_bbs = "1 ";

} Else {
$ Jd_bbs = "0 ";
}

Echo $ jd_bbs;
?>

The above is your modified
The following is an example of another website

$ Ch = curl_init ("website URL above ");

Curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, true );
Curl_setopt ($ ch, CURLOPT_BINARYTRANSFER, true );

$ RRes = curl_exec ($ ch); // obtain the result.
Curl_close ($ ch );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.