problam HTTP_GET
#1

i try to do this :

Код HTML:
#include <a_samp>
#include a_http

public OnFilterScriptInit()
{
  	HTTP(0,HTTP_GET,"www.oref.org.il/WarningMessages/alerts.json","","MyHttpResponse");
}

forward MyHttpResponse(index, response_code, data[]);
public MyHttpResponse(index, response_code, data[])
{
	new buffer [ 128 ];
    if(response_code == 200) //Dd the request succeed?i
    {
        printf("%s", data);
    }
    else
    {
        //No!
        format(buffer, sizeof(buffer), "The request failed! The response code was: %d", response_code);
        print(buffer);
    }
    return HTTP(0,HTTP_GET,"www.oref.org.il/WarningMessages/alerts.json","","MyHttpResponse");
}
but is print me : {________
why its not print me: {
"id" : "1406129609827",
"title" : "פיקוד העורף התרעה במרחב ",
"data" : []
}
Reply
#2

UP help ?
Reply
#3

pawn Код:
#include <a_http>
Reply
#4

Quote:
Originally Posted by AMouldyLemon
Посмотреть сообщение
pawn Код:
#include <a_http>
If you do not understand please do not respond
Reply
#5

help !?
Reply
#6

pls help !
Reply
#7

pls help !
__________________
Reply
#8

Use <a_http> not a_http
Reply
#9

Quote:
Originally Posted by WizzardY
Посмотреть сообщение
Use <a_http> not a_http
same..
dont work
Reply
#10

up!!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)