- NSIS Discussion
- inetc::post?
Archive: inetc::post?
phisuio
24th May 2007 17:48 UTC
inetc::post?
Hi,
I simply want to open this website: "www.example.com/index.php?username=$username"
so I am trying to do it using the inetc-component, this is my source:
...
inetc:: post "http://www.example.com/index.php?username=$username" "http://www.example.com/index.php?"
Pop $0
MessageBox MB_OK $0
The messagebox says: "connecting", but as I can see on the server, it doesn't work, when using "get" instead of "post" it gives the error message: "File Write Error", but it seems to work as I can see on the server.
So I need to make it say "OK" when it worked on the server, any idea?
Thanks!
Takhir
25th May 2007 07:08 UTC
Minimum parameters set for post and get:
inetc::post "my post string" URL PATH_FILE
inetc::get URL PATH_FILE
I don't know what means 'simply open'. If you want open browser window use ExecShell.
Afrow UK
25th May 2007 17:05 UTC
inetc::post "username=$username" "http://www.example.com/index.php" "$PLUGINSDIR\output.txt"
Stu
Takhir
25th May 2007 17:46 UTC
BTW 'post' example with nsi and php files included into inetc.zip
phisuio
25th May 2007 18:42 UTC
Hi,
thanks Afro UK and all others, I got it running now.
My source:
inetc::post "username=$username" "http://www.example.com/index.php" "$PLUGINSDIR\output.txt"
Pop $0
StrCmp $0 "OK" sdone
;Could not upload
Abort
sdone:
phisuio
25th May 2007 18:54 UTC
One additional question: Where do I need to place the /SILENT flag (to not display progress bar)? I tried this, but didn't work:
inetc:: post "username=$username" "http://www.example.com/index.php" /SILENT
Afrow UK
25th May 2007 19:08 UTC
Use after inetc::post and before any other parameters.
Stu
phisuio
25th May 2007 19:14 UTC
Hm, strange. It displays anyway and also shows an error (my error message: "URL Parts Error"), when using this code:
inetc:: post /SILENT "username=$username" "http://www.example.com/index.php"
or this:
inetc:: post SILENT "username=$username" "http://www.example.com/index.php"
Any idea?
Afrow UK
25th May 2007 19:26 UTC
Where has the local file parameter gone from your code?
Stu
phisuio
25th May 2007 19:48 UTC
Sorry, forgot to copy it:
inetc:: post SILENT "username=$username" "http://www.example.com/index.php" "$PLUGINSDIR\output.txt"
Takhir
26th May 2007 09:17 UTC
ugly, but so:
inetc::post "username=$username" /SILENT "http://www.example.com/index.php" "$PLUGINSDIR\output.txt"
phisuio
26th May 2007 11:35 UTC
Hi, yes this is working. Thanks a lot!