Click here to get back home

Send current htlm page as email

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Send current htlm page as email damezumari 06-04-2008
Get Chitika Premium
Posted by damezumari on June 4, 2008, 9:17 am
Please log in for more thread options
How do I let the user send the current html page they are on as the
message in an email?

I know how to send emails with php, but not how I let the current page
be the message.

I want to do this with code instead of asking the user to click menu
options in his browser.

Kind regards,

Jan Nordgreen

Posted by Janwillem Borleffs on June 4, 2008, 9:27 am
Please log in for more thread options
damezumari schreef:
> How do I let the user send the current html page they are on as the
> message in an email?
>
> I know how to send emails with php, but not how I let the current page
> be the message.
>
> I want to do this with code instead of asking the user to click menu
> options in his browser.
>

The simplest solution would be to send a "See this page: <link>"
message. Any specific reason why you would need more?


JW

Posted by Captain Paralytic on June 4, 2008, 9:48 am
Please log in for more thread options
> The simplest solution would be to send a "See this page: <link>"
> message. Any specific reason why you would need more?
>
> JW

Depending on how dynamic the page is, by the time the link is viewed,
the contents may be different.

Posted by Captain Paralytic on June 4, 2008, 9:29 am
Please log in for more thread options
> How do I let the user send the current html page they are on as the
> message in an email?
>
> I know how to send emails with php, but not how I let the current page
> be the message.
>
> I want to do this with code instead of asking the user to click menu
> options in his browser.
>
> Kind regards,
>
> Jan Nordgreen

Capture the output in a buffer (see ob_start and its associated
functions) and use that in the email.

Posted by Peter H. Coffin on June 4, 2008, 9:32 am
Please log in for more thread options
On Wed, 4 Jun 2008 06:17:35 -0700 (PDT), damezumari wrote:
> How do I let the user send the current html page they are on as the
> message in an email?
>
> I know how to send emails with php, but not how I let the current page
> be the message.
>
> I want to do this with code instead of asking the user to click menu
> options in his browser.

Maybe wrap it in a system call than runs the CLI version of php for the
same script and redirects to a file that you then load as the body of
email? I haven't spent a lot of time thinking about it, but it's not
something I'd expect PHP to be able to handle all by itself because php
doesn't have any concept of "page" all by itself.

--
42. When I capture the hero, I will make sure I also get his dog, monkey,
ferret, or whatever sickeningly cute little animal capable of untying
ropes and filching keys happens to follow him around.
--Peter Anspach's list of things to do as an Evil Overlord

Similar ThreadsPosted
send contents of page in email November 15, 2007, 10:52 pm
automatically send entire page in an email June 9, 2008, 3:56 pm
send over thousand email, how to make php script as not email spam? March 24, 2006, 12:41 pm
send email address as a part of confirmation email October 11, 2007, 12:44 pm
Causes for $_SESSION to be only visible to current page? September 4, 2004, 11:05 am
Capture the current page(url) into a variable? May 21, 2007, 2:28 pm
random link form current page March 3, 2005, 1:21 am
very strange ... reloading doesn't get current version of page March 27, 2006, 9:15 am
Return current page and variables: $PHP_SELF dose not do it. June 8, 2006, 8:04 am
send email December 29, 2004, 4:21 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap