Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

read/custom

 [1/9] from: jrdrp:blueyonder at: 2-Nov-2001 21:23


I am trying to use read/custom to automatically login thru an html web page form which requires post method. The html login form appears to have only 3 fields as follows:- User name html name=login Password html name=pass Submit button html name=submit to test from rebol console I am using print read/custom url ['post "string"] What format should string be? Just name=value pairs? i.e. "login=xxxx&pass=yyyy.." TIA John

 [2/9] from: jrdrp:blueyonder at: 3-Nov-2001 0:59


Further info - trying for example:- print read/custom url reduce ['post "login=xxx&pass=yyy] gives errror "Http/1.1 405 Method not allowed" Help! What exactly does this mean and how do I fix? John

 [3/9] from: sterling:rebol at: 2-Nov-2001 17:48


The URL that you are trying to read does not use POST. Thie either means that it is not a CGI script or the script does not support the POST method. Another possibility is, if yo uare running on your own server and scripts, that you have not properly configured the server to allow CGI POST. This looks like the more likely problem. If this is the case and you post what kind of server you use, I'd bet somebody here can help you with the settings. Sterling

 [4/9] from: jrdrp:blueyonder at: 3-Nov-2001 10:34


Sterling, URL looks like it's using Post - here is the relevant html code from web page:- <div align="center"> <form action="/cgi-bin/protect.pl" method="POST"> <table cellspacing="4" border="0" width="250" bgcolor="#CCCCFF"> <tr> <td width="40%"> <font size="2" face="Arial"><b>User name:</b></font> </td> <td width="60%"> <input type="text" name="login" size="20" maxlength="20"> </td> </tr> <tr> <td width="40%"> <font size="2" face="Arial"><b>Password:</b></font> </td> <td width="60%"> <input type="password" name="pass" size="20" maxlength="20"> </td> </tr> <tr> <td width="40%">&nbsp; </td> <td width="60%"> <input type="submit" value="Login" name="submit"> </td> </tr> </table> <div align="left"></div> <div align="left"></div> <div align="left"></div> </form> </div> I am just running rebol on standalone PC using W95 OSR accessing internet via standard dialup ISP service. Thanks John

 [5/9] from: sterling:rebol at: 5-Nov-2001 10:12


Well, courtesy of another user who doesn't have access to this list right now, his comment is that the site may be using cookies. If it requires that you send the cookie back, it may well respond with this kind of error. Can you verify that the site is or is not using cookies for this page? Also, if you set: trace/net on in REBOL, you will see if REBOL is sending the post data correctly on your request. Sterling
> Sterling, > > URL looks like it's using Post - here is the relevant html code from web > page:-
<html cut out>

 [6/9] from: jrdrp:blueyonder at: 5-Nov-2001 22:19


Pretty sure site is not using cookies. Disabled cookies in IE5 and cleaned off cookie files and have no problem logging in to page via IE5 manually. Tried net/trace on which gives following output:-
>> webpage: read/custom x [POST "login=xxxxx&pass=yyyyyyy&submit=Login"]
URL Parse: none none www.amibroker.com none none login.html Net-log: ["Opening" "tcp" "for" "HTTP"] Net-log: {POST /login.html HTTP/1.0 Accept: */* Connection: close User-Agent: REBOL 1.2.1.3.1 Host: www.amibroker.com Referer: http://www.amibroker.com/login.html Content-Type: application/x-www-form-urlencoded Content-Length: 37 } Net-log: "HTTP/1.1 405 Method Not Allowed" ** User Error: Error. Target url: http://www.amibroker.com/login.html could not be retrieved. Server response: HTTP/1.1 405 Method Not Allowed ** Near: webpage: read/custom x [POST login=xxxxx&pass=yyyyyyy&submit=Login ] John

 [7/9] from: gschwarz:netconnect:au at: 6-Nov-2001 10:07


Cookies could be a thing of the past if the European Parliament has their way. http://it.mycareer.com.au/breaking/2001/11/05/FFXPBL64NTC.html?NDailyH Regards, Greg

 [8/9] from: sterling:rebol at: 5-Nov-2001 15:53


Aha!! You're not reading the right URL. I should have noticed that when you posted the HTML code. You need to be reading the CGI script that the form uses, not the login page. x: http://www.amibroker.com/cgi-bin/protect.pl and try again. Sterling

 [9/9] from: tomc:darkwing:uoregon at: 5-Nov-2001 17:07


Greg, Sterling ... just guessing but a few other header fields the cgi may check... Host: www.amibroker.com Referer: http://www.amibroker.com/login.html you could also put something non-threatening in the agent field User-Agent: Mozilla/5.0 (Windows 98; U) Opera 5.11 [en]