<?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; web development</title>
	<atom:link href="http://www.bloggpro.com/category/web-development/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>Is AdSense relying on URL for determining content?</title>
		<link>http://www.bloggpro.com/is-adsense-relying-on-url-for-determining-content/</link>
		<comments>http://www.bloggpro.com/is-adsense-relying-on-url-for-determining-content/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 06:55:35 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[AdSense]]></category>
		<category><![CDATA[Advertising]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.bloggpro.com/?p=273</guid>
		<description><![CDATA[Just a quick note on an interesting test I have done on AdSense content targeting. Simply put, I uploaded a number of copies of a html document with some text about DVD-players (in Swedish), altering only the &#60;title&#62;&#60;/title&#62; and the file name of the documents. A 250 x 250 AdSense unit were also included.
The results [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note on an interesting test I have done on AdSense content targeting. Simply put, I uploaded a number of copies of a html document with some text about DVD-players (in Swedish), altering only the &lt;title&gt;&lt;/title&gt; and the file name of the documents. A 250 x 250 AdSense unit were also included.</p>
<p>The results are interesting to say the least. From this simple test it seems that in this particular instance AdSense relies entirely on the filename / URL alone to determine content targeting. If the file is called <a href="http://1234.daglig.info/world_of_warcraft_guide.htm"><code>world_of_warcraft_guide.htm</code></a>, then ads about World or Warcraft would show, regardless of page title and page content (see images below).</p>
<p><a href="http://www.bloggpro.com/wp-content/uploads/2009/10/screen1.PNG"><img class="alignnone size-medium wp-image-275" title="screen1" src="http://www.bloggpro.com/wp-content/uploads/2009/10/screen1-300x211.PNG" alt="screen1" width="300" height="211" /></a><a href="http://www.bloggpro.com/wp-content/uploads/2009/10/screen2.PNG"><img class="alignnone size-medium wp-image-276" title="screen2" src="http://www.bloggpro.com/wp-content/uploads/2009/10/screen2-300x210.PNG" alt="screen2" width="300" height="210" /></a></p>
<p><span id="more-273"></span></p>
<p>Furthermore, if the filename was <code><a href="http://1234.daglig.info/buy_car_online.htm">buy_car_online.htm</a></code>, then ads about car rental would display, despite the title being DVD-player (in swedish) and the content being about DVD players.</p>
<p><a href="http://www.bloggpro.com/wp-content/uploads/2009/10/screen3.PNG"><img class="alignnone size-medium wp-image-277" title="screen3" src="http://www.bloggpro.com/wp-content/uploads/2009/10/screen3-300x234.PNG" alt="screen3" width="300" height="234" /></a></p>
<p><a href="http://1234.daglig.info/index.php">See for yourselves</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggpro.com/is-adsense-relying-on-url-for-determining-content/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Method to securely introduce unmasked passwords</title>
		<link>http://www.bloggpro.com/method-to-securely-introduce-unmasked-passwords/</link>
		<comments>http://www.bloggpro.com/method-to-securely-introduce-unmasked-passwords/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 14:54:51 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.bloggpro.com/method-to-securely-introduce-unmasked-passwords/</guid>
		<description><![CDATA[Masked passwords pose a significant useability issue which can be avoided. Masked passwords often lead to user frustration and possibly encourage users to chose simple passwords that are easy to enter without making mistakes.
Further, the security benefits from masked passwords are likely minimal for most users and applications. However, there are situations and applications that [...]]]></description>
			<content:encoded><![CDATA[<p>Masked passwords pose a <a href="http://www.useit.com/alertbox/passwords.html">significant useability issue</a> which can be avoided. Masked passwords often lead to user frustration and possibly encourage users to chose simple passwords that are easy to enter without making mistakes.</p>
<p>Further, the security benefits from masked passwords are likely minimal for most users and applications. However, there are situations and applications that legitimately benefits from masked password fields, and to cover all bases that best solution might be to enable the user to decide wether masking is warranted or not.</p>
<p>This can be achieved with a simple javascript toggle function:</p>
<p><span id="more-270"></span></p>
<p><code>function switchType(obj){<br />
if(obj.getAttribute('type')=='text')<br />
{<br />
obj.setAttribute('type','password');<br />
}else{<br />
obj.setAttribute('type','text');<br />
}<br />
obj.focus();<br />
}</code></p>
<p>This function is then called when the user checks a checkbox:<br />
<code>&lt;input onclick="switchType(document.form1.password);" type="checkbox" /&gt;</code></p>
<p>To view an example, <a href="http://bloggpro.com/password_demo.htm">click here</a>. The full source code can be seen by right clicking and selecting <em>view source code</em> (or the equivalent)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggpro.com/method-to-securely-introduce-unmasked-passwords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Geolocation API in Firefox 3.5</title>
		<link>http://www.bloggpro.com/geolocation-api-in-firefox-35/</link>
		<comments>http://www.bloggpro.com/geolocation-api-in-firefox-35/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 21:14:36 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.bloggpro.com/geolocation-api-in-firefox-35/</guid>
		<description><![CDATA[With the relatively new 3.5+ release  comes a new Geolocation API that enables geographical positioning of the browser client. Positioning is done through an array of means:
“Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell [...]]]></description>
			<content:encoded><![CDATA[<p>With the relatively new 3.5+ release  comes a new Geolocation API that enables geographical positioning of the browser client. Positioning is done through an array of means:</p>
<blockquote><p>“Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs”</p></blockquote>
<p>This functionality was earlier available through 3rd part solutions such as Google Gears, but now it is natively supported in Firefox.</p>
<p>The key function is: <code>navigator.geolocation.getCurrentPosition()</code><br />
<strong>If you have Firefox 3.5+ you may test the Geolocation API <a href="http://www.bloggpro.com/geolocation.html">here</a> (please let me know if the result is correct).</strong></p>
<p><span id="more-269"></span></p>
<p>I also make use of the API in my geographical chat/game <a href="http://zapin.se">Zapin</a> (in Swedish, but have a look).</p>
<p>Here is the javascript that makes it happen:<br />
<code>		var oRequest = new XMLHttpRequest();<br />
var sURL  = "geodecode.php?lat="+position.coords.latitude+"&amp;lon="+position.coords.longitude;</code></p>
<p><code>oRequest.open("GET",sURL,false);<br />
oRequest.setRequestHeader("User-Agent",navigator.userAgent);<br />
oRequest.send(null)<br />
</code><br />
<code>var MyAdress =  'Time:' + position.timestamp + '&lt;br&gt;Latitude:' + position.coords.latitude + '&lt;br&gt;Longitude:' + position.coords.longitude + '&lt;br&gt;Accuracy:' + position.coords.accuracy + 'm&lt;br&gt;Altitude:' + position.coords.altitude + oRequest.responseText;<br />
document.getElementById('adressField').innerHTML = MyAdress;<br />
}</code></p>
<p><code>if (navigator.geolocation) {<br />
// Geo request<br />
navigator.geolocation.getCurrentPosition(GeoDecode);<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggpro.com/geolocation-api-in-firefox-35/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google maps &#8211; highlight sidebar text on marker mouseover</title>
		<link>http://www.bloggpro.com/google-maps-highlight-sidebar-text-on-marker-mouseover/</link>
		<comments>http://www.bloggpro.com/google-maps-highlight-sidebar-text-on-marker-mouseover/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 08:45:32 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.bloggpro.com/google-maps-highlight-sidebar-text-on-marker-mouseover/</guid>
		<description><![CDATA[Sometimes when integrating a Google map on a site it is useful to give feedback to the user when hovering the mouse over a map marker. While not very difficult to achieve, it may not be completely straight forward to beginners, so I just wanted to post my solution here.
The trick is to add a [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes when integrating a Google map on a site it is useful to give feedback to the user when hovering the mouse over a map marker. While not very difficult to achieve, it may not be completely straight forward to beginners, so I just wanted to post my solution here.</p>
<p>The trick is to add a listener when creating the markers, and then use getElementID to select the corresponding item in the document, identified by a uniqe ID.</p>
<p>(Java script)<br />
<code> var marker = new GMarker(point, customIcons[\"standard\"]);<br />
GEvent.addListener(marker, \"mouseover\", function() {<br />
marker.setImage(\"../images/marker_h.png\");<br />
var listItem = document.getElementById(\"item-\" + j);<br />
listItem.style.backgroundColor = \"#FFFA5E\";<br />
});<br />
GEvent.addListener(marker, \"mouseout\", function() {<br />
marker.setImage(\"../images/marker.png\");<br />
var listItem = document.getElementById(\"item-\" + j);<br />
listItem.style.backgroundColor = \"#FFFFFF\";<br />
});</code></p>
<p><span id="more-268"></span></p>
<p>The HTML could for example look like this:<br />
<code><br />
&lt;li id="item-1"&gt;Some content&lt;/li&gt;</code></p>
<p>Maybe not the most elegant solution, but it does the job.</p>
<p>Finally, some useful resources for Google map developers:<br />
<a href="http://econym.org.uk/gmap/index.htm">Google Maps API Tutorial by Mike Williams</a><br />
<a href="http://www.powerhut.co.uk/googlemaps/custom_markers.php">Simple to use tool to make custom markers</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggpro.com/google-maps-highlight-sidebar-text-on-marker-mouseover/feed/</wfw:commentRss>
		<slash:comments>1</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>
		<item>
		<title>Generate a heatmap of your site</title>
		<link>http://www.bloggpro.com/generate-a-heatmap-of-your-site/</link>
		<comments>http://www.bloggpro.com/generate-a-heatmap-of-your-site/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 20:26:01 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.bloggpro.com/generate-a-heatmap-of-your-site/</guid>
		<description><![CDATA[I stumbled over a couple of very interesting sites today. Have you ever heard of Jacob Nielsen and heatmaps? Sure you have, how would you ever find this post unless you searched for &#8220;heatmap&#8221;,  right? (I also wrote about heatmaps last year).
Well, heatmaps can give you valuable information about your sites layout. Is it effective? [...]]]></description>
			<content:encoded><![CDATA[<p>I stumbled over a couple of very interesting sites today. Have you ever heard of <a href="http://www.useit.com/eyetracking/">Jacob Nielsen and heatmaps</a>? Sure you have, how would you ever find this post unless you searched for &#8220;heatmap&#8221;,  right? (<a href="http://www.bloggpro.com/effective-writing-and-layout-for-your-blog/">I also wrote about heatmaps last year</a>).</p>
<p>Well, heatmaps can give you valuable information about your sites layout. Is it effective? Where does visitors look?</p>
<p>Such information can give you ideas on what kind of changes to make your site more effective and usable. But how does on go about an make a heatmap? Not all of us have some old eyetracking equipment lying about, nor do we have thousands of dollars to get someone else to do it for us, so basically we&#8217;re screwed.</p>
<p><span id="more-256"></span></p>
<p>Well, not really. There is a couple of services that you can use that doesn&#8217;t cost you a dime. <a href="http://www.feng-gui.com/default.aspx">Feng-GUI</a> lets you upload a screen of your site and uses artificial intelligense algorithms to  analyse it and creates a simulated heatmap.</p>
<p>Below is a couple of heatmaps generated by the Feng-GUI AI. About the usefulness on these I have to reserve my opinion. It seems to place a lot of emphasis on images and I&#8217;m not sure this reflects actual user behaviour. I would love to see a validation versus real eyetracking experiments.</p>
<p>It is still interesing though.</p>
<p><img src="http://www.bloggpro.com/wp-content/uploads/2008/09/heatmap.PNG" alt="heatmap" /></p>
<p><img src="http://www.bloggpro.com/wp-content/uploads/2008/09/babycheatmap.jpg" alt="heatmap 2" /></p>
<p>The next site I looked at is <a href="http://www.clickdensity.com">Clickdensity </a>. Unlike Feng-GUI Clickdensity tracks real user behaviour by tracking clicks using a small javascript that you put on your site. From the data collected a click heatmap is generated. This is a real interesting concept that I think is going to be useful</p>
<p>They even have a free trial, so what are you waiting for? Im running a test on a site right now, so we&#8217;ll how it turns out. I&#8217;ll post the results  here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggpro.com/generate-a-heatmap-of-your-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress latest user login hack</title>
		<link>http://www.bloggpro.com/wordpress-latest-user-login-hack/</link>
		<comments>http://www.bloggpro.com/wordpress-latest-user-login-hack/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 14:10:11 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[Blogging etc]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.bloggpro.com/wordpress-latest-user-login-hack/</guid>
		<description><![CDATA[I needed a way to log the date and time the last time a user logged in I looked around for a plugin to do this for me, but found none, so I decided to try and write a function myself.
This one I struggled with and in the end it came out like something of [...]]]></description>
			<content:encoded><![CDATA[<p>I needed a way to log the date and time the last time a user logged in I looked around for a plugin to do this for me, but found none, so I decided to try and write a function myself.</p>
<p>This one I struggled with and in the end it came out like something of a abomination of a function, but at least it gets the job done. It uses the WP_AUTHENTICATE hook to call the function where a simple login check is done, and if successful, the timestamp is writted to the wp_users table.</p>
<p>You can either insert a new field called <code>user_lastlogin </code> (or what you prefer)  in wp_users like I did, or you can make a new table to store the login log.</p>
<p>The code follows below. Happy logging!</p>
<p><span id="more-230"></span></p>
<p><code><br />
function update_last_login($user_login='', $user_pass='', $cookie=false)<br />
{<br />
if ($_POST) {<br />
global $wpdb;<br />
$success=0;<br />
// check login $_POST variables against database<br />
$query = "SELECT ID FROM wp_users WHERE user_login='$user_login[0]' AND user_pass='".md5($user_login[1])."'";<br />
$uid = $wpdb-&gt;get_var($query);<br />
if ($uid!='') {$success=1;}<br />
$login_time = date("Y-m-d H:i:s", time()+28800);<br />
// if login is successful, update user last login<br />
if ($success==1) {<br />
$query = "UPDATE wp_users SET user_lastlogin='$login_time' WHERE user_login='$user_login[0]'";<br />
$wpdb-&gt;query($query);<br />
}<br />
}<br />
}<br />
// Hook action -- this is needed to call the function when someone logs in<br />
add_action('wp_authenticate','bm_update_last_login',10,2);</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggpro.com/wordpress-latest-user-login-hack/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web development success and failure</title>
		<link>http://www.bloggpro.com/web-development-success-and-failure/</link>
		<comments>http://www.bloggpro.com/web-development-success-and-failure/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 09:57:49 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.bloggpro.com/web-development-success-and-failure/</guid>
		<description><![CDATA[About a year ago I started with the idea that I should build and host a blog community with dozens of bloggers writing every day, slowly building an blogging empire. I hardly knew what a blog is (yes it&#8217;s true) and I hardly knew any PHP. Needless to say my blogging empire never happened, and [...]]]></description>
			<content:encoded><![CDATA[<p>About a year ago I started with the idea that I should build and host a blog community with dozens of bloggers writing every day, slowly building an blogging empire. I hardly knew what a blog is (yes it&#8217;s true) and I hardly knew any PHP. Needless to say my blogging empire never happened, and other blog projects, as my <a href="http://www.insiderweblog.com">Steve Pavlina wannabe blog</a>, were disbanded and is now not being updated at all.</p>
<p>My ambition one year ago was to  make a welcome side income from web publishing/advertizing and during this year I&#8217;ve tried affiliate marketing, domain trading and web site publishing. I&#8217;ve learnt that success may come unexpectely, in our case from a site about pregnancy and maternity (<a href="http://www.blimamma.se/gravid/">Bli Mamma gravid</a>), an idea that actually my wife came up with. From a quiet start this site now has about 2,000 page views per day and generates from $3 to $40 per day depending on current advertizing campaigns. At the moment we use a combo of AdSense and Tailsweep ads, something that has proven successful.</p>
<p>My other project, called  <a href="http://www.hyrprylen.se">Hyrprylen.se</a>, which is basically a classified ad site for rentals of gadges and property, is yet to be launched. I coded this site from scratch, thus it is a bit rough. But it might have a potential, especially as we will port it to other languages as well. The platform can also be easily be used for realty, traditional classifieds and vacation home rentals. We&#8217;ll see about that one.</p>
<p><span id="more-226"></span></p>
<p>What&#8217;s in the pipes? Well I won&#8217;t say more that I have an idea for a database for affiliate programs, but it&#8217;s still in a very early stage idea.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bloggpro.com/web-development-success-and-failure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
