Can sa-mp HTTP function be blocked ?
#1

ok i'am using http function to post data on php
when i start server at home (windows 7) everyting work fine and i get posted data from sa-mp http function to php
then i upload my gamemode on host and start server http function not sending data tu php .

i use same url at http function

What can be problem ?
can my gamehost to block samp http function ti send data ti php file(which is on another host)?
Reply
#2

maybe the server your sending the data too is blocking it, have you tried sending the same data using a web browser to the server?
Reply
#3

how do you think with a web browser send data to the server?
i need a basic example
Reply
#4

Try the GET method?
Reply
#5

yes i tried now and not work :@
Reply
#6

same way your using the http function in samp...
for example
https://sampforum.blast.hk/showthread.php?tid=274902
that is sending the data t=274902 to the server, and the server is rendering an html for the thread 274902 and sending it back to the client
Reply
#7

here is my script
Код:
#include <a_samp>
#include <a_http>

forward HTTPX(index, response_code, data[]);

public OnFilterScriptInit()
{
	HTTP(0, HTTP_POST, "mysite.com/test.php", "Name=Jony_Dude&Score=1", "HTTPX");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public HTTPX(index, response_code, data[])
{
    printf("Response code: %d", response_code);
    return 1;
}
you think this to put in web browser ?
Код:
mysite.com/test.php?Name=Jony_Dude&Score=1
Reply
#8

yeah
Reply
#9

Your host could be blocking port all ports except the ones for SA-MP, in and out.
Reply
#10

not work why ?

but this method work

Код:
<html>
<head>
<title>TEST</title>
</head>
<body>
<form action="http://mysite.com/test.php" method="post">
Please enter your name: <input name="Name" type="text" />
<input type="submit" name="submit" value="Submit your name">
</form>
</body>
</html>
Reply
#11

anyone know why not work on host?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)