<?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>The How to site &#187; PHP</title>
	<atom:link href="http://www.bloggpro.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bloggpro.com</link>
	<description>Office tips, CSS, PHP, MySQL scripting and web publishing</description>
	<lastBuildDate>Wed, 28 Apr 2010 00:34:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Finding links to specific adress using xpath</title>
		<link>http://www.bloggpro.com/finding-links-to-specific-adress-using-xpath/</link>
		<comments>http://www.bloggpro.com/finding-links-to-specific-adress-using-xpath/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 10:38:17 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.bloggpro.com/?p=291</guid>
		<description><![CDATA[Xpath is apowerful method available in php to select specific elemts in the DOM structure of any xml document, and also html document. The code below can be used for example to check for back links, in a robust way. The code below allows for back links to any page or subpage on your domain, [...]]]></description>
			<content:encoded><![CDATA[<p>Xpath is apowerful method available in php to select specific elemts in the DOM structure of any xml document, and also html document. The code below can be used for example to check for back links, in a robust way. The code below allows for back links to any page or subpage on your domain, but can easily be changed to be more discriminating.<br />
<span id="more-291"></span></p>
<pre><span style="color: #008000;">$page = file_get_contents('http://www.pagetobechecked.com');
		$dom = new DOMDocument();
		@$dom-&gt;loadHTML($page);
		$xpath = new DOMXPath($dom);
		$hrefs = $xpath-&gt;evaluate("/html/body//a[substring(@href,1,25)='http://www.yourdomain.com']");
		</span><span style="color: #008000;">if($hrefs-&gt;length&gt;0) {$link_exists = true;} else {$link_exists = false;}</span><span style="color: #008000;">
}</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggpro.com/finding-links-to-specific-adress-using-xpath/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Google Maps plugin for wordpress</title>
		<link>http://www.bloggpro.com/simple-google-maps-plugin-for-wordpress/</link>
		<comments>http://www.bloggpro.com/simple-google-maps-plugin-for-wordpress/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 01:53:22 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.bloggpro.com/simple-google-maps-plugin-for-wordpress/</guid>
		<description><![CDATA[What is it?
This is a demo post for a little plugin I wrote that uses custom fields in Wordpress together with Google&#8217;s HTTP geo coding API and Google Maps to produce a map with a marker in the post. The current version (0.5) of the plugin takes the following custom keys and use them to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is it?</strong><br />
This is a demo post for a little plugin I wrote that uses custom fields in Wordpress together with Google&#8217;s HTTP geo coding API and Google Maps to produce a map with a marker in the post. The current version (0.5) of the plugin takes the following custom keys and use them to geocode the location (Zip, City, Address, Country) and also display them in the info window popup in the map. Keys marked with a * are required for the plugin to output the map.</p>
<ul class="inpost">
<li>Zip</li>
<li>City*</li>
<li>Address</li>
<li>Country*</li>
<li>Phone</li>
<li>Misc</li>
</ul>
<p><strong>Installation and useage<br />
</strong><span id="more-264"></span></p>
<ul class="inpost">
<li><a href="http://www.bloggpro.com/downloads/GMaps%20plugin">Download</a> the plugin file and upload it to your plugin directory.</li>
<li>Activate the plugin.</li>
<li>Go to <a href="http://code.google.com/apis/maps/signup.html">Google Maps API</a> and sign up for an API key.</li>
<li>Go to the <em>GMaps plugin configuration page</em> (in <em>Options</em>) and enter your API key (and select default Zoom level).</li>
<li>In your header.php template file, change <code>&lt;body&gt;</code> to <code>&lt;body onload="load()" onunload="GUnload()"&gt;</code>.</li>
<li>Make a new post.</li>
<li>Add at least the <em>City</em> and <em>Country</em> custom keys, and add the tag  <code>[ GMaps ]</code> (without extra spaces) where you want the map to render.</li>
<li>Done!</li>
</ul>
<p><strong>Download</strong></p>
<p><a href="http://www.bloggpro.com/downloads/GMaps%20plugin">GMaps plugin v0.5</a> (downloaded 379 times)</p>
<h2>Plugin output</h2>
<div id="map" style="width:400px;height:300px"></div>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggpro.com/simple-google-maps-plugin-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>PHPMailer : Language string failed to load: instantiate</title>
		<link>http://www.bloggpro.com/phpmailer-language-string-failed-to-load-instantiate/</link>
		<comments>http://www.bloggpro.com/phpmailer-language-string-failed-to-load-instantiate/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 13:38:13 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.bloggpro.com/phpmailer-language-string-failed-to-load-instantiate/</guid>
		<description><![CDATA[This problem were driving me nuts for a couple of hours so I decided to post it here, to the benefit of others. Using the PHPMailer class to send mail to members from one of our sites I were writing a new function, but all of a sudden my mailing function refused to cooperate, and [...]]]></description>
			<content:encoded><![CDATA[<p>This problem were driving me nuts for a couple of hours so I decided to post it here, to the benefit of others. Using the PHPMailer class to send mail to members from one of our sites I were writing a new function, but all of a sudden my mailing function refused to cooperate, and would return the error:</p>
<blockquote><p><code>Language string failed to load: instantiate</code></p></blockquote>
<p>This mysterious error came out of the blue, since I&#8217;d been using the same function for a long time without any hassle. After going through every bit of the problem it boiled down to not having anything to do with any Language string, which one would believe, but the interesting part of the error message is<em>  instantiate. </em></p>
<p><span id="more-261"></span></p>
<p>It turned out that I was sending a subject header encoded as UTF-8, which the PHPMailer class would reject since it contained a perculiar swedish letter, namely &#8220;å&#8221;. Other swedish letters like &#8220;ä&#8221; and &#8220;ö&#8221; will work just fine encoded as UTF-8. But not &#8220;å&#8221;.</p>
<p>The solution? Simple enough, as always:</p>
<blockquote><p><code>$subject = utf8_decode("Någon har svarat på din fråga på $site");</code></p></blockquote>
<p>This converts the string to ISO-8859-1 encoding, which, of course, worked fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggpro.com/phpmailer-language-string-failed-to-load-instantiate/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
