Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 24th May 2007, 16:48   #1
phisuio
Junior Member
 
Join Date: May 2007
Posts: 26
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!
phisuio is offline   Reply With Quote
Old 25th May 2007, 06:08   #2
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
Minimum parameters set for post and get:
code:
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.
Takhir is offline   Reply With Quote
Old 25th May 2007, 16:05   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
code:

inetc::post "username=$username" "http://www.example.com/index.php" "$PLUGINSDIR\output.txt"



Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 25th May 2007, 16:46   #4
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
BTW 'post' example with nsi and php files included into inetc.zip
Takhir is offline   Reply With Quote
Old 25th May 2007, 17:42   #5
phisuio
Junior Member
 
Join Date: May 2007
Posts: 26
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 is offline   Reply With Quote
Old 25th May 2007, 17:54   #6
phisuio
Junior Member
 
Join Date: May 2007
Posts: 26
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 is offline   Reply With Quote
Old 25th May 2007, 18:08   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
Use after inetc::post and before any other parameters.

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 25th May 2007, 18:14   #8
phisuio
Junior Member
 
Join Date: May 2007
Posts: 26
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 is offline   Reply With Quote
Old 25th May 2007, 18:26   #9
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
Where has the local file parameter gone from your code?

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 25th May 2007, 18:48   #10
phisuio
Junior Member
 
Join Date: May 2007
Posts: 26
Sorry, forgot to copy it:

inetc:: post SILENT "username=$username" "http://www.example.com/index.php" "$PLUGINSDIR\output.txt"
phisuio is offline   Reply With Quote
Old 26th May 2007, 08:17   #11
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
ugly, but so:
code:
inetc:ost "username=$username" /SILENT "http://www.example.com/index.php" "$PLUGINSDIR\output.txt"
Takhir is offline   Reply With Quote
Old 26th May 2007, 10:35   #12
phisuio
Junior Member
 
Join Date: May 2007
Posts: 26
Hi, yes this is working. Thanks a lot!
phisuio is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump