HTTP and PHP - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: HTTP and PHP (
/showthread.php?tid=449090)
HTTP and PHP -
[MG]Dimi - 07.07.2013
Hey. My question is simple. How do I return data to SA-MP Script from PHP Page.
PAWN Code
pawn Код:
HTTP(playerid,HTTP_POST,"mg-s.us/country.php",string,"GetPlayerCountry");
PHP Part (country.php)
PHP код:
<?
$ip = $_POST['ip'];
$country = geoip_country_name_by_name($ip);
?>
Now I want to know how do declare what has to be sent back to SA-MP Server?
Re: HTTP and PHP -
InfiniTy. - 07.07.2013
https://sampwiki.blast.hk/wiki/HTTP
Re: HTTP and PHP -
Vince - 07.07.2013
Then use
data in your HTTP callback.
Re: HTTP and PHP -
[MG]Dimi - 07.07.2013
@InfiniTy. Still you didn't help. I'm asking for PHP Part of code which sends data back to server. It clearly isn't stated there.
@Vince So just to echo it? Thanks.
Re: HTTP and PHP -
InfiniTy. - 07.07.2013
Quote:
Originally Posted by [MG]Dimi
@InfiniTy. Still you didn't help. I'm asking for PHP Part of code which sends data back to server. It clearly isn't stated there.
@Vince So just to echo it? Thanks.
|
Didn't seem like you have the callback in your pawn code..
So i thought that you need the data in your samp server and stuff, sorry