- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- I need a perl or php script to extract all mail ad...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2005 03:38 AM
тАО05-29-2005 03:38 AM
I need a perl or php script to extract all mail addresses from a homepage, but I have to know which mail address is on which HTML site or on which perl or php site.
I can run this perl script on the webserver machine locally.
kind regards
chris
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2005 06:07 AM
тАО05-29-2005 06:07 AM
SolutionTry this on for size.
wget http://www.mysite.com/index.html
# Replace it with a local file, it doesn't matter.
cat index.html | grep "@" > secondary file.
Nnow you have extracted every line with an @ into a file.
You are now quite close.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-29-2005 09:16 PM
тАО05-29-2005 09:16 PM
Re: I need a perl or php script to extract all mail addresses
@Files_List contains list of files to be scanned through. you can also use File::Find module to traverse set of directories and get list of files.
#!/usr/bin/perl
foreach $file(@Files_List)
{
open(FH, "$file") || die "Cant open file";
while(
{
chomp($_);
#Following regular expression hopefully matches most of email id. only condition being that before the email id there should be atleast one space. it can match email id's containing alphanumeric, -, _ and .
if ($_ =~ m/\s*([-_.\w]+@[-_.\w]+)\s*.*$/g)
{
print ("->$file<- contains mail id ->$1<-\n");
}
}
}
Regards,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2005 11:29 PM
тАО05-30-2005 11:29 PM
Re: I need a perl or php script to extract all mail addresses
whether the above script is of help to you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2005 12:12 AM
тАО05-31-2005 12:12 AM
Re: I need a perl or php script to extract all mail addresses
Sorry I didn't check yet, have a lot of work now,
but I'll do next week and I'll report.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2005 12:16 AM
тАО05-31-2005 12:16 AM
Re: I need a perl or php script to extract all mail addresses
here's a schell script which does the same (and some more). It's a piece from a script I use to send people "personal" emails.
The file it reads is called "list" change it to what you want.
Hope it helps.
Cheerio,
Renarios
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2005 01:49 AM
тАО05-31-2005 01:49 AM