<?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>bradym.net &#187; PHP</title>
	<atom:link href="http://bradym.net/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://bradym.net</link>
	<description>Random thoughts of a Code Monkey</description>
	<lastBuildDate>Sun, 11 Oct 2009 22:39:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating iCalendar (ics) files with PHP</title>
		<link>http://bradym.net/php/creating-icalendar-ics-files-with-php</link>
		<comments>http://bradym.net/php/creating-icalendar-ics-files-with-php#comments</comments>
		<pubDate>Sat, 15 Aug 2009 08:00:59 +0000</pubDate>
		<dc:creator>bradym</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[iCalendar]]></category>
		<category><![CDATA[ics]]></category>

		<guid isPermaLink="false">http://bradym.net/php/creating-icalendar-ics-files-with-php</guid>
		<description><![CDATA[This post was originally written several years ago and included my own attempt at building a very simple ical creator in PHP. I&#8217;ve been meaning to update this blog with some better code and information for quite some time. I finally found what I consider to be a very good class for creating iCalendar files [...]]]></description>
			<content:encoded><![CDATA[<p>This post was originally written several years ago and included my own attempt at building a very simple ical creator in PHP. I&#8217;ve been meaning to update this blog with some better code and information for quite some time. I finally found what I consider to be a very good class for creating iCalendar files using PHP: <a href="http://www.kigkonsult.se/iCalcreator/index.php">iCalcreator</a>. Along with creating iCalendar files, iCalcreator can also <a href="http://www.kigkonsult.se/iCalcreator/docs/using.html#parse_merge">parse and merge iCalendar files</a>, and spit out a modified version. There are lots of <a href="http://www.kigkonsult.se/downloads/index.php?#iCalcreator">examples available for download</a> on their site, as well as supporting utilities.</p>
<p>The <a href="http://www.kigkonsult.se/iCalcreator/docs/using.html">iCalcreator documentation</a> is excellent. The examples are easy to follow, and they clearly document how to use their class. Unfortunately, the iCalendar specification is complicated enough that you&#8217;ll still need to read rfc2445 to really take advantage of all of the options available to you. Some good iCalendar reference sites include:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/ICalendar">iCalendar &#8211; Wikipedia</a></li>
<li><a href="http://www.kanzaki.com/docs/ical/">iCalendar Specification Excerpts</a></li>
<li><a href="http://rfc.net/rfc2445.html">Entire iCalendar Specification (rfc2445)</a></li>
</ul>
<p>Since I haven&#8217;t actually built anything using iCalcreator yet (other than some quick test scripts earlier today) I can&#8217;t really answer any questions about its usage. The good news is they have a <a href="http://sourceforge.net/forum/?group_id=174828">forum on sourceforge</a> for questions. I&#8217;d love to hear about your experiences using iCalcreator, so feel free to leave your comments below.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbradym.net%2Fphp%2Fcreating-icalendar-ics-files-with-php';
  addthis_title  = 'Creating+iCalendar+%28ics%29+files+with+PHP';
  addthis_pub    = 'mydarb';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://bradym.net/php/creating-icalendar-ics-files-with-php/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Simple PHP Syntax Highlighting</title>
		<link>http://bradym.net/php/simple-php-syntax-highlighting</link>
		<comments>http://bradym.net/php/simple-php-syntax-highlighting#comments</comments>
		<pubDate>Mon, 20 Apr 2009 05:01:49 +0000</pubDate>
		<dc:creator>bradym</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://bradym.net/?p=93</guid>
		<description><![CDATA[One benefit to working as part of a development team is that you can ask your fellow developers to look at your code and ask for help. Sending code back and forth over email can be frustrating and even counter-productive. IMO, the ideal way to share code is by simply sending a URL and letting [...]]]></description>
			<content:encoded><![CDATA[<p>One benefit to working as part of a development team is that you can ask your fellow developers to look at your code and ask for help. Sending code back and forth over email can be frustrating and even counter-productive. IMO, the ideal way to share code is by simply sending a URL and letting the other developer view it in their browser with syntax highlighting.  Here&#8217;s one way that does not require any external libraries and is very easy to setup:</p>
<h2>Add this line to .htaccess</h2>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">RewriteRule</span> ^(.*)\.phps$ viewsource.php?file=$1.php [QSA,L]</pre></div></div>

<p>This rule sends all requests for files ending in .phps to the viewsource.php file with the path as an argument.</p>
<h2>Put the below script in the document root of your development server</h2>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// This script should *NEVER* be used on a production server!</span>
<span style="color: #666666; font-style: italic;">// By default, it will only run on localhost. If you want to run this script on</span>
<span style="color: #666666; font-style: italic;">// a staging server add the IP address of that server to $allowed_servers.</span>
<span style="color: #000088;">$allowed_servers</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'127.0.0.1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Set $base_dir to the root of your web directory.</span>
<span style="color: #000088;">$base_dir</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'DOCUMENT_ROOT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Make sure this script is running on an allowed server.</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">in_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SERVER_ADDR'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$allowed_servers</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Do not run this script in production!'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Exit if no file was specified</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'file'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'No file specified.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Ensure the requested file is inside $base_dir and that it exists</span>
<span style="color: #000088;">$real_path</span> <span style="color: #339933;">=</span> <span style="color: #990000;">realpath</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$base_dir</span><span style="color: #339933;">.</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'file'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$real_path</span><span style="color: #339933;">,</span> <span style="color: #000088;">$base_dir</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$real_path</span> <span style="color: #339933;">===</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Access denied or file not found.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span> <span style="color: #000088;">$real_path</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
    .num_margin {
        text-align: right;
        margin-right: 6pt;
        padding-right: 6pt;
        border-right: 1px solid gray;
    }
    .num_margin a {
        color: gray;
        font-size: 13px;
        font-family: monospace;
    }
    body { margin: 0px; margin-left: 5px; }
    div { float: left; }
&lt;/style&gt;
&nbsp;
&lt;/head&gt;
&lt;body&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$lines</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$lines_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">range</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$real_path</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lines_array</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$line</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$lines</span> <span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;a href=\&amp;quot;#<span style="color: #006699; font-weight: bold;">$line</span>\&amp;quot; name=\&amp;quot;<span style="color: #006699; font-weight: bold;">$line</span>\&amp;quot;&gt;<span style="color: #006699; font-weight: bold;">$line</span>&lt;/a&gt;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">highlight_file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$real_path</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;div&gt;&lt;div class=<span style="color: #000099; font-weight: bold;">\&quot;</span>num_margin<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #006699; font-weight: bold;">$lines</span>&lt;/div&gt;&lt;div&gt;<span style="color: #006699; font-weight: bold;">$content</span>&lt;/div&gt;&lt;/div&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<p>Now when you visit a link like: http://localhost/info.phps it will show the source of the file.  </p>
<p><strong><em>Note:  This script should never be used in production!</em></strong></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbradym.net%2Fphp%2Fsimple-php-syntax-highlighting';
  addthis_title  = 'Simple+PHP+Syntax+Highlighting';
  addthis_pub    = 'mydarb';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://bradym.net/php/simple-php-syntax-highlighting/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup Xdebug on OS X Leopard</title>
		<link>http://bradym.net/php/setup-xdebug-on-os-x</link>
		<comments>http://bradym.net/php/setup-xdebug-on-os-x#comments</comments>
		<pubDate>Thu, 26 Feb 2009 07:59:17 +0000</pubDate>
		<dc:creator>bradym</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://bradym.net/?p=79</guid>
		<description><![CDATA[Note: If you&#8217;re using Leopard, the directions below are for you. If you&#8217;re using Snow Leopard, just follow the directions provided at xdebug.org.
Most of the blog posts I&#8217;ve seen about getting Xdebug working on OS X insist that you must use MAMP or XAMPP to do so. But since PHP and Apache come included with [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Note:</strong> If you&#8217;re using Leopard, the directions below are for you. If you&#8217;re using Snow Leopard, just follow the directions provided at <a href="http://xdebug.org/docs/install">xdebug.org</a>.</p>
<p>Most of the blog posts I&#8217;ve seen about getting <a href="http://xdebug.org/">Xdebug</a> working on OS X insist that you must use <a href="http://www.mamp.info/">MAMP</a> or <a href="http://xampp.org">XAMPP</a> to do so. But since <a href="http://php.net">PHP</a> and <a href="http://httpd.apache.org">Apache</a> come included with OS X, it seems like overkill to use one of those packages. </p>
<p>Contrary to popular belief, it is possible to get Xdebug working with the OS X standard Apache/PHP installation. Here&#8217;s how I did it:</p>
<ol>
<li><a href="http://xdebug.org/download.php">Download Xdebug source</a></li>
<li>Extract the xdebug tarball</li>
<li>cd into the xdebug directory</li>
<li>Run: phpize</li>
<li>Run: MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=&#8221;-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp&#8221; CCFLAGS=&#8221;-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe&#8221; CXXFLAGS=&#8221;-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe&#8221; LDFLAGS=&#8221;-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load&#8221; ./configure &#8211;enable-xdebug
<li>Run: make</li>
<li>cp modules/xdebug.so /usr/lib/php/extensions/no-debug-non-zts-20060613 (note: your path may be slightly different)</li>
<li>add the following line to php.ini: zend_extension=&#8221;/usr/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so&#8221;</li>
<li>Run: sudo apachectl restart</li>
<li>Write a PHP page that calls &#8220;phpinfo();&#8221; Load it in a browser and look for the info on the xdebug module.  If you see it, you have been successful!</li>
</ol>
<p>This is simply a modified version of the README file that comes with the xdebug source. The most important tweak is step 5, which sets the correct flags for the resulting module to work with Apache as it is compiled in OS X.</p>
<p>Note: If you&#8217;re currently using another debugger, you will need to disable it before Xdebug will work. </p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbradym.net%2Fphp%2Fsetup-xdebug-on-os-x';
  addthis_title  = 'Setup+Xdebug+on+OS+X+Leopard';
  addthis_pub    = 'mydarb';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://bradym.net/php/setup-xdebug-on-os-x/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Geocoding with PHP</title>
		<link>http://bradym.net/php/geocoding-with-php</link>
		<comments>http://bradym.net/php/geocoding-with-php#comments</comments>
		<pubDate>Wed, 25 Feb 2009 07:35:03 +0000</pubDate>
		<dc:creator>bradym</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://bradym.net/?p=65</guid>
		<description><![CDATA[In my last post I mentioned geocoding using the Yahoo Geocoding API, so I thought I&#8217;d post some code to do exactly that.
For the purposes of this example, assume that we have a very simple MySQL database table with this structure:

CREATE TABLE `addresses` &#40;
	`id` int&#40;11&#41; NOT NULL auto_increment,
	`street` varchar&#40;255&#41; default NULL,
	`city` varchar&#40;255&#41; default NULL,
	`state` varchar&#40;2&#41; [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://bradym.net/php/http_build_query-and-arg_separator_output">last post</a> I mentioned geocoding using the <a href="http://developer.yahoo.com/maps/rest/V1/geocode.html">Yahoo Geocoding API</a>, so I thought I&#8217;d post some code to do exactly that.</p>
<p>For the purposes of this example, assume that we have a very simple MySQL database table with this structure:</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: #008000;">`addresses`</span> <span style="color: #FF00FF;">&#40;</span>
	<span style="color: #008000;">`id`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">11</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #CC0099; font-weight: bold;">NOT</span> <span style="color: #9900FF; font-weight: bold;">NULL</span> <span style="color: #FF9900; font-weight: bold;">auto_increment</span><span style="color: #000033;">,</span>
	<span style="color: #008000;">`street`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">255</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">default</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
	<span style="color: #008000;">`city`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">255</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">default</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
	<span style="color: #008000;">`state`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">2</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">default</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
	<span style="color: #008000;">`zip`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">9</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">default</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
	<span style="color: #008000;">`lat`</span> <span style="color: #999900; font-weight: bold;">float</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">10</span><span style="color: #000033;">,</span><span style="color: #008080;">6</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">default</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
	<span style="color: #008000;">`lon`</span> <span style="color: #999900; font-weight: bold;">float</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008080;">10</span><span style="color: #000033;">,</span><span style="color: #008080;">6</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">default</span> <span style="color: #9900FF; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
	<span style="color: #990099; font-weight: bold;">PRIMARY KEY</span>  <span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">`id`</span><span style="color: #FF00FF;">&#41;</span>
<span style="color: #FF00FF;">&#41;</span></pre></div></div>

<p>Here&#8217;s the script:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// Geocode addresses using the Yahoo Geocoding API</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Turning on track_errors stores the latest PHP error in $php_errormsg.</span>
<span style="color: #666666; font-style: italic;">// This allows for more elegant display of the error messages without having to</span>
<span style="color: #666666; font-style: italic;">// code a php error handler, which would be overkill for such a simple script.</span>
<span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'track_errors'</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'localhost'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'user'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'password'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">mysql_select_db</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'database_name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Setup variables to be used later</span>
<span style="color: #000088;">$geocode_url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://local.yahooapis.com/MapsService/V1/geocode&quot;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Enter your custom appid here</span>
<span style="color: #000088;">$appid</span> <span style="color: #339933;">=</span><span style="color: #0000ff;">'sample_appid'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Get the addresses that have not been geocoded</span>
<span style="color: #000088;">$address_result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT id, street, city, state, zip FROM addresses WHERE lat IS NULL OR lon IS NULL&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// If the MySQL query returned any rows, loop through them</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_num_rows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$address_result</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_assoc</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$address_result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// appid is required for each call to the yahoo geocode API</span>
        <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'appid'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$appid</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// output can be either xml or php</span>
        <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'output'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'php'</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Store the row id for updating the database and remove from $row array</span>
        <span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Build the query string for sending the request to yahoo</span>
        <span style="color: #000088;">$query_string</span> <span style="color: #339933;">=</span> <span style="color: #990000;">http_build_query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&amp;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Get latitute / longitude</span>
        <span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$geocode_url</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'?'</span><span style="color: #339933;">.</span><span style="color: #000088;">$query_string</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #666666; font-style: italic;">// If the call to the yahoo api failed, display an error message</span>
            <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'ERROR: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$php_errormsg</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
            <span style="color: #666666; font-style: italic;">// Get the results of the api call and update the database records</span>
            <span style="color: #000088;">$response_array</span> <span style="color: #339933;">=</span> <span style="color: #990000;">unserialize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$lat</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response_array</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'ResultSet'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Result'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Latitude'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$lon</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_real_escape_string</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response_array</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'ResultSet'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Result'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Longitude'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$update_result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;UPDATE addresses SET lat = '<span style="color: #006699; font-weight: bold;">$lat</span>', lon = <span style="color: #006699; font-weight: bold;">$lon</span> WHERE id = <span style="color: #006699; font-weight: bold;">$id</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// For each record, let the user know if the update was successful. If not, display the mysql error message generated.</span>
            <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$update_result</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Added lattitude and longitude for <span style="color: #006699; font-weight: bold;">{$row['street']}</span> <span style="color: #006699; font-weight: bold;">{$row['city']}</span>, <span style="color: #006699; font-weight: bold;">{$row['state']}</span> <span style="color: #006699; font-weight: bold;">{$row['zip']}</span>.&quot;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
                <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Unable to add lattitude and longitude for <span style="color: #006699; font-weight: bold;">{$row['street']}</span> <span style="color: #006699; font-weight: bold;">{$row['city']}</span>, <span style="color: #006699; font-weight: bold;">{$row['state']}</span> <span style="color: #006699; font-weight: bold;">{$row['zip']}</span>
                      MySQL Error: &quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;br /&gt;'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Nothing to do.&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>The code is documented pretty well so I&#8217;ll just point out a couple things</p>
<ul>
<li>The Yahoo Geocoding API can return either XML or PHP serialized objects. I chose PHP serialized objects because it&#8217;s easier to deal with for what I&#8217;m trying to do.</li>
<li>http_build_query does not exist in PHP4. To use this code with PHP4 you could use the <a href="http://pear.php.net/package/PHP_Compat">PHP_COMPAT Pear Package</a> or the http_build_query function from the <a href="http://www.codeigniter.com">CodeIgniter</a> <a href="http://codeigniter.com/user_guide/helpers/compatibility_helper.html">Compatibility Helper</a>.</li>
</ul>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbradym.net%2Fphp%2Fgeocoding-with-php';
  addthis_title  = 'Geocoding+with+PHP';
  addthis_pub    = 'mydarb';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://bradym.net/php/geocoding-with-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>http_build_query() and arg_separator.output</title>
		<link>http://bradym.net/php/http_build_query-and-arg_separator_output</link>
		<comments>http://bradym.net/php/http_build_query-and-arg_separator_output#comments</comments>
		<pubDate>Fri, 26 Sep 2008 06:40:41 +0000</pubDate>
		<dc:creator>bradym</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://bradym.net/?p=33</guid>
		<description><![CDATA[The other day I was using http_build_query to generate URLs to use with the Yahoo Geocoding API and kept getting back a &#8220;400 Bad Request&#8221; error back from Yahoo. The URLs were being echo&#8217;ed and looked fine, I could copy the URL and paste it in the browser address bar and get the results I [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I was using <a href="http://php.net/http_build_query">http_build_query</a> to generate URLs to use with the <a href="http://developer.yahoo.com/maps/rest/V1/geocode.html">Yahoo Geocoding API</a> and kept getting back a &#8220;400 Bad Request&#8221; error back from Yahoo. The URLs were being <a href="http://php.net/echo">echo&#8217;</a>ed and looked fine, I could copy the URL and paste it in the browser address bar and get the results I was looking for.</p>
<p>When I finally viewed the source I saw that the urls were being created with &amp;amp; as the separator for the variables in the query string instead of &amp;. That explained why the url looked fine when it wsa echo&#8217;ed but didn&#8217;t work when executed.</p>
<p>This is where <a href="http://php.net/manual/en/ini.core.php#ini.arg-separator.output">arg_separator.output</a> comes in. This setting in php.ini determines what character(s) are used when generating URLs using the built in PHP functions. So to get my code working, I just needed to change the value to just an &amp;:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'arg_separator.output'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&amp;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I just wish it hadn&#8217;t taken me so long to figure that out!</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbradym.net%2Fphp%2Fhttp_build_query-and-arg_separator_output';
  addthis_title  = 'http_build_query%28%29+and+arg_separator.output';
  addthis_pub    = 'mydarb';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://bradym.net/php/http_build_query-and-arg_separator_output/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Canonical redirect on IIS using PHP</title>
		<link>http://bradym.net/php/canonical-redirect-iis</link>
		<comments>http://bradym.net/php/canonical-redirect-iis#comments</comments>
		<pubDate>Thu, 04 Sep 2008 04:37:49 +0000</pubDate>
		<dc:creator>bradym</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://bradym.net/?p=19</guid>
		<description><![CDATA[According to the seo experts of the world, it is good practice to force your website to always use the same domain. So, instead of having your site work at both www.example.com and example.com, choose one. Once you&#8217;ve chosen which form of your site to use, it&#8217;s time to setup 301 redirects to enforce that.
If [...]]]></description>
			<content:encoded><![CDATA[<p>According to the <a href="http://www.mattcutts.com/blog/seo-advice-url-canonicalization/">seo experts</a> of the world, it is good practice to force your website to always use the same domain. So, instead of having your site work at both www.example.com and example.com, choose one. Once you&#8217;ve chosen which form of your site to use, it&#8217;s time to setup 301 redirects to enforce that.</p>
<p>If you&#8217;re using Apache, it&#8217;s very easy, just add a quick mod_rewrite rule. You can <a href="http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html#require-no-www-in-htaccess">remove the www</a> or <a href="http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html#require-the-www-in-htaccess">force the use of www</a>. But since IIS doesn&#8217;t use .htaccess files, it takes a little more effort.</p>
<p><strong>Create a php.ini with the following content and upload it to your site root</strong></p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>php<span style="">&#93;</span></span>
cgi.force_redirect <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> 0</span>
<span style="color: #000099;">auto_prepend_file</span> <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> C:\php_includes\canonical.php</span></pre></div></div>

<p>Keep in mind that you&#8217;ll need to change the file path to reflect the setup of your server.</p>
<p><strong>Upload canonical.php with the following contents</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php
<span style="color: #666666; font-style: italic;">// Any directory index filenames should go in here with a leading /</span>
<span style="color: #666666; font-style: italic;">// This is removed when doing the redirect in order to maintain consistency,</span>
<span style="color: #666666; font-style: italic;">// without this, when visiting example.com you would be redirected to www.example.com/index.htm</span>
<span style="color: #000088;">$index_files</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/index.htm'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'/index.html'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'/index.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// The rewrite only kicks in if the host does not begin with www. and the code is not running</span>
<span style="color: #666666; font-style: italic;">// on localhost. When developing a site I setup dev.example.com on my dev machine and use</span>
<span style="color: #666666; font-style: italic;">// the same code as is on the live server, so I don't want to be redirected if I'm</span>
<span style="color: #666666; font-style: italic;">// accessing the code locally.</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_HOST'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #0000ff;">'www.'</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'LOCAL_ADDR'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">!==</span> <span style="color: #0000ff;">'127.0.0.1'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://www.'</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_HOST'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$index_files</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PATH_INFO'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">header</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'HTTP/1.1 301 Moved Permanently'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location: <span style="color: #006699; font-weight: bold;">$url</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Notes:</p>
<ul>
<li>This method assumes that you don&#8217;t have access to modify the server settings, ie: shared windows hosting. If you are able to modify how IIS is setup I&#8217;m sure there&#8217;s a better way to do this.</li>
<li>When PHP is run as a cgi, you can overwrite the php.ini settings by putting a php.ini in the site root. So if your windows host is not running php as a cgi, this won’t work. I think that php is always run as a cgi on IIS, but I could be wrong.</li>
<li>This will only work if the site is using PHP – if you have a completely static site this won&#8217;t help you. In order to use this with a static site, you&#8217;d have to change the server settings to treat your html files as php files.</li>
</ul>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbradym.net%2Fphp%2Fcanonical-redirect-iis';
  addthis_title  = 'Canonical+redirect+on+IIS+using+PHP';
  addthis_pub    = 'mydarb';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://bradym.net/php/canonical-redirect-iis/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opera friendly PHP redirect</title>
		<link>http://bradym.net/php/opera-friendly-php-redirect</link>
		<comments>http://bradym.net/php/opera-friendly-php-redirect#comments</comments>
		<pubDate>Thu, 03 Jan 2008 03:23:09 +0000</pubDate>
		<dc:creator>bradym</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Opera]]></category>

		<guid isPermaLink="false">http://bradym.net/php/opera-friendly-php-redirect</guid>
		<description><![CDATA[Opera can&#8217;t handle a redirect to a URL that ends in an anchor. I found this out trying to use the PHP header() function.
From what little I was able to find using Google on the topic, it appears that Opera won&#8217;t redirect a user to the page they just came from, it must be a [...]]]></description>
			<content:encoded><![CDATA[<p>Opera can&#8217;t handle a redirect to a URL that ends in an anchor. I found this out trying to use the PHP header() function.</p>
<p>From what little I was able to find using Google on the topic, it appears that Opera won&#8217;t redirect a user to the page they just came from, it must be a different URI.</p>
<p>To get around this in php, here&#8217;s what I did:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Location: file.php?value1=12&amp;amp;value2=43&amp;amp;r='</span><span style="color: #339933;">.</span><span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'#anchorName'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Having the random number from rand() makes the page unique, and the redirect works as expected.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbradym.net%2Fphp%2Fopera-friendly-php-redirect';
  addthis_title  = 'Opera+friendly+PHP+redirect';
  addthis_pub    = 'mydarb';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://bradym.net/php/opera-friendly-php-redirect/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
