Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Quad, VoroneTZ, PeroPero), 841 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 4 1 2 3 4
GS_HTTP/Peacekeeper-plugin #97447
11/04/06 23:11
11/04/06 23:11
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
hi all,

did anyone try this plugin? http://www.peacekeeper.com/3dgs/http.html
it works pretty well, but i can't get the upload done. i use

Code:
dll_handle = dll_open("GSHTTP.dll");
HTTP_Create(1);
waitt(16);
HTTP_PostFile(1,"http://www.hereComesTheUrl",the_file, ???);
waitt(16);
HTTP_Free(1);
dll_close(dll_handle);
wait(1);



where i've set the 3 ???, what do i have to fill in for "var_str"?

is there any other way to upload the file to a specific url?

Re: GS_HTTP/Peacekeeper-plugin [Re: broozar] #97448
11/05/06 05:20
11/05/06 05:20
Joined: Aug 2003
Posts: 902
Van Buren, Ar
Gordon Offline
User
Gordon  Offline
User

Joined: Aug 2003
Posts: 902
Van Buren, Ar
in http_posfile you should have the directory of your exe as the first parameter and the file name of the LOCAL copy of the http file to send. there is no forth parameter as far as the documentation goes. the other thing is that it is for 5.5 not 6.4.


Our new web site:Westmarch Studios
Re: GS_HTTP/Peacekeeper-plugin [Re: Gordon] #97449
11/05/06 10:02
11/05/06 10:02
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
can you give an exmple, please? i jsut don't get it, sorry.

furthermore, the documentation on the site says
dllfunction HTTP_PostFile(id,url_str,file_str); while the wdl that comes with the pac states
dllfunction HTTP_PostFile(id,url_str,file_str,var_str); whithout explaining var_str.

regarding the 5.5->6.4 problem, it works fine with 6.3.

Re: GS_HTTP/Peacekeeper-plugin [Re: broozar] #97450
11/05/06 14:02
11/05/06 14:02
Joined: Aug 2003
Posts: 902
Van Buren, Ar
Gordon Offline
User
Gordon  Offline
User

Joined: Aug 2003
Posts: 902
Van Buren, Ar
ok I will dig into it today and see what I can find out.


Our new web site:Westmarch Studios
Re: GS_HTTP/Peacekeeper-plugin [Re: Gordon] #97451
11/05/06 17:38
11/05/06 17:38
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
wonderful please post anything you can find out, even if it's not the solution, maybe it can help me already.

Re: GS_HTTP/Peacekeeper-plugin [Re: broozar] #97452
11/07/06 11:13
11/07/06 11:13
Joined: Aug 2003
Posts: 902
Van Buren, Ar
Gordon Offline
User
Gordon  Offline
User

Joined: Aug 2003
Posts: 902
Van Buren, Ar
after digging through the source what I found was that you were correct in using a url for the first param. As for the third param.... use a different call http_postfile2. This should take care of your problems getting started.


Our new web site:Westmarch Studios
Re: GS_HTTP/Peacekeeper-plugin [Re: Gordon] #97453
11/07/06 11:38
11/07/06 11:38
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
i had a go with postfile2, though i had no success. i guess it has something to do with the "directory of your acknex exe + fostfile". do i have to publish first, to get the exe and the file in one folder, before it will be uploaded? do i need an absolute or a relative path?

Re: GS_HTTP/Peacekeeper-plugin [Re: broozar] #97454
11/07/06 23:58
11/07/06 23:58
Joined: Aug 2003
Posts: 902
Van Buren, Ar
Gordon Offline
User
Gordon  Offline
User

Joined: Aug 2003
Posts: 902
Van Buren, Ar
I think I will have to leave this last question for someone with more expreience with this plugin than I have.


Our new web site:Westmarch Studios
Re: GS_HTTP/Peacekeeper-plugin [Re: Gordon] #97455
11/08/06 13:36
11/08/06 13:36
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
but you seem to be the only one who has. thanks a lot for your help, i will try to circumvenit the dll upload with a php script. let's see if i can do it. however, if you find anything else out about this feature, please keep me informed.

Re: GS_HTTP/Peacekeeper-plugin [Re: broozar] #97456
11/08/06 20:31
11/08/06 20:31
Joined: Jun 2005
Posts: 4,875
broozar Offline OP
Expert
broozar  Offline OP
Expert

Joined: Jun 2005
Posts: 4,875
ok, i have set up a form like this:

Code:
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data">
<input type="file" name="datei" />
<input type="submit" value="Datei hochladen" />
</form>

<?php

if (isset($_FILES['datei']) and ! $_FILES['datei']['error'])
{

$filename = $_FILES['datei']['name'];
move_uploaded_file($_FILES['datei']['tmp_name'], $filename);

echo "<b>Status:</b> Upload komplett";

} else {

echo "<b>Status:</b> Fehler beim Upload";

}
?>



it's called upload.php. now i want to fill this form via the HTTP_Post command:

Code:
dll_handle = dll_open("GSHTTP.dll");
wait(1);
HTTP_Create(0);
wait(1);
while(HTTP_IsWorking(0)==1) {
waitt (16);
}
if (HTTP_Create(0)==0) {
HTTP_Post(0,"http://here's the URL/upload.php",poster2);}
HTTP_Free(0);
dll_close(dll_handle);



but no way, the file (path stored in poster2, no error there) simply doesn't get uploaded. what's wrong with it?

Page 1 of 4 1 2 3 4

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1