HTTP data retrieving issue
#1

Hello,

I am trying to get data from my website using HTTP_GET, and its just doesn't retrieve any data (it does on internet, a link below).

PHP код:
HTTP(playeridHTTP_GET"r-scripting.sytes.net/curl.php?limit=16&linkid=http://www.*******.com/results?search_query=x?factor""""My*******HttpResponse"); 
PHP код:
public My*******HttpResponse(indexresponse_codedata[])
{
    if(
response_code == 200)
    {
                new 
string[64];
                
format(string64"data retrieved: %s"data);
                
SendClientMessage(index, -1string);
    }
    return 
1;

Output:
Код:
data retrieved:
Link: CLICK HERE

By the way, I am using linux, and on other websites it does retrieving the data.
Reply
#2

Print the response code at the top of the callback and see what kind of response you are getting. Then you can use that to see what the issue is
Reply
#3

Quote:
Originally Posted by Chenko
Посмотреть сообщение
Print the response code at the top of the callback and see what kind of response you are getting. Then you can use that to see what the issue is
200..
Reply
#4

try to increase the string
pawn Код:
new string[200];
format(string, 200, "data retrieved: %s", data);
Reply
#5

Quote:
Originally Posted by Eth
Посмотреть сообщение
try to increase the string
pawn Код:
new string[200];
format(string, 200, "data retrieved: %s", data);
Even if it hasn't enough cells it would've print some characters. Doesn't work.
Reply
#6

The HTTP function doesn't act like a normal browser. In fact, I tried to access that link through wget on Linux and it came up empty with "No results found".

Try using the "data" parameter of the function. Move everything after the first question mark to the data parameter and delete the question mark itself.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)