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

[REBOL] [script] Re: Request for info via website

From: gjones05::mail::orion::org at: 5-Feb-2001 13:14

Hi, William, I'm no pro but this should get you started. if you are looking for a 'get request. 'Post requires a slight modification. a: b: c: d: 0 bump: func [ a-blk [block!] ] [ a: a + 1 if a > 9 [ a: 0 b: b + 1 if b > 9 [ b: 0 c: c + 1 if c > 9 [ c: 0 d: d + 1 ] ] ] ] e: copy "" while [e <> "9999"] [ e: rejoin [ (to-string d) (to-string c) (to-string b) (to-string a) ] page: read rejoin [http://www.thesite.dom/cgi-bin/mycgi.cgi?value= e] ; parse page to get info you are looking for bump [a b c d] ] You will need to find the URL for the form and modify the line that starts with 'page. There is a space after the equal sign and before the 'e. I have little doubt that the real maestro's could do better in fewer lines, but it should get you rolling. -- Scott ----- Original Message ----- From: "William" <[new_asia8--hotmail--com]> To: <[rebol-list--rebol--com]> Sent: Sunday, February 04, 2001 8:43 AM Subject: [REBOL] Request for info via website
> Dear everyone, > > I have just tried out Rebol and am amazed with the amazing stuff it can do
with just a few lines of programming. My intention is to programme a script that can automatically retrieve information from a website without me having to manually key in the query parameters. Basically, there is this web page allows users to search the dates a 4-digit number has appeared in the past draws. As I do not want to key in all 10000 permutations of 4-digit numbers. I like Rebol to loop and submit search requests automatically on this web page and save the returned results.
> I have browsed through the existing srcipts in the library but can't seem
to find/realise any that could help me with this. Anyone care to give your comments or advice on how I should embark on this project? Any comments is greatly appreciated.