|
http_post undeclared identifier
#467542
08/10/17 22:51
08/10/17 22:51
|
Joined: Mar 2014
Posts: 359
CocaCola
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2014
Posts: 359
|
hello, I'm trying the code from the manual, but I get the error :http_post undeclared identifier ... E355
#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 $ip ="$REMOTE_ADDR";echo "Your IP: $ip";?>
Last edited by CocaCola; 08/10/17 22:53.
|
|
|
Re: http_post undeclared identifier
[Re: CocaCola]
#467553
08/11/17 21:00
08/11/17 21:00
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
P LC means that the feature is Pro Version exclusive and only supported in Lite-C, not in C-Script.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: http_post undeclared identifier
[Re: Uhrwerk]
#467554
08/11/17 21:47
08/11/17 21:47
|
Joined: Mar 2014
Posts: 359
CocaCola
OP
Senior Member
|
OP
Senior Member
Joined: Mar 2014
Posts: 359
|
|
|
|
Re: http_post undeclared identifier
[Re: Uhrwerk]
#472787
05/23/18 13:26
05/23/18 13:26
|
Joined: Feb 2010
Posts: 7 Mainz
NnamueN
Newbie
|
Newbie
Joined: Feb 2010
Posts: 7
Mainz
|
Hi,
I also get the error even though I have the Pro version does anyone have an idea why that is?
cu Roman
So Long, and Thanks For All the Fish. Es geht nicht darum im höchsten Level zu sein, sondern alle die vorherigen erlebt und verstanden zu haben !
|
|
|
Re: http_post undeclared identifier
[Re: Superku]
#472879
05/27/18 21:20
05/27/18 21:20
|
Joined: Feb 2010
Posts: 7 Mainz
NnamueN
Newbie
|
Newbie
Joined: Feb 2010
Posts: 7
Mainz
|
Danke für die Info :-) http_sendpost, wo hast du die infos hier ?
cu Roman
So Long, and Thanks For All the Fish. Es geht nicht darum im höchsten Level zu sein, sondern alle die vorherigen erlebt und verstanden zu haben !
|
|
|
Re: http_post undeclared identifier
[Re: NnamueN]
#472880
05/27/18 21:30
05/27/18 21:30
|
Joined: Feb 2010
Posts: 7 Mainz
NnamueN
Newbie
|
Newbie
Joined: Feb 2010
Posts: 7
Mainz
|
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
Last edited by NnamueN; 05/27/18 21:34.
So Long, and Thanks For All the Fish. Es geht nicht darum im höchsten Level zu sein, sondern alle die vorherigen erlebt und verstanden zu haben !
|
|
|
Re: http_post undeclared identifier
[Re: NnamueN]
#472884
05/28/18 09:02
05/28/18 09:02
|
Joined: Feb 2010
Posts: 7 Mainz
NnamueN
Newbie
|
Newbie
Joined: Feb 2010
Posts: 7
Mainz
|
Hi I have problems with https (SSL / TLS) Transport Protocol it is working
var id = http_sendpost("http://www.ng-arena.de/ip.php",NULL);
But here I do not get any connection (http_result/http_status)
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 :-)
So Long, and Thanks For All the Fish. Es geht nicht darum im höchsten Level zu sein, sondern alle die vorherigen erlebt und verstanden zu haben !
|
|
|
Re: http_post undeclared identifier
[Re: NnamueN]
#472885
05/28/18 09:29
05/28/18 09:29
|
Joined: Sep 2003
Posts: 6,861 Kiel (Germany)
Superku
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
|
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.htmLooking 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 p.s.: @Superku, freue mich schon auf dein Spiel, verfolge das schon seit Jahren, hoffe es bald in steam kaufen zu können :-) Danke! 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.
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual Check out my new game: Pogostuck: Rage With Your Friends
|
|
|
|