OK...maybe not "fun", but definitely interesting...
What would be the best way to grab a URL from the body of an email, dump it to whois, and then append the results to an email?
I see the biggest challenge as parsing the URL from the body of the email and dumping it to whois. Not only does the script have to find the url (look for "http://" perhaps?), but it has to take everything between http:// and the first slash. Otherwise, the whois tool wouldn't know what to do with a full URL such as http://www.example.com/path/to/something.htm.
The other issue I see is differentiating between HTML and plaintext emails. I guess the script would have to check for HREF tags first and if they exist look for http between the "<a href>" tags.
Also, I think it'd be ideal to only perform one whois per message. If multiple links exist within the body, there'd be a painful amount of whois data appended in the email.
I've been looking at the DNSBL script for insight, but I'm not experienced or talented enough with Pocoscript to figure this out.
Any thoughts on this? Unrealistic?