0 registered members (),
1,459
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
GS_HTTP/Peacekeeper-plugin
#97447
11/04/06 23:11
11/04/06 23:11
|
Joined: Jun 2005
Posts: 4,875
broozar
OP
Expert
|
OP
Expert
Joined: Jun 2005
Posts: 4,875
|
hi all, did anyone try this plugin? http://www.peacekeeper.com/3dgs/http.htmlit 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: Gordon]
#97449
11/05/06 10:02
11/05/06 10:02
|
Joined: Jun 2005
Posts: 4,875
broozar
OP
Expert
|
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]
#97456
11/08/06 20:31
11/08/06 20:31
|
Joined: Jun 2005
Posts: 4,875
broozar
OP
Expert
|
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?
|
|
|
|