[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgi-list
Subject:    RE: [CGI] E-mail to Webpage script!
From:       Kevin Meltzer <kevin.meltzer () commandsys ! com>
Date:       1998-11-23 19:39:04
[Download RAW message or body]

Hello,

Part of how to get the email to update itself on the site depends on what
his email is from (Exchange, sendmail on UNIX, qmail, etc..) that would
decide how the script would be written to read the email, format it for the
web, and create a page.

As for the part of a regex (not really algorithm) to make a line (well,
string) starting with http:// into a link, this should do it for you:
s/\b(http:\/\/\S*)\s/<A HREF=\"$1\"> /gi;

I tested this like:
$foo = "Hi, I want this
http://www.theadvocate.com/ap_redir.asp?url=http://wire.ap.org to be a
link";
$foo =~ s/\b(http:\/\/\S*)\s/<A HREF=\"$1\"> /gi;
print $foo;

And it worked fine. 

Cheers and HTH,
Kevin



> -----Original Message-----
> From: Daniel &Barbara Aufgang [mailto:aufgang@shemesh.co.il]
> Sent: Monday, November 23, 1998 12:28 PM
> To: cgi-list@jann.com
> Subject: [CGI] E-mail to Webpage script!
> 
> 
> Just when I thought I was able to do what I wanted in PERL, a 
> client came up
> with a problem that I am stumped with.
> 
> Once a day he gets an e-mail new like shown below.  He wants 
> it posted to his
> website automatically.  I need some sort of algorithm that 
> will take a word
> that starts with http://  and turn it into a link.  I also do 
> not know how to
> get the e-mail to update itself on the site.
> 
> Any ideas?
> 
> DA
> 
> 
> They get an e-mail with news updates:
> > The Advocate : Israel Cops Fear Christian Suicides <1>
> > 
> > 
> http://www.theadvocate.com/ap_redir.asp?url=http://wire.ap.org
> /?SLUG=ISRAEL%2dTEMPLE%2dMOUNT
> > 
> >  For best results use the latest versions of either of 
> these web browsers
> > AOL Members Older versions of the AOL browser don t 
> identify referring
> > servers so you may see this page repeatedly rather than 
> entering The WIRE
> > You can download a newer
> > 
> >                 ************************************
> > 
> >  : International News <1>
> > 
> > 
> http://www.telegraph.co.uk:80/et?ac=000140326706927&rtmo=lwPnP
SSt&atmo=0GKiKXXq&pg=/ixworld.html
> 
>  ISSUE 1277Monday 23 November 1998 PALESTINIAN security prisoners held
> by Israel began a hunger strike yesterday in protest at the refusal to
> free them under an interim peace deal TENS of thousands of Turks took
> to the streets yesterday in an
> 
>                 ************************************
> 
>  : Israel comienza retirada de tropas del margen ... <1>
> http://206.49.79.49/noticias/internacionales/html/retire.html
> 
>  © El Nuevo Día - Derechos Reservados 
> 
>                 ************************************
> 
> The Nando Times : Israel preparing for millennium-related violence,
suicides at
> Temple Mount <1>
> http://www2.nando.net/newsroom/ntn/world/112398/world1_20534_noframes.html
> 
>  Israel preparing for millennium-related violence suicides at Temple Mount
> Copyright &copy 1998 Nando Media Copyright &copy 1998 The Associated Press
> JERUSALEM November 23 1998 07 21 a m EST http www nandotimes com --
Israeli
> police are preparing
> 
>                 ************************************
-----------------------------------------------------------------
To unsubscribe, send mail to "majordomo@jann.com" with "unsubscribe
cgi-list"
in the body.

The CGI Tips & Tricks website (and archive of the list) is located
at http://www.jann.com/Perl/

cgi-list is hosted by Summit Communication Design
(http://www.summitdesign.net).

Summit Communication Design is a full-service web hosting firm
providing web design, cgi programming and inter/intra-net support.
-----------------------------------------------------------------
-----------------------------------------------------------------
To unsubscribe, send mail to "majordomo@jann.com" with "unsubscribe cgi-list"
in the body.

The CGI Tips & Tricks website (and archive of the list) is located
at http://www.jann.com/Perl/

cgi-list is hosted by Summit Communication Design (http://www.summitdesign.net).

Summit Communication Design is a full-service web hosting firm
providing web design, cgi programming and inter/intra-net support.
-----------------------------------------------------------------

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic