http problem
#1

PHP код:
new WebList[][80]=
{
    {
"http://website.com/index.php"// this not really web
};
stock QueryIP(pid,IpAddress[],Time)
{
    new 
szstr[150];
    for(new 
ww<sizeof(WebList); w++)
    {
        
format(szstr,sizeof(szstr),"%s?act=get&host=%s&time=%d",WebList[w],IpAddress,Time);
        
HTTP(pidHTTP_POST,szstr,"","MygetipResponse");
    }
}
forward MygetipResponse(response_code,data[]);
public 
MygetipResponse(response_code,data[])
{
    if(
response_code == 200)printf("Content : %s",data);
    else 
printf("Failure ! Reason = %d",response_code);
    return 
1;

this return:
Failure ! Reason = 4


why?
Reply
#2

See this:

https://sampwiki.blast.hk/wiki/HTTP

Quote:

HTTP_ERROR_CANT_WRITE 4 <-----Error code 4.

Reply
#3

write to....?
Reply
#4

You used HTTP_POST and you were trying to post this:

format(szstr,sizeof(szstr),"%s?act=get&host=%s&tim e=%d",WebList[w],IpAddress,Time);


HTTP(pid, HTTP_POST,szstr,"","MygetipResponse");

Not sure but you might have to enter a password to post in your php file.
Reply
#5

I want to enter the server address you specified array
Reply
#6

///?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)