Small snippet from me :) It mailed the URL that you've point on the form field. Have a try :) You can have a test in here: http://herm.czechian.net/url_mailer.php
By : hermawan
<?php /************************************************ * Snippet Name : URL Mailer * * Scripted By : Hermawan Haryanto * * Email : hermawan@codewalkers.com * * License : GPL (General Public License) * ***********************************************/
$url = trim($_POST["url"]); if ($url != "") { if (allow_url_fopen) { $message = file_get_contents ($url); } else { $message = "Your friend is trying to send you this page: $url \r\n"; $message.= "But the server is unable to deliver it for you."; } } else { $message = "No HTML to display."; }
$subject = "[URLMailer] ".stripslashes(trim($_POST["subject"])); if ($subject == "") $subject = "[URLMailer] No Subject";
$headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers.= "From: $from \r\n"; @mail ($to, $subject, $message, $headers); Header ("Location:".$_SERVER["PHP_SELF"]."?send=done"); exit(); } if ($_GET["send"] == "done") { $str = "<script language=\"JavaScript\">\n"; $str.= "alert('Email has been sent.!');\n"; $str.= "</script>\n"; print $str; } ?> <pre> <form method="post"> To (Name) : <input type="text" name="to_name" width="25"> To (Email): <input type="text" name="to_email" width="25"> From (Name) : <input type="text" name="from_name" width="25"> From (Email): <input type="text" name="from_email" width="25">
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.