<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Sending spam e-mail using a simple PHP method.</title>
	<atom:link href="http://smalltowngeeks.net/2010/05/19/sending-spam-e-mail-using-a-simple-php-method/feed/" rel="self" type="application/rss+xml" />
	<link>http://smalltowngeeks.net/2010/05/19/sending-spam-e-mail-using-a-simple-php-method/</link>
	<description>Tech News, How to&#039;s, and Reviews</description>
	<lastBuildDate>Mon, 09 Apr 2012 17:29:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: gilsal</title>
		<link>http://smalltowngeeks.net/2010/05/19/sending-spam-e-mail-using-a-simple-php-method/comment-page-1/#comment-1875</link>
		<dc:creator>gilsal</dc:creator>
		<pubDate>Tue, 14 Sep 2010 11:55:19 +0000</pubDate>
		<guid isPermaLink="false">http://smalltowngeeks.net/?p=474#comment-1875</guid>
		<description>Hey, saw this blog and figured I&#039;d toss this in your direction incase anyone ever needs to place simple security on their php scripts. Latest version of php, if I am not mistaken have some built in functions to counter sql injection for &quot;froce brute&quot; hacking. As for added security this snippet will remove all lines that resemble code or tags. 

strip_tags($_POST[&#039;name&#039;]); 

This is easy way of dis allowing users to be able to create formatting code or sql injections, but what if you should want the user to be able to implement formatting as this.

Hello all,

Small Town Geeks is a great tech/blog site!

- Gil

Then you will need this in your code. $message = nl2br(strip_tags($_POST[&#039;message&#039;]));

The nl2br keeps the formatting and replaces them with html  tags. Again strip_tags is still used to prevent hard code and sql injection. 

Both these methods add just a little more user support and security. Of course like always never one way to implement security. 

Side note if you do intend to make a spam email as to harass friends and coworkers (*Caution not always safe for work*) be sure to include a counter and decrement or increment depending on your setup. I seem to remember someone create this same function and forgetting to add a decrementing counter and flooded one user and a mail server with 400 email in under 30 seconds. 

Anyways keep up the great work!</description>
		<content:encoded><![CDATA[<p>Hey, saw this blog and figured I&#8217;d toss this in your direction incase anyone ever needs to place simple security on their php scripts. Latest version of php, if I am not mistaken have some built in functions to counter sql injection for &#8220;froce brute&#8221; hacking. As for added security this snippet will remove all lines that resemble code or tags. </p>
<p>strip_tags($_POST['name']); </p>
<p>This is easy way of dis allowing users to be able to create formatting code or sql injections, but what if you should want the user to be able to implement formatting as this.</p>
<p>Hello all,</p>
<p>Small Town Geeks is a great tech/blog site!</p>
<p>- Gil</p>
<p>Then you will need this in your code. $message = nl2br(strip_tags($_POST['message']));</p>
<p>The nl2br keeps the formatting and replaces them with html  tags. Again strip_tags is still used to prevent hard code and sql injection. </p>
<p>Both these methods add just a little more user support and security. Of course like always never one way to implement security. </p>
<p>Side note if you do intend to make a spam email as to harass friends and coworkers (*Caution not always safe for work*) be sure to include a counter and decrement or increment depending on your setup. I seem to remember someone create this same function and forgetting to add a decrementing counter and flooded one user and a mail server with 400 email in under 30 seconds. </p>
<p>Anyways keep up the great work!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

