Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to send get a URL of a page and send it?

Status
Not open for further replies.

bomayed

Technical User
May 13, 2002
101
0
0
AE
I want visitors to be able to send a page or an article from my site to their friend's. I need a script that will get the URL of the page they are currently viewing and send it to the e-mail address which they will specify.

Can any one help me find or create a script which does that?

I would really appreciate it . .

Thanks
 
you cannot do that with perl. u need javascript to get the url and post it along with the email address to your script...
 
In response to:
"you cannot do that with perl."
posted by alexandros

Please please please know what you're talking about before you make such a rediculous statement.
Whenever someone says "you cannot do that in perl", the red flag is raised. There's very little you can't do in perl.

Would like to know exactly what page you are visiting and put it in a link?

print <<EOF;
This page's address is
<a href='$ENV{REQUEST_URI}'>$ENV{REQUEST_URI}</a>
EOF

To include this in an e-mail wouldn't take much work - you'll probably want to use an e-mail module from CPAN and include a variation of that snippet above in the body of the message.

Have fun.

--jim

 
I thank you and appreciate both of your suggestions. I found a JavaScript that does what I want BUT , it doesn't send the link through my site. It sends the link through outlook because it's a javascript!

So I guess I will look for a cgi code which will send the link through my site.

Thanks coderifous for your clarification . . I'll search for that . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top