So your script is going to actually reside on the page that it reports? Use JShor's solution (minus the javascript) and replace the "message" value with the current page url, like so:
PHP Code:
<?php
if(isset($_POST['submit'])) {
$to = "someone@example.com";
$subject = "Page source";
$message = $_SERVER['SCRIPT_FILENAME'];
$from = "someonelse@example.com";
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "Mail successfully sent";
}
?>
<iframe src="blah blah" id="sourceFrame"></iframe>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input type="hidden" name="hidden" value="hidden">
<input type="submit" name="submit" value="Send Mail!">
</form>
Bookmarks