tsidell
12-04-2008, 04:37 PM
<?php
$to = "James.Naismeth@nba.com";
$subject = "Some Ideas For Basketball";
$url = 'http://www.nba.com/thisweek/output.php';
$page = file_get_contents($url);
$body = $page;
if (mail($to, $subject, $body)) {
echo("<p><center>Message successfully sent!</center></p>");
} else {
echo("<p><center>Message delivery failed...</center></p>");
}
?>
Say I have this code above, it takes the source code of output.php and send its to me in an email. How do I create a .txt attachment of this source code and have that emailed to me instead.
Thanks.
$to = "James.Naismeth@nba.com";
$subject = "Some Ideas For Basketball";
$url = 'http://www.nba.com/thisweek/output.php';
$page = file_get_contents($url);
$body = $page;
if (mail($to, $subject, $body)) {
echo("<p><center>Message successfully sent!</center></p>");
} else {
echo("<p><center>Message delivery failed...</center></p>");
}
?>
Say I have this code above, it takes the source code of output.php and send its to me in an email. How do I create a .txt attachment of this source code and have that emailed to me instead.
Thanks.