The problem: I'm creating an autosubmit script for a user to sign up for multiple advertising options. Most of the sites have image verification, and currently I use perl to retrieve the image, display it in the browser, and have the user complete the image verification himself to abide by the robot rules. Most sites have been trivial with the use of AJAX and Mechanize. However, one site uses the src for the image as a .php file. Most image verification files are simply jpgs that when refreshed simply muddle up the same text in a different way. But the php file obviously continually changes. So I need the file to appear on my page (which I have been doing with saving the page, pattern matching the picture, and sending back the picture address).
Proposed Solution #1 (didn't work): Print out the image, and add a while loop that sleeps until the ajax creates the file that has the user input. -> Script never prints, and is affected by the "forever" loop.
Proposed Solution #2 (50% working): Print out the image, and add a userprompt in perl. -> Prints the image fine, but of course, the userprompt doesn't flow through to HTML or JS. I could see this working if perl had a function that allowed the userprompt to flow through straight to a JS alert.
If anyone can help me out I would really appreciate it. I can send some sample code if it would help, but I think its pretty straight forward
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.