http_post undeclared identifier

Posted By: CocaCola

http_post undeclared identifier - 08/10/17 22:51

hello,

I'm trying the code from the manual, but I get the error
:http_post undeclared identifier ... E355

Code:
#include <acknex.h>
#include <default.c>
#include <acknet.h>
STRING* ip_str = "";

// start the script "ip.php" on a remote server, and return the caller's IP address
function main()
{
   var id = http_post("http://underhut.de/postEchtzeit/index.php",NULL);
   while (!http_status(id)) 
     wait(1);//wait for the server to reply
   if (http_status(id) == 1) { //transfer successful?
     http_result(id,ip_str);   //get the replied IP
     printf(_chr(ip_str));
  } else
     error("Error during transfer!");
  http_free(id); //always cleanup the httpid!
  sys_exit(NULL);
}


the index.php is:
Php Code:

<?php $ip ="$REMOTE_ADDR";echo "Your IP: $ip";?>

Posted By: txesmi

Re: http_post undeclared identifier - 08/11/17 06:59

Hi,
the http call is made by 'http_sendpost' instead of 'http_post'. It was wrong in previous manual versions but it is already corrected in the last version.

Salud!
Posted By: CocaCola

Re: http_post undeclared identifier - 08/11/17 09:25

thnk you! where can I download the new version as help file, and can i update sed for infos?

I tryed 'http_sendpost' and get error http is only for pro version, but in the manual are the blue square icons for
Version:
P LC

how to read then?
Posted By: Uhrwerk

Re: http_post undeclared identifier - 08/11/17 21:00

P LC means that the feature is Pro Version exclusive and only supported in Lite-C, not in C-Script.
Posted By: CocaCola

Re: http_post undeclared identifier - 08/11/17 21:47

Thank You Uhrwerk
Posted By: NnamueN

Re: http_post undeclared identifier - 05/23/18 13:26

Hi,

I also get the error even though I have the Pro version
does anyone have an idea why that is?

cu Roman
Posted By: Superku

Re: http_post undeclared identifier - 05/23/18 20:10

That command got renamed to http_sendpost(), for whatever reason.
Posted By: NnamueN

Re: http_post undeclared identifier - 05/27/18 21:20

Danke für die Info :-) http_sendpost, wo hast du die infos hier ?

cu Roman
Posted By: NnamueN

Re: http_post undeclared identifier - 05/27/18 21:30

Originally Posted By: NnamueN
Danke für die Info :-) http_sendpost, wo hast du die infos hier ?

cu Roman

Vergiss wider meine Frage ich hätte auch alleine draufkommen sollen und einfach in Acknet.h Nachschauen, manchmal ist man blind wen die Lösung einem vor der nasse liegt, ich depp :-)

cu Roman
Posted By: NnamueN

Re: http_post undeclared identifier - 05/28/18 09:02

Hi
I have problems with https (SSL / TLS) Transport Protocol

it is working
Code:
var id = http_sendpost("http://www.ng-arena.de/ip.php",NULL);



But here I do not get any connection (http_result/http_status)
Code:
var id = http_sendpost("https://www.ng-arena.de/ip.php",NULL);



how can I call an "https" page with http_sendpost ?

Is it possible "Hypertext Transfer Protocol Secure" to use with http_sendpost ?
If not, is there a different solution?

cu Roman
youtube.com/vufDummies - ng-arena.de

p.s.: @Superku, freue mich schon auf dein Spiel, verfolge das schon seit Jahren, hoffe es bald in steam kaufen zu können :-)
Posted By: Superku

Re: http_post undeclared identifier - 05/28/18 09:29

Although I only use the offline manual it's outdated every now and then. The online version usually is up to dat: http://www.conitec.net/beta/http.htm
Looking into acknet.h (or similar header files) is another option indeed.

No idea about the secure connection, my guess is it's probably not supported.
You might need to look into Windows functions instead (and put them into a DLL, if necessary): https://msdn.microsoft.com/en-us/library/windows/desktop/aa384080(v=vs.85).aspx

Originally Posted By: NnamueN
p.s.: @Superku, freue mich schon auf dein Spiel, verfolge das schon seit Jahren, hoffe es bald in steam kaufen zu können :-)


Danke! laugh Derzeit arbeite ich sogar aber an einem kleinen Titel zwischendurch, der vorher/ in ein paar Monaten released werden wird. Dann geht's wieder weiter mit Superku.
© 2024 lite-C Forums