<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MG Data &#187; PHP Code Snippets</title>
	<atom:link href="http://www.mattgregg.com/category/php-code-snippets/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mattgregg.com</link>
	<description>Computers, Internet, SEO, Windows, Cycling, Food &#038; Nutrition</description>
	<lastBuildDate>Thu, 28 Jul 2011 03:14:11 +0000</lastBuildDate>
		<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP Wildcard Match in an Array</title>
		<link>http://www.mattgregg.com/php-wildcard-match-in-an-array.html</link>
		<comments>http://www.mattgregg.com/php-wildcard-match-in-an-array.html#comments</comments>
		<pubDate>Thu, 30 Nov 2006 09:33:08 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP Code Snippets]]></category>

		<guid isPermaLink="false">http://www.mattgregg.com/php-wildcard-match-in-an-array.html</guid>
		<description><![CDATA[I was working with a list of wildcard banned domain names (e.g. *.spamsite.com) stored in a database. I needed to compare a submitted domain (e.g. anything.spamsite.com) to the wildcard entries stored in the database.
Essentially then I need the function in_array to perform with a wildcard match with the wildcards being the array haystack not the needle.
In the [...]]]></description>
		<wfw:commentRss>http://www.mattgregg.com/php-wildcard-match-in-an-array.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress PHP Code Display</title>
		<link>http://www.mattgregg.com/wordpress-php-code-display.html</link>
		<comments>http://www.mattgregg.com/wordpress-php-code-display.html#comments</comments>
		<pubDate>Mon, 27 Nov 2006 22:14:13 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[PHP Code Snippets]]></category>

		<guid isPermaLink="false">http://www.mattgregg.com/wordpress-php-code-display.html</guid>
		<description><![CDATA[I was looking for a Wordpress plugin to display PHP code on my site. I found the following:
http://priyadi.net/archives/2005/09/27/wordpress-plugin-code-autoescape/ I tried this one but did not like it because it does not highlight the code and I could not seem to get it to work quite right, it kept adding &#8211;> to certain tags/areas&#8230; didn&#8217;t spend time [...]]]></description>
		<wfw:commentRss>http://www.mattgregg.com/wordpress-php-code-display.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get users IP address with PHP</title>
		<link>http://www.mattgregg.com/get-users-ip-address-with-php.html</link>
		<comments>http://www.mattgregg.com/get-users-ip-address-with-php.html#comments</comments>
		<pubDate>Mon, 27 Nov 2006 21:36:26 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[PHP Code Snippets]]></category>

		<guid isPermaLink="false">http://www.mattgregg.com/get-users-ip-address-with-php.html</guid>
		<description><![CDATA[I&#8217;ve found this script works best for getting the users IP address. Still spammers can mask their IP address from this.
$user_ip = $_SERVER['REMOTE_ADDR'];
if (trim($user_ip) == '') { $user_ip = $_SERVER['HTTP_CLIENT_IP']; }
if (trim($user_ip) == '') { $user_ip = $_SERVER['HTTP_X_FORWARDED_FOR']; }

order viagraorder cialis professionalorder viagra professionalorder cialis super activeorder viagra super activeorder tamiflubuy cialis professionalbuy brand viagrabuy [...]]]></description>
		<wfw:commentRss>http://www.mattgregg.com/get-users-ip-address-with-php.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

