SA-MP Forums Archive
a_http always returns code 6! - 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: a_http always returns code 6! (/showthread.php?tid=571671)



a_http always returns code 6! [SOLVED] - Fel486 - 21.04.2015

My request always returns code 6 (HTTP_ERROR_MALFORMED_RESPONSE), on GET or POST. Tried on www.******.com and works fine, retrieves data.

I'm using WAMP server 2.5, with PhpMyAdmin and Mysql, and everything works fine. I built my site in php and the database.

PHP код:
forward MyHttpResponse(indexresponse_codedata[]);
public 
MyHttpResponse(indexresponse_codedata[])
{
    if(
response_code == 200)
            
printf("Data: %s"data);
        else
            
printf("offline, codigo: %d"response_code);

PHP код:
HTTP(0HTTP_GET"127.0.0.1/samp/teste.php""""MyHttpResponse"); 



Re: a_http always returns code 6! - Fel486 - 21.04.2015

Solved.

Tried to turn off and worked, lmao

Specifically AVG's Linkscanner Surf-shield.


Re: a_http always returns code 6! - AdamsP - 21.04.2015

I also have the same problem, but seems I can't resolve it. Can you post some steps on how you resolved this? Or at least pm me?


Re: a_http always returns code 6! - Fel486 - 21.04.2015

Quote:
Originally Posted by AdamsP
Посмотреть сообщение
I also have the same problem, but seems I can't resolve it. Can you post some steps on how you resolved this? Or at least pm me?
I just disabled my anti-virus. In case, it's AVG FREE 2015. So, I right clicked it's icon on tray and chose the option. I don't know how it's translated exactly there, because I'm not using English version, but should be something like this: disable protection temporarily.

Done, just that.


Re: a_http always returns code 6! - AdamsP - 22.04.2015

Quote:
Originally Posted by Fel486
Посмотреть сообщение
I just disabled my anti-virus. In case, it's AVG FREE 2015. So, I right clicked it's icon on tray and chose the option. I don't know how it's translated exactly there, because I'm not using English version, but should be something like this: disable protection temporarily.

Done, just that.
Thanks for your answer
One question; the .php file was empty/blank? Or you have to insert some php code in order to work? (sorry for asking noob-ish questions..)


Re: a_http always returns code 6! - Fel486 - 22.04.2015

Quote:
Originally Posted by AdamsP
Посмотреть сообщение
Thanks for your answer
One question; the .php file was empty/blank? Or you have to insert some php code in order to work? (sorry for asking noob-ish questions..)
On the HTTP_GET method needs to have something, because you're getting from the file .

On the HTTP_POST, no, you're posting something to the server. Both methods returns the data you sent/received, but I still don't know how to use it server-side (PHP), cause it doesn't shows anything if I reload the page.

However, have to work with this data and send this information to be shown, just don't know how...


Re: a_http always returns code 6! - AdamsP - 23.04.2015

Quote:
Originally Posted by Fel486
Посмотреть сообщение
On the HTTP_GET method needs to have something, because you're getting from the file .

On the HTTP_POST, no, you're posting something to the server. Both methods returns the data you sent/received, but I still don't know how to use it server-side (PHP), cause it doesn't shows anything if I reload the page.

However, have to work with this data and send this information to be shown, just don't know how...
Thanks mate, I really appreciate your reply!