Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

Capture return value from server

Codes here !

Moderators: macek, egami, gesf

Capture return value from server

Postby kiwi » Sun Sep 09, 2012 10:52 pm

hi, i want to know any proper logic/function to use to capture return value from server , actually this is a sms server? i trying to send some parameters to a url, e.g www.web.com?a=1&b=2, from that url it will return some value on the same page it self, i want to capture that particular value so i can store it in db.

the return value show in html page, with the same url as i pass the parameters , and when i view source, the source code only show the return value code, it didn't contain any html code.

thanks
kiwi
New php-forum User
New php-forum User
 
Posts: 124
Joined: Sun Feb 29, 2004 6:26 am

Re: Capture return value from server

Postby johnj » Mon Sep 10, 2012 2:36 am

In php, if you pass a variable in a url, you are actually talking to a function which takes in zero or more parameters and returns zero or more values.

Maybe this function is supposed to return a code and not any html.

One way to confirm this will be write a php script and use that to access this url so that you can use php to display what ever (including the html) is returned.
johnj
php-forum Super User
php-forum Super User
 
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: Capture return value from server

Postby kiwi » Fri Sep 21, 2012 1:03 am

function httpGet(theUrl)
{
var xmlHttp = null;
xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", theUrl, false);
xmlHttp.send(null);
return xmlHttp.responseText;
}

i use this method, but i can get the return is i use IE browser....it doesn't return value for FF and Chrome....any recommendation?

thanks
kiwi
New php-forum User
New php-forum User
 
Posts: 124
Joined: Sun Feb 29, 2004 6:26 am


Return to mySQL & php coding

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.