Skip to content
⌘ NSIS Forum Archive

inetc::post?

12 posts

phisuio#

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#
Minimum parameters set for post and get:
inetc:😛ost "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#

inetc:😛ost "username=$username" "http://www.example.com/index.php" "$PLUGINSDIR\output.txt"
Stu
phisuio#
Hi,
thanks Afro UK and all others, I got it running now.
My source:
inetc:😛ost "username=$username" "http://www.example.com/index.php" "$PLUGINSDIR\output.txt"
Pop $0
StrCmp $0 "OK" sdone
;Could not upload
Abort
sdone:
phisuio#
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
phisuio#
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?
phisuio#
Sorry, forgot to copy it:

inetc:: post SILENT "username=$username" "http://www.example.com/index.php" "$PLUGINSDIR\output.txt"
Takhir#
ugly, but so:
inetc:😛ost "username=$username" /SILENT "http://www.example.com/index.php" "$PLUGINSDIR\output.txt"