[PHP] Including a URL for mailing..

2001-04-11 Thread Chad Day

What I'm trying to do is specify a URL in a form, and then take that URL,
put its contents into a variable, and mail it out in an e-mail message with
the body of the message being that URL.  I haven't gotten anywhere so far,
just getting blank messages for the body..   can anyone point me in the
right direction on saving the contents of a page to a variable?  I've ran
across a few examples, but nothing has worked for me yet. :(

Thanks,
Chad


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Including a URL for mailing..

2001-04-11 Thread Rodney J. Woodruff

What have you tried so far?

-- Rodney

Chad Day wrote:

 What I'm trying to do is specify a URL in a form, and then take that URL,
 put its contents into a variable, and mail it out in an e-mail message with
 the body of the message being that URL.  I haven't gotten anywhere so far,
 just getting blank messages for the body..   can anyone point me in the
 right direction on saving the contents of a page to a variable?  I've ran
 across a few examples, but nothing has worked for me yet. :(

 Thanks,
 Chad

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Including a URL for mailing..

2001-04-11 Thread Chad Day

Various things, but I finally hit upon something that worked.  Thanks
anyway.

Chad

-Original Message-
From: Rodney J. Woodruff [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 11, 2001 5:03 PM
To: Chad Day
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Including a URL for mailing..


What have you tried so far?

-- Rodney

Chad Day wrote:

 What I'm trying to do is specify a URL in a form, and then take that URL,
 put its contents into a variable, and mail it out in an e-mail message
with
 the body of the message being that URL.  I haven't gotten anywhere so far,
 just getting blank messages for the body..   can anyone point me in the
 right direction on saving the contents of a page to a variable?  I've ran
 across a few examples, but nothing has worked for me yet. :(

 Thanks,
 Chad

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Including a URL for mailing..

2001-04-11 Thread Brett

 What I'm trying to do is specify a URL in a form, and then take that URL,
 put its contents into a variable, and mail it out in an e-mail message
with
 the body of the message being that URL.  I haven't gotten anywhere so far,
 just getting blank messages for the body..   can anyone point me in the
 right direction on saving the contents of a page to a variable?  I've ran
 across a few examples, but nothing has worked for me yet. :(

 Thanks,
 Chad


try using output buffering.  In a php script put the following:

ob_start(); //everything following will be stored for output.

include 'your_page.php';

$body=ob_get_contents(); //store everything in output in $body variable

Then mail as usual.  Your page will be the $body variable.  If you want to
display the page as well use ob_end_flush().  If you just want to mail the
page use ob_end_clean() to clear the output buffering and continue scripting
for normal display.

check out http://www.php.net/manual/en/ref.outcontrol.php for more
information on output buffering.  If you are still stuck email me off list
and I will send you a sample of a file that does the same thing for me.

Brett


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]