| View previous topic :: View next topic |
| Author |
Message |
kenneal Voice
Joined: 11 Mar 2007 Posts: 10
|
Posted: Sun Apr 29, 2007 2:31 pm Post subject: Eggdrop HTTP Post |
|
|
I've done a few website parsing scripts myself but I need help on the POST techniques.
This is the extracted form code
;;;;;;;;;;;;;;;;;;;;;;;;;;;started html code
<form method=POST onSubmit="openpage()" action=fetch.php enctype=multipart/form-data>
<table border=0 cellspacing=0 cellpadding=0 align=center>
<tr align=center>
<td align=center>
</td>
</tr>
<tr height=27 valign="bottom">
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td>
<font size=3 color=#ff6600>Enter your code</font>
<input type=text name=code size=30 value=OPwDA3NR2G >
</td>
<td valign="bottom">
<input type="submit" height=27 width=174 border=0 valign="bottom" value="Download">
;;;;;;;;;;;;;;;;;;;;;;;;end of html code
I am trying to make the eggdrop download the file automatically but first of all how can I go about POSTing to the fetch.php with the relevant input code "OPwDA3NR2G". |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Sun Apr 29, 2007 3:51 pm Post subject: |
|
|
Look at any of half of the webscripts I've done, many of them use POST. The xe currency script, iplocator.tcl, earthcal, and a script I made for DimeaDozen.com to create accounts automagically.
The dime script might be the better example of grabbing a piece of the html form, for resubmitting back into the form, although that is a commandline script, not strictly speaking an eggdrop script.. Not hard to convert to eggdrop tho, just change puts to puthelp's for showing output, and such. You can find that one here:
http://members.dandy.net/~fbn/dime-signup.tcl.txt
Basically all you're doing is using regexp to grab whatever data you need to feed into the form, and then using http::formatQuery to stuff it back with http::geturl -query $querydata
From looking at your html, formatQuery would be: code "OPwDA3NR2G" |
|
| Back to top |
|
 |
kenneal Voice
Joined: 11 Mar 2007 Posts: 10
|
Posted: Sun Apr 29, 2007 8:25 pm Post subject: |
|
|
Thanks, works like a gem Cheerios!  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|