<?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>glurt</title>
	<atom:link href="http://glurt.com/feed" rel="self" type="application/rss+xml" />
	<link>http://glurt.com</link>
	<description>webmaster tutorials and internet facts</description>
	<lastBuildDate>Mon, 01 Mar 2010 00:09:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>php &#8211; mysql installation on RHEL and fedora core via yum</title>
		<link>http://glurt.com/php-mysql-installation-on-rhel-and-fedora-core-via-yum</link>
		<comments>http://glurt.com/php-mysql-installation-on-rhel-and-fedora-core-via-yum#comments</comments>
		<pubDate>Sun, 28 Feb 2010 23:53:23 +0000</pubDate>
		<dc:creator>glurt</dc:creator>
				<category><![CDATA[Linux / Unix]]></category>

		<guid isPermaLink="false">http://glurt.com/?p=311</guid>
		<description><![CDATA[This tutorial will guide you step by step on php / mysql server installation via yum command on linux server.
First let&#8217;s install apache server :
# yum install httpd

Let's start the server manually after installation :


# /etc/init.d/httpd start

First time information on server start up :


Starting httpd: httpd: Could not reliably determine the server's fully qualified domain [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial will guide you step by step on php / mysql server installation via yum command on linux server.</p>
<p>First let&#8217;s install apache server :</p>
<pre><strong># yum install httpd
</strong>
Let's start the server manually after installation :<strong>

</strong>
<pre><strong># /etc/init.d/httpd start</strong>

First time information on server start up :
<strong>
</strong>
<pre><strong>Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name,
using 127.0.0.1 for ServerName

</strong>Now let's configure the server name :
<strong>
</strong>
<pre><strong>sudo nano /etc/httpd/conf/httpd.conf</strong>

Go to the end of the file you will find a section that starts with 'ServerName'
 and gives the example:</pre>
<pre><strong>#ServerName www.example.com:80</strong></pre>
</pre>
<p>Remove comment on the line and type your server name, the server name is your<br />
domain name / ip address or the hostname</p>
<p><strong>ServerName demo.com</strong></p>
<p>Now reload the apache server :</p>
<pre><strong>sudo /etc/init.d/httpd reload</strong>

Now we should be shure that port 80 is opened , configure your iptables firewall setings :
<pre><strong>iptables -I RH-Firewall-1-INPUT -p tcp --dport 80 -j ACCEPT</strong>

You can navigate to your server IP address or the host name and you will see the starting page.

Make sure that apache is booted on server start up :
<pre><strong>sudo /sbin/chkconfig httpd on</strong>

Let's check if apache runs properly :
<pre><strong>sudo /sbin/chkconfig --list httpd
httpd           0:off        1:off  2:on    3:on    4:on    5:on    6:off</strong></pre>
</pre>
</pre>
</pre>
</pre>
</pre>
<h2>PHP5 INSTALLATION</h2>
<p>Now let&#8217;s install all available php libraries and php5 for our server :</p>
<pre><strong>sudo yum install php php-common gd-devel php-gd php-mcrypt php-pear php-pecl-memcache php-mhash
 php-mysql php-xml php-xmlrpc php-curl curl curl-devel php-simplexml php-devel</strong>

Now let's reload apache:
<pre><strong>sudo /etc/init.d/httpd reload</strong>

And we are done !!!</pre>
</pre>
<h2>MYSQL INSTALLATION</h2>
<p>Let&#8217;s update our server first :</p>
<pre><strong># sudo yum -y update</strong>

Install mysql with yum :
<pre><strong># sudo yum -y install mysql-server</strong>

Start mysql :
<pre><strong># sudo /etc/init.d/mysqld start</strong>

Create your first mysql user  [ while root is your user ] :
<pre><strong>mysqladmin -u root password NEWPASSWORD</strong>
<pre>
<pre>
<pre>log in mysql with new password: 

<strong>mysql -u root -p</strong></pre>
</pre>
</pre>
<p>I believe you are the root and user that you created is a superuser with full access,</p>
<p>give this user all privileges to all tables when you are in mysql terminal :</p>
<pre> <strong>GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY '<strong>NEWPASSWORD</strong>' WITH GRANT OPTION;</strong>

<strong> FLUSH PRIVILEGES;</strong></pre>
<p>That's it , lamp installation completed.</p>
<p>Good luck</pre>
</pre>
</pre>
</pre>
<pre>
<pre></pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://glurt.com/php-mysql-installation-on-rhel-and-fedora-core-via-yum/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protect image hotlinking with php</title>
		<link>http://glurt.com/protect-image-hotlinking-with-php</link>
		<comments>http://glurt.com/protect-image-hotlinking-with-php#comments</comments>
		<pubDate>Sat, 13 Feb 2010 16:20:17 +0000</pubDate>
		<dc:creator>glurt</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://glurt.com/?p=307</guid>
		<description><![CDATA[Sometimes we want to protect our content from using our website traffic and images hotlinking, it is possible to do with mod_rewrite .htaccess method and mod_rewrite method is faster , but if you want to protect partial content from code , you can use php gd library to protect image from hotlinking.
Here is the code [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes we want to protect our content from using our website traffic and images hotlinking, it is possible to do with mod_rewrite .htaccess method and mod_rewrite method is faster , but if you want to protect partial content from code , you can use php gd library to protect image from hotlinking.</p>
<p>Here is the code solution to do it right way :</p>
<p>&lt;?php</p>
<p>function chekIfExist($url)</p>
<p>{</p>
<p>if (@GetImageSize($url))</p>
<p>{</p>
<p>return true;</p>
<p>}else{</p>
<p>return false;</p>
<p>}<br />
}<br />
function encodeImg($imgurl)</p>
<p>{</p>
<p>$image = imagecreatefromjpeg($imgurl);<br />
imagealphablending($image, false);<br />
imagesavealpha($image, true);</p>
<p>// start buffering<br />
ob_start();<br />
imagepng($image);<br />
$contents =  ob_get_contents();<br />
ob_end_clean();<br />
imagedestroy($image);<br />
return &#8220;data:image/png;base64,&#8221;.base64_encode($contents);</p>
<p>}</p>
<p>$external_link = &#8216;http://i.ytimg.com/vi/5g9aVwRenVg/2.jpg&#8217;;</p>
<p>if(chekIfExist($external_link))</p>
<p>echo &#8220;&lt;img src=&#8217;&#8221;.encodeImg($external_link).&#8221;&#8216; /&gt;&#8221;;</p>
<p>?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://glurt.com/protect-image-hotlinking-with-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inheritance and polymorphism curl tip</title>
		<link>http://glurt.com/inheritance-and-polymorphism-curl-tip</link>
		<comments>http://glurt.com/inheritance-and-polymorphism-curl-tip#comments</comments>
		<pubDate>Wed, 13 Jan 2010 07:12:35 +0000</pubDate>
		<dc:creator>glurt</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://glurt.com/?p=299</guid>
		<description><![CDATA[Inheritance is one of the best methods to shorten the thousands miles of code and your time in time of developing, it used in many programming languages like PHP, C#, Java , Python and more. This way of coding should be implemented after clear requirements for your application, well planed database, input and output.
I will [...]]]></description>
			<content:encoded><![CDATA[<p>Inheritance is one of the best methods to shorten the thousands miles of code and your time in time of developing, it used in many programming languages like PHP, C#, Java , Python and more. This way of coding should be implemented after clear requirements for your application, well planed database, input and output.</p>
<p>I will try to explain why this method of developing is really cool for me and why it could be useful and fun to you too using curl library example.  Imagine yourself  writing the script that should connect 20 APIproviders using CURL library and to output the data. Someone who is not familiar with Inheritance manner of code writing will create 20 objects for different providers with the same code of curl execution.  So where is Inheritance involved in ? If you build this application with using Inheritance method, you should create Parent class for CURL execution, construct function to get instance of curl settings, function to run the curl and to set variables that will handle data that returns on response (protected variables), errors after execution are also stored in protected object variables.</p>
<p>Build the children class and initialize the parent class with curl settings on child class construct function . In child class you should only set the curl options and all the process will be executed in parent class, so you don&#8217;t need to type the curl init and curl exec again and again.In children class create functions that will return parent protected variables and here comes polymorphism you can use same child classes functions for different api and parent class will return different response from the api.</p>
<p>It was a rough tip of using inheritance and polymorphism, I will post simple example code later and your life as a coder probably would become painless.</p>
<p>Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://glurt.com/inheritance-and-polymorphism-curl-tip/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Posting comments with PHP and curl automatically</title>
		<link>http://glurt.com/posting-comments-with-php-and-curl-automatically</link>
		<comments>http://glurt.com/posting-comments-with-php-and-curl-automatically#comments</comments>
		<pubDate>Wed, 16 Dec 2009 23:33:13 +0000</pubDate>
		<dc:creator>glurt</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[curl]]></category>

		<guid isPermaLink="false">http://glurt.com/?p=292</guid>
		<description><![CDATA[
Here is an experiment of posting comments with php curl library, this is the part of glurt seo tools. With a little imagination you may create a great auto commenting software for any blog cms and any website to promote your website on web or for another purposes. I created this script because I was [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-293" style="margin-left: 10px; margin-right: 10px;" title="curl" src="http://glurt.com/wp-content/uploads/2009/12/curl-300x288.jpg" alt="curl" width="300" height="288" /></p>
<p>Here is an experiment of posting comments with php curl library, this is the part of glurt seo tools. With a little imagination you may create a great auto commenting software for any blog cms and any website to promote your website on web or for another purposes. I created this script because I was lazy to enter the name, email address again and again. I&#8217;ve come with the curl and PHP solution to post comments on wordpress blogs that I am interested in by typing url only inside of form field on my localhost, clicking submit , and the comment is there, sent by curl with PHP.</p>
<ol>
<li><strong>POST DATA we will need</strong></li>
</ol>
<p>First, before creating the script I figured out which POST variables are being transferred by wordpress comment form, form action (where the comment submission process done).  I opened the wordpress post&#8217;s html source (in mozilla firefox right mouse click-&gt;view source code) I found something similar to :</p>
<p><strong>&lt;form action=&#8221;http://blog.php/wp-comments-post.php&#8221; method=&#8221;post&#8221; id=&#8221;commentform&#8221;&gt;<br />
&lt;p&gt;<br />
&lt;input type=&#8221;text&#8221; name=&#8221;author&#8221; id=&#8221;author&#8221; value=&#8221;" size=&#8221;22&#8243; tabindex=&#8221;1&#8243; /&gt;<br />
&lt;label for=&#8221;author&#8221;&gt;&lt;small&gt;Name<br />
(required)    &lt;/small&gt;&lt;/label&gt;<br />
&lt;/p&gt;<br />
&lt;p&gt;<br />
&lt;input type=&#8221;text&#8221; name=&#8221;email&#8221; id=&#8221;email&#8221; value=&#8221;" size=&#8221;22&#8243; tabindex=&#8221;2&#8243; /&gt;<br />
&lt;label for=&#8221;email&#8221;&gt;&lt;small&gt;Mail (will not be published)<br />
(required)    &lt;/small&gt;&lt;/label&gt;<br />
&lt;/p&gt;<br />
&lt;p&gt;<br />
&lt;input type=&#8221;text&#8221; name=&#8221;url&#8221; id=&#8221;url&#8221; value=&#8221;" size=&#8221;22&#8243; tabindex=&#8221;3&#8243; /&gt;<br />
&lt;label for=&#8221;url&#8221;&gt;&lt;small&gt;Website&lt;/small&gt;&lt;/label&gt;<br />
&lt;/p&gt;<br />
&lt;!&#8211;&lt;p&gt;&lt;small&gt;&lt;strong&gt;XHTML:&lt;/strong&gt; You can use these tags: &amp;lt;a href=&amp;quot;&amp;quot; title=&amp;quot;&amp;quot;&amp;gt; &amp;lt;abbr title=&amp;quot;&amp;quot;&amp;gt; &amp;lt;acronym title=&amp;quot;&amp;quot;&amp;gt; &amp;lt;b&amp;gt; &amp;lt;blockquote cite=&amp;quot;&amp;quot;&amp;gt; &amp;lt;cite&amp;gt; &amp;lt;code&amp;gt; &amp;lt;del datetime=&amp;quot;&amp;quot;&amp;gt; &amp;lt;em&amp;gt; &amp;lt;i&amp;gt; &amp;lt;q cite=&amp;quot;&amp;quot;&amp;gt; &amp;lt;strike&amp;gt; &amp;lt;strong&amp;gt; &lt;/small&gt;&lt;/p&gt;&#8211;&gt;<br />
&lt;p&gt;<br />
&lt;textarea name=&#8221;comment&#8221; id=&#8221;comment&#8221; cols=&#8221;100%&#8221; rows=&#8221;10&#8243; tabindex=&#8221;4&#8243;&gt;&lt;/textarea&gt;<br />
&lt;/p&gt;<br />
&lt;p&gt;<br />
&lt;input name=&#8221;submit&#8221; type=&#8221;submit&#8221; id=&#8221;submit&#8221; tabindex=&#8221;5&#8243; value=&#8221;Submit Comment&#8221; /&gt;<br />
&lt;input type=&#8221;hidden&#8221; name=&#8221;comment_post_ID&#8221; value=&#8221;287&#8243; /&gt;<br />
&lt;/p&gt;<br />
&lt;/form&gt;</strong></p>
<p>The variables we will use for cron execution from form above are :</p>
<p><strong>Form action url: </strong><strong>http://blog.php/wp-comments-post.php  &#8211; wordpress uses &#8220;wp-comments-post.php&#8221; file as a file for comment storing into the database. </strong></p>
<p><strong>Author :  is the name of comment author, most of the wordpress blogs require it .</strong></p>
<p><strong>Email : Is a commenter email</strong></p>
<p><strong>Url : Is a url of your website</strong></p>
<p><strong>Submit : this variable is necessary for submitting the result in </strong><strong>&#8220;wp-comments-post.php&#8221;.</strong></p>
<p><strong>comment_post_ID: is a hidden value, necessary for wp database that tells the script which post to bind comment to.<br />
</strong></p>
<p>Author and email are required fields for cron operation, post id is also necessary because we should know where to post the comment.  comment_post_ID is also neccessary to tell the script in which post comment will appear.</p>
<p><strong>2. Getting wordpress post id comment_post_ID from wordpress post</strong></p>
<p>To get post id to use it for curl form submission we will need comment_post_ID from post form . We will crawl the html with curl and take comment_post_ID variable in numeric format using regular expressions:</p>
<p><strong>&lt;?php<br />
</strong></p>
<p><strong><code>// CURL function to get the page and to insert it inside php variable.<br />
function get_web_page( $url )<br />
{<br />
$options = array(<br />
CURLOPT_RETURNTRANSFER =&gt; true,     // return web page<br />
CURLOPT_HEADER         =&gt; false,    // don't return headers<br />
CURLOPT_FOLLOWLOCATION =&gt; true,     // follow redirects<br />
CURLOPT_ENCODING       =&gt; "",       // handle all encodings<br />
CURLOPT_USERAGENT      =&gt; "spider", // who am i<br />
CURLOPT_AUTOREFERER    =&gt; true,     // set referer on redirect<br />
CURLOPT_CONNECTTIMEOUT =&gt; 120,      // timeout on connect<br />
CURLOPT_TIMEOUT        =&gt; 120,      // timeout on response<br />
CURLOPT_MAXREDIRS      =&gt; 10,       // stop after 10 redirects<br />
);</code></strong></p>
<p><strong> $ch      = curl_init( $url );<br />
curl_setopt_array( $ch, $options );<br />
$content = curl_exec( $ch );<br />
$err     = curl_errno( $ch );<br />
$errmsg  = curl_error( $ch );<br />
$header  = curl_getinfo( $ch );<br />
curl_close( $ch );</strong></p>
<p><strong> $header['errno']   = $err;<br />
$header['errmsg']  = $errmsg;<br />
$header['content'] = $content;<br />
return $header;<br />
}</strong></p>
<p><strong>function executeComment($name,$email,$url,$comment,$baseUrl,$postId)</strong></p>
<p><strong>{<br />
$curlPost = &#8216;author=&#8217;.$name.&#8217;&amp;email=&#8217;.$email.&#8217;&amp;url=&#8217;.$url.&#8217;&amp;comment=&#8217; . urlencode($comment) . &#8216;&amp;submit=Submit+Comment&amp;comment_post_ID=&#8217;.<strong>$postId</strong></strong><strong>;<br />
$ch = curl_init();<br />
curl_setopt($ch, CURLOPT_URL, &#8216;http://&#8217;.<strong>$baseUrl</strong></strong><strong>.&#8217;/wp-comments-post.php&#8217;);<br />
curl_setopt($ch, CURLOPT_HEADER, 1);<br />
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br />
curl_setopt($ch, CURLOPT_POST, 1);<br />
curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);<br />
$data = curl_exec($ch);<br />
curl_close($ch);</strong></p>
<p><strong>}<br />
</strong></p>
<p><strong>function getDomain($url)</strong></p>
<p><strong>{</strong></p>
<p><strong> </strong><strong>$pt = explode(&#8221;/&#8221;,$url);<br />
$burl = $pt[2];<br />
$result = get_web_page( $url );</strong></p>
<p><strong> return $result;<br />
</strong></p>
<p><strong>}<br />
</strong></p>
<p><strong>// this is an url to post comment on &#8230;<br />
$url = &#8216;http://www.branded07.com/2009/07/11/ie6-web-design-tricks/&#8217;;</strong></p>
<p><strong>// we need </strong><strong>www.branded07.com domain name for future usage ,  we will use our getDomain() function</strong></p>
<p><strong>$domain = getDomain($url);</strong></p>
<p><strong><br />
</strong></p>
<p><strong>// now we need to crawl the page and to get post ID</strong></p>
<p><strong>// we crawling the post url<br />
</strong></p>
<p><strong>$result = get_web_page( </strong><strong>$url  );</strong></p>
<p><strong>// page content is in the $page variable<br />
$page = $result['content'];</strong></p>
<p><strong><br />
</strong></p>
<p><strong>// getting the post ID with regular expressions</strong></p>
<p><strong>$matches = array();<br />
preg_match( &#8216;!&lt;input.*?name=&#8221;comment_post_ID&#8221;.*?value=&#8221;(.*?)&#8221;!&#8217;, $page, $matches );<br />
// this is a comment id to post comment<br />
$pid = $matches[1];</strong></p>
<p><strong><br />
</strong></p>
<p><strong>// execute comment posting with curl</strong></p>
<p><strong>$name = &#8220;glurt&#8221;;</strong></p>
<p><strong>$email = &#8220;admin@glurt.com&#8221;;</strong></p>
<p><strong>$url = &#8220;http://glurt.com&#8221;;</strong></p>
<p><strong>$comment = &#8220;This is the test comment&#8221;;</strong></p>
<p><strong>$baseUrl = $domain;</strong></p>
<p><strong>$postId = $pid;<br />
</strong></p>
<p><strong><strong>executeComment($name,$email,$url,$comment,$baseUrl,$postId)</strong>;</strong></p>
<p><strong><br />
</strong></p>
<p><strong>?&gt;</strong></p>
<p><strong>Conclusion : </strong><br />
We figured out what variables uses wordpress blog to post comments, we used this data to create comments posting script that needs only one url of wordpress web blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://glurt.com/posting-comments-with-php-and-curl-automatically/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Design Patterns for Web Programming in PHP</title>
		<link>http://glurt.com/design-patterns-for-web-programming-in-php</link>
		<comments>http://glurt.com/design-patterns-for-web-programming-in-php#comments</comments>
		<pubDate>Mon, 07 Dec 2009 16:10:29 +0000</pubDate>
		<dc:creator>glurt</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[php patterns]]></category>

		<guid isPermaLink="false">http://glurt.com/?p=287</guid>
		<description><![CDATA[1.   Singleton pattern
Name: Singleton
Problem: You need exactly one global instance of a class and a global point
of access to it.
Context: Any
Solution &#38; Consequences: Make an encapsulated static variable holding
the single instance of a class. Provide a get-method that:
• has a static variable for holding the one and only instance
• instantiates the instance if it [...]]]></description>
			<content:encoded><![CDATA[<p>1.  <strong> Singleton pattern</strong><br />
Name: Singleton<br />
Problem: You need exactly one global instance of a class and a global point<br />
of access to it.<br />
Context: Any<br />
Solution &amp; Consequences: Make an encapsulated static variable holding<br />
the single instance of a class. Provide a get-method that:<br />
• has a static variable for holding the one and only instance<br />
• instantiates the instance if it does not exist already<br />
• returns the instance.<br />
This method returns the one and only instance of the class. So from<br />
the performance point of view you gain a lot. The singleton pattern<br />
prevents the application for making unnecessary many objects, which<br />
results in a performance gain.<br />
Implementation: There are some problems with implementing the single-<br />
ton pattern in PHP:<br />
• In PHP4 it is not possible to define static variables in a class. But<br />
we definitely need a static variable to store the instance. Happily<br />
we can define static variables in a function.<br />
• PHP did not support static methods but the latest version of<br />
PHP4 you can just call a method like this: class::method(). This<br />
is used in the implementation example.<br />
Now, lets have a look at how an implementation would look like:</p>
<p>//<br />
// This is the class of which you want only one instance<br />
//<br />
class yourClassName {<br />
&#8230;<br />
//<br />
// This is your classcontructor<br />
//<br />
function yourClassName() {<br />
&#8230;<br />
}<br />
//<br />
// This is your helperfunction for retrieving the instance<br />
//<br />
function &amp;getInstance() {<br />
static $instance;<br />
if (!isSet($instance)) {<br />
$instance = new singleton();<br />
}<br />
return $instance;<br />
}<br />
function someMemberFunction() {<br />
&#8230;<br />
}<br />
&#8230;<br />
}</p>
<p>The helperfunction getInstance is the global point for accessing your<br />
instance. Within your application you can now use your class like this:<br />
$instance =&amp; yourClassName::getInstance();<br />
$instance-&gt;someMeberFunction();<br />
Notice the ampersand (&amp;) used in the assignment of $instance, this sign<br />
is very important because it makes sure you get the object itself and not a<br />
copy of it. Just the same story goes for the ampersand preceding the name<br />
of the member function getInstance() in the declaration of the class.<br />
While looking on the web I found several implementations of the single-<br />
ton pattern for PHP that are not working, because they do not make use<br />
of the ampersand. So be careful with implementing this pattern and make<br />
sure that you test your implementation.</p>
<p><strong>2   Strategy pattern</strong><br />
Name: Strategy<br />
Problem: You need several different stategies that solve the same problem<br />
to be easily interchangeable with each other. For example, a website<br />
with support for multiple languages and currencies.<br />
Context: Any<br />
Solution &amp; Consequences: Solution:<br />
• Create a super class (Strategy) that is used as a shared interface<br />
for the concrete strategy classes.<br />
• Define a subclass (ConcreteStragegy) for each strategy needed,<br />
that overrides the member functions of the super class.<br />
• Create a reference in your PHP application to one of the sub-<br />
classes (the concrete strategy that you need) and use this refer-<br />
ence throughout your program.<br />
The consequence is that in the PHP-application you can freely change<br />
the reference from one subclass to another (from one concrete strategy<br />
to another) because they now have the same interface.<br />
PHP does not support interfaces, so you are not forced to stick to the<br />
interface of the super class. It is your own responsibility to check if<br />
you stick to the interface.<br />
<strong>UML diagram:</strong></p>
<p><strong><img class="size-full wp-image-288 alignnone" title="patterns" src="http://glurt.com/wp-content/uploads/2009/12/patterns.jpg" alt="patterns" width="426" height="289" /></strong></p>
<p>Implementation: In this example implementation we want to print a list<br />
of names. We want two strategies: one for printing the list lexico-<br />
graphically ascending, and one for printing the list lexicographically<br />
descending.<br />
Here is a sketch of the implementation:</p>
<p>//<br />
// Superclass (the interface class)<br />
//<br />
class printListInterface {<br />
function execute($namelist) {<br />
}<br />
}<br />
//<br />
// The subclass (concrete strategy) for printing the list ascending<br />
//<br />
class printListAscending extends printListInterface {<br />
function execute($namelist) {<br />
// Sort \$namelist in lex. ascending order and<br />
// print the list<br />
&#8230;<br />
}<br />
}<br />
//<br />
// The subclass (concrete strategy) for printing the list descending<br />
//<br />
class printListDescending extends printListInterface {<br />
function execute($namelist) {<br />
// Sort $namelist in lex. descending order and<br />
// print the list<br />
&#8230;<br />
}<br />
}<br />
Now you can make a reference in you PHP application to the concrete<br />
strategy of your choice:<br />
$printList = new printListAscending();<br />
and use the reference:<br />
$names[0] = ’Ralf’;<br />
$names[1] = ’Paul’;<br />
$names[2] = ’Frank’;<br />
$printList-&gt;execute($names);</p>
<p><strong>3     Model View Controller pattern</strong><br />
Name: Model View Controller<br />
Problem: You want to be able to change the appearance(UI) of your web<br />
application from time to time, or you want to offer multiple UIs for<br />
the same application in an easy manner.<br />
Context: Changing or multiple UIs for the same application<br />
Solution &amp; Consequences: Devide your application into 3 parts:<br />
The Model (Procesing): the model is a representation of the data<br />
and the possible operations on it.<br />
The View (Output): the view renders the contents of the model. It<br />
is a view on the model.<br />
The Controller (Input): the controller translates interactions with<br />
the view into actions to be performed by the model.<br />
Implementation: This is a sketch of an implementation of a MVC-pattern<br />
applied to a web shop. In this example the user can look up a product,<br />
or add a product to the system.<br />
The Model Component:<br />
This class is like a database wrapper or database adaptor<br />
class ShoppingModel {<br />
//<br />
// Retrieve the product from the database<br />
//<br />
function getProduct($id) {<br />
&#8230;<br />
}<br />
//<br />
// Store a product in the database<br />
//<br />
function addProduct($id, $name, $description, $price) {<br />
&#8230;<br />
}<br />
}</p>
<p>The View Component:<br />
The view class is responsible for generating HTML(the view on the model)<br />
class ShoppingView {<br />
var $model;<br />
//<br />
// Class contructor that stores the model<br />
//<br />
function ShoppingView($model) {<br />
$this-&gt;$model = $model;<br />
}<br />
//<br />
// Print HTML-header<br />
//<br />
function printHeader {<br />
&#8230;<br />
}<br />
//<br />
// Print HTML-footer<br />
//<br />
function printFooter {<br />
&#8230;<br />
}<br />
//<br />
// Print HTML-representation of a product<br />
//<br />
function printProduct($id) {<br />
$view-&gt;printHeader();<br />
$product = $this-&gt;$model-&gt;getProduct($id);<br />
// Give the HTML representation of the product item.<br />
// By printing a some HTML tags and properties of the product<br />
&#8230;<br />
$view-&gt;printFooter();<br />
}<br />
//<br />
// Print HTML-representation of a message<br />
//<br />
function printMessage($message) {<br />
$this-&gt;printHeader();<br />
print($message);<br />
$this-&gt;printFooter();<br />
}<br />
}<br />
Let us have a look at the controller component. I found some imple-<br />
mentations of the MVC-pattern for PHP (like the MVC-pattern at [11])</p>
<p>that have a separate class for the controller part. That class is used in the<br />
PHP-file the user requested. This suggests that the controller class is the<br />
controller component of the MVC-pattern. This is not a nice way to apply<br />
this pattern to PHP.<br />
In this way the controller class is just a subset of the functionality of the<br />
controller component. The controller class and PHP file together are the<br />
controller component in the MVC-pattern. Because the functionality done<br />
in the PHP file, also belongs to the controller, it is the part that interacts<br />
with the user.<br />
A better way of applying the MVC-pattern is to look at the PHP-file as<br />
the controller component, so the controller component is the PHP-file itself:</p>
<p>Continuing the implementation example:<br />
The Controller Component(index.php):<br />
// initialize the model<br />
$model = new ShoppingModel();<br />
// initialize the view<br />
$view = new ShoppingView($model);<br />
// Check what action is defined in the URL<br />
switch ($_GET[’action’]) {<br />
// Show a product<br />
case ’show_product’:<br />
$view-&gt;printProduct($_GET[id]);<br />
break;<br />
// Add a product<br />
case ’add_product’:<br />
$model-&gt;addProduct($_GET[id],$_GET[name],$_GET[desc],$_GET[price]);<br />
$view-&gt;printMessage(’Product added!’)<br />
break;<br />
default:<br />
$view-&gt;printMessage(’No action found!’)<br />
break;<br />
}<br />
So possible calls to this PHP-page:<br />
• Show product with id 5:<br />
index.php?action=show_product&amp;id=5<br />
• Add the candy bar to the products:<br />
index.php?action=add_product&amp;id=10&amp;name=Candy%20bar&amp;descr=&#8230;<br />
These calls are normally made by the same (if you extend this controller)<br />
or other controllers(read: PHP-pages) with the same model and view.<br />
With this implementation we have a separation of the model, view and<br />
the controller. As you can see now, it is rather easy to plug-in a new View<br />
class resulting in a new UI for your web application.</p>
<p><strong>4    SessionObject pattern</strong><br />
All the previous patterns are projections of existing pattern onto PHP. I<br />
mean, they are general (and mostly Object Oriented) patterns that are<br />
adapted to be used in PHP. The now following pattern is a new pattern<br />
that I would like to introduce. It is a solution that I have used very often<br />
in my history as a web programmer.<br />
Name: SessionObject<br />
Problem: You are programming a web application that makes use of ses-<br />
sions and you want to remember the information about the session<br />
(throughout the session) in an organised and structured way. E.g.<br />
keep the shopping basket content available throughout the session in<br />
a web shop.<br />
Context: Web applications with sessions. Session information has to be<br />
available throughout the session.<br />
Solution &amp; Consequences: Create a class definition that represents the<br />
information that needs to be available throughout the session. At the<br />
top of each PHP-page:<br />
• Start or continue a session.<br />
• Register a session variable(for holding the session object)<br />
• Check if a session object exists, if not: create an instance of the<br />
class(defined earlier) and assign it to the session variable.<br />
Now you can always access the session information in an organised<br />
way(via an object) and that object will be available during the whole<br />
session.<br />
Normally objects do not live very long in php, because they only exist<br />
during the time of processing the PHP-page (mostly just a fraction of<br />
a second). When you call a page, the objects are created and they<br />
are used for the processing of the page. After the result has been sent<br />
back to the user, all variables, including the objects, will be lost. With<br />
this pattern you register an object as a session variable. That means<br />
that, after the processing of the page, the object is stored in a textfile<br />
together with the rest of the sessioninformation. At the time you that<br />
you load the session again(in another pagerequest), the object will be<br />
loaded again and will be available in your application.<br />
Implementation: Let us have a look at an example of an implementation.<br />
This is a stripped version of a ShoppingBasket object that I used in<br />
web shops strore the products chosen / selected by the user. In this<br />
example I make use of a well known ShoppingBasket pattern.</p>
<p>//<br />
// This class stores the selected products<br />
//<br />
class ShoppingBasket {<br />
var $productArray;<br />
var $numberOfProducts;<br />
&#8230;<br />
//<br />
// Adds a product to the productArray<br />
//<br />
function addProduct($id) {<br />
// Add product with id=$id to the productArray<br />
&#8230;<br />
}<br />
//<br />
// Returns the array with the selected products<br />
//<br />
function getProductArray() {<br />
return $productArray;<br />
}<br />
&#8230;<br />
}<br />
Your PHP-pages have to begin with this(because the function session start()<br />
must be called before any output is written):<br />
// If a session already exist: load session variables or create a new session if none exists.<br />
session_start();<br />
// Register the ShoppingBasket object as a sessionvariable<br />
session_register(basket);<br />
// If the basket-object does not exist, create one<br />
if (!IsSet($basket)) {<br />
$basket = new ShoppingBasket();<br />
}<br />
// Use the ShoppingBasket<br />
$basket-&gt;addProduct(5);<br />
$basket-&gt;addProduct(7);<br />
$products = $basket-&gt;getProducArray();<br />
If you have more than a few pages you could make a procedure (e.g.<br />
my session start()) containing these lines. Then you just have to call my session start()<br />
at the beginning of each page.<br />
I tried to mix this pattern with the singleton pattern. My idea was to<br />
make the ShoppingBasket-object a singleton, so you do not have to check</p>
<p>for the existence of an instance in the PHP-pages. But unfortunately this<br />
does not work like that in PHP. This because of the fact that the static<br />
instance variable in the loaded class (the session class) is different to the<br />
static instance variable of our class definition in the PHP-file.<br />
<strong>Problem and Pattern matching</strong><br />
In the beginning of this essay I stated some common problems. Afterwards<br />
I introduced a few PHP-patterns. In this section I want to make a matching<br />
of problems to a few important patterns.<br />
Multiple presentations MVC pattern see 7.3<br />
Navigation this is not a typically PHP problem, for navigational patterns<br />
see [6] and [9]<br />
Database operations Adaptor pattern (GoF) see [1] (convert the database<br />
interface to an easy to use interface by making use of an adaptor class)<br />
not discussed in this essay, but the Adaptor pattern is easy to project<br />
on PHP.<br />
Authentication and sessions SessionObject pattern see 7.4<br />
These are some matchings that I find very usefull. This is not inteded<br />
to be an exhausting list.<br />
<strong>Conclusion</strong><br />
At first sight projecting known patterns to PHP looks quite easy. But if<br />
you take a closer look and try to implement such patterns in PHP you will<br />
probably figure out that there are some more problems to solve than you<br />
thought of in the beginning. That is why there are a lot of PHP patterns<br />
floating over the internet with poor quality.<br />
These problems are mainly due to the fact that PHP is not a real object<br />
oriented language and that the most patterns are object oriented. So we<br />
can conclude that patterns depend on language expressiveness. In the fu-<br />
ture it will be easier to map these(OO-) patterns to PHP because with the<br />
introduction of newer versions the OO support in PHP will become more<br />
mature.</p>
]]></content:encoded>
			<wfw:commentRss>http://glurt.com/design-patterns-for-web-programming-in-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search, hunt and download videos with feald</title>
		<link>http://glurt.com/search-hunt-and-download-with-feald</link>
		<comments>http://glurt.com/search-hunt-and-download-with-feald#comments</comments>
		<pubDate>Sun, 22 Nov 2009 06:28:08 +0000</pubDate>
		<dc:creator>glurt</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://glurt.com/?p=283</guid>
		<description><![CDATA[
Feald search engine introduced as a &#8220;Twitter media center&#8221; was beta launched two weeks ago. Feald is a promising  live search engine includes free twitter tools, youtube search and downloading features, flickr search and more.  The difference between feald live search and other industry giants like scoopler, kosmix and other popular live search engines is [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-284" title="penguin-lrg" src="http://glurt.com/wp-content/uploads/2009/11/penguin-lrg-297x300.jpg" alt="penguin-lrg" width="297" height="300" /></p>
<p>Feald search engine introduced as a &#8220;Twitter media center&#8221; was beta launched two weeks ago. Feald is a promising  live search engine includes free twitter tools, youtube search and downloading features, flickr search and more.  The difference between feald live search and other industry giants like scoopler, kosmix and other popular live search engines is a mystical twitter tools that should increase twitter followers amounts. We interviewed the feald development group about Feald changes and updates. The live search will be more user friendly and they are going to change the layout.</p>
<p>Main feald features, that differs Feald from another live search websites  are :</p>
<ul>
<li>Wikipedia definitions on every live search</li>
<li>Downloadable video search results ( Video downloaded in flash .flv format )</li>
<li>Extended Live video search</li>
<li>Free twitter tools without storing user passwords</li>
</ul>
<p>We are waiting for the new features from Feald search engine, and we are sure they will surprise us with every bit of code added on board.</p>
<p>Source &#8211; <a href="http://feald.com">Feald.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://glurt.com/search-hunt-and-download-with-feald/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yahoo map service php tutorial</title>
		<link>http://glurt.com/yahoo-map-service-php-tutorial</link>
		<comments>http://glurt.com/yahoo-map-service-php-tutorial#comments</comments>
		<pubDate>Wed, 18 Nov 2009 12:46:25 +0000</pubDate>
		<dc:creator>glurt</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[yahoo maps]]></category>
		<category><![CDATA[yahoo maps api]]></category>

		<guid isPermaLink="false">http://glurt.com/?p=280</guid>
		<description><![CDATA[Yahoo provides simple,  great maps service to be handled with php, if you need a fast dynamic solution for your website or web service, yahoo MapService api returns images of geo locations by request url.  We will show you basic usage of yahoo maps with zoom in and zoom out. You can send the requests [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-281" title="yahoo map service" src="http://glurt.com/wp-content/uploads/2009/11/mapimage-300x241.png" alt="yahoo map service" width="300" height="241" />Yahoo provides simple,  great maps service to be handled with php, if you need a fast dynamic solution for your website or web service, yahoo MapService api returns images of geo locations by request url.  We will show you basic usage of yahoo maps with zoom in and zoom out. You can send the requests using ajax technology and to create the application much better with zoom in and zoom out scroller.</p>
<p>The code is in front of you , you will need to get yahoo api developer key before, and to add it in request url :</p>
<p><strong>&lt;?php</strong></p>
<p><strong>$request = &#8216;http://local.yahooapis.com/MapsService/V1/mapImage?appid=YOUR_API_KEY&amp;couuntry=germany&amp;city=berlin&amp;radius=&#8217;.$zoom.&#8217;&amp;output=php&#8217;;</p>
<p>$response = file_get_contents($request);</p>
<p>if ($response === false) {<br />
die(&#8217;Request failed&#8217;);<br />
}</p>
<p>$phpobj = unserialize($response);</p>
<p>echo &#8216;&lt;img src=&#8221;&#8216;.$phpobj["Result"].&#8217;&#8221; alt=&#8221;" /&gt;&#8217;;</strong></p>
<p><strong>?&gt;</strong></p>
<p>let&#8217;s take a look at our request url, and here is the list of GET variables for proper API response :</p>
<ul>
<li>appid &#8211; is your application<a href="https://developer.apps.yahoo.com/devtool/projects"> api key</a> , you should get it on yahoo api request page.</li>
<li>couuntry &#8211; is the country you are looking for</li>
<li>city &#8211; is the city in mentioned country</li>
<li>radius &#8211; the location radius in km.</li>
<li>output &#8211; is the language used for the api response , in our case it is php.</li>
</ul>
<p><strong>$request = &#8216;http://local.yahooapis.com/MapsService/V1/mapImage?appid=YOUR_API_KEY&amp;couuntry=israel&amp;city=haifa&amp;radius=0&amp;output=php&#8217;;</strong></p>
<p><strong>It&#8217;s really simple and could be used as a great resourse for maps inside of application. </strong></p>
<p><strong>Have fun.<br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://glurt.com/yahoo-map-service-php-tutorial/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shrink your url with tiny url api</title>
		<link>http://glurt.com/shrink-your-url-with-tiny-url-api</link>
		<comments>http://glurt.com/shrink-your-url-with-tiny-url-api#comments</comments>
		<pubDate>Thu, 29 Oct 2009 13:01:39 +0000</pubDate>
		<dc:creator>glurt</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://glurt.com/?p=276</guid>
		<description><![CDATA[Url shortening procedure could be much simple if you use url shortening api. Tiny Url api makes it possible to shorten urls with file_get_contents php function. the $u variable is a long variable inserted into the function . Function returns shortened url.
function TinyURL($u){
return file_get_contents(&#8217;http://tinyurl.com/api-create.php?url=&#8217;.$u);
}


]]></description>
			<content:encoded><![CDATA[<p>Url shortening procedure could be much simple if you use url shortening api. Tiny Url api makes it possible to shorten urls with file_get_contents php function. the $u variable is a long variable inserted into the function . Function returns shortened url.</p>
<p><strong>function TinyURL($u){</strong></p>
<p><strong>return file_get_contents(&#8217;http://tinyurl.com/api-create.php?url=&#8217;.$u);</strong></p>
<p><strong>}</strong></p>
<p><strong><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://glurt.com/shrink-your-url-with-tiny-url-api/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Karmic Koala Climbs Into the Software Tree</title>
		<link>http://glurt.com/ubuntu-karmic-koala-climbs-into-the-software-tree</link>
		<comments>http://glurt.com/ubuntu-karmic-koala-climbs-into-the-software-tree#comments</comments>
		<pubDate>Thu, 29 Oct 2009 12:50:42 +0000</pubDate>
		<dc:creator>glurt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://glurt.com/?p=273</guid>
		<description><![CDATA[
Canonical plans to release Ubuntu 9.10, aka Karmic Koala, on Thursday. The open source operating system for both desktops and servers touches down around the same time as Windows 7. Code writers gave special attention to the core server product and kernel in this latest edition. They also asked the user community to list minor [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-274" title="ubuntu_karmic_koala" src="http://glurt.com/wp-content/uploads/2009/10/karmic_koala.jpg" alt="ubuntu_karmic_koala" width="281" height="288" /></p>
<p>Canonical plans to release Ubuntu 9.10, aka Karmic Koala, on Thursday. The open source operating system for both desktops and servers touches down around the same time as Windows 7. Code writers gave special attention to the core server product and kernel in this latest edition. They also asked the user community to list minor annoyances they had with the previous version so they could be tweaked and fixed.</p>
<p>Canonical, the commercial developer of the open source operating system Ubuntu, will release on Thursday Ubuntu 9.10 Server Edition and Ubuntu 9.10 Desktop Edition. The two latest releases, which go by the moniker &#8220;Karmic Koala,&#8221; come on the heals of last week&#8217;s release of Microsoft&#8217;s (Nasdaq: MSFT) Windows 7 operating system.</p>
<p>The latest Ubuntu releases could raise the ante in the competitive field of computer operating systems, where Microsoft, Apple (Nasdaq: AAPL) and open source offerings like Ubuntu vie for users.</p>
<p>Ubuntu 9.10 Server Edition introduces Ubuntu Enterprise Cloud (UEC) as a fully supported technology. Ubuntu 9.10 desktop features a redesigned interface with faster boot and login, a revamped audio framework and improved 3G broadband connectivity.</p>
<p>&#8220;This is a busy week for operating systems. But users get the advantage because it&#8217;s a great time for consumers to try out Ubuntu for free rather than paying for an upgrade to Windows 7,&#8221; Steve George, director of support and products for Canonical, told LinuxInsider.</p>
<h2>Feigned Competition</h2>
<p>Canonical is not planning to initiate a special media campaign against Windows 7, which was released last week. In fact, the fact that both new operating system releases are taking place at roughly the same time is purely accidental, according to George.</p>
<p>&#8220;Actually, we think Microsoft planned its release to coincide with ours,&#8221; quipped George.</p>
<p>The nomenclature for Canonical&#8217;s release timetable is based on the year and month of the planned release. So Ubuntu 9.10 stands for 2009, 10th month. This latest version comes with free security upgrades for 18 months, he explained.</p>
<h2>Server Specifics</h2>
<p>Code writers gave special attention to the core server product and kernel in this latest edition. For example, numerous kernel improvements support both Xen (guest) and KVM (host and guest) virtualization. Caching performance is also improved.</p>
<p>Developers added MySQL 5.1 and upgraded the directory stack and Single Sign On tools for improved directory integration. This version offers fully supported framework enhancing Web server options.</p>
<p>Also included is support for the USB 3.0 protocol to handle higher transfer rates when those devices become available. Server users will get additional system management support through the WBEM (Web-based enterprise management) protocols, which open up support of Ubuntu environment to the most popular system management tools currently deployed in enterprises.</p>
<p>Ubuntu&#8217;s own systems management tool, Landscape, now has a dedicated server for its hosted version that allows deployments to be managed entirely within the firewall and will fully support Ubuntu 9.10 Server Edition and Ubuntu Enterprise Cloud.</p>
<h2>Desktop Delights</h2>
<p>In their approach to growing this newest Ubuntu version, Canonical code writers made it a point to focus on details. The 100 Paper Cuts initiative organized with the Ubuntu community allowed users to nominate minor annoyances that impacted their enjoyment of the platform.</p>
<p>That feedback so far led to over 50 fixes that removed minor irritants, such as inconsistent naming or poorly organized application choices. Larger-scale user experience improvements include a refreshed Ubuntu Software Center. This gives users easier access to information about the software available and brings the world of open source applications closer to them.</p>
<h2>Plus One More</h2>
<p>Ubuntu 9.10 includes the integration of &#8216;Ubuntu One&#8217; as a standard component of the desktop. This is an umbrella name for a suite of online services which were released in beta in May 2009.</p>
<p>Ubuntu One offers users an enhanced desktop experience with simplified backup, synchronization and sharing of files with an expanded set of features including Tomboy Notes and contacts synchronization.</p>
<p>Netbook and smartbook users will be able to use the Ubuntu 9.10 Netbook Remix (UNR) interface. UNR integrates the Empathy instant messaging program for text, voice, video and file transfers to make communication easier.</p>
<h2>Effortless Experience</h2>
<p>&#8220;Ubuntu 9.10 gives users more reasons than ever to seriously consider Linux at a time when many are thinking again about their operating system options. We are delivering a platform for users interested in an easy-to-use, great-looking, Web-friendly operating system,&#8221; said Jane Silber, COO at Canonical.</p>
<p>Deployment on popular notebook, desktop and netbook models continue to drive Ubuntu into the mainstream of computing choices, she said.</p>
<h2>Opportune Time</h2>
<p>The main significance for consumers to consider Ubuntu as an alternative to Windows 7 is the cost of upgrading, according to George. The new release will work with most current-generation hardware, so users will not have to worry about costly upgrades, he explained.</p>
<p>&#8220;We see three main reasons to consider Ubuntu as a Windows 7 alternative. One is it is easy to use. Two, it&#8217;s fun to work with a beautiful interface. Three, Ubuntu comes with all the applications consumers and business users need,&#8221; said George.</p>
<p>Consumers can install the latest Ubuntu release within Windows XP or Windows Vista to try out a fully functional version of the open source operating system, noted George. This way, the existing Windows environment remains intact on the user&#8217;s computer until a decision is made between migrating to Ubuntu or staying with Windows.</p>
]]></content:encoded>
			<wfw:commentRss>http://glurt.com/ubuntu-karmic-koala-climbs-into-the-software-tree/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New phishing attack on twitter</title>
		<link>http://glurt.com/new-phishing-attack-on-twitter</link>
		<comments>http://glurt.com/new-phishing-attack-on-twitter#comments</comments>
		<pubDate>Thu, 29 Oct 2009 12:42:00 +0000</pubDate>
		<dc:creator>glurt</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[phishing]]></category>
		<category><![CDATA[scam]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://glurt.com/?p=270</guid>
		<description><![CDATA[Twitter announced on Wednesday about a new phishing attack in which direct messages to users link to a fake log-in page that steals passwords.
&#8220;We&#8217;ve seen a few phishing attempts today; if you&#8217;ve received a strange (direct message), and it takes you to a Twitter log-in page, don&#8217;t do it!&#8221; the Twitter spam warning says.
The direct [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-271" title="TwitterPhish_610x353" src="http://glurt.com/wp-content/uploads/2009/10/TwitterPhish_610x353-300x173.png" alt="TwitterPhish_610x353" width="300" height="173" />Twitter announced on Wednesday about a new phishing attack in which direct messages to users link to a fake log-in page that steals passwords.</p>
<p>&#8220;We&#8217;ve seen a few phishing attempts today; if you&#8217;ve received a strange (direct message), and it takes you to a Twitter log-in page, don&#8217;t do it!&#8221; the Twitter spam warning says.</p>
<p>The direct messages say: &#8220;hi. this you on here? http://blogger.djh****.com,&#8221; Sophos reports in a blog post. The full URL is obscured to prevent people from unwittingly visiting the phishing site.</p>
<p>Clicking on the link takes a user to a page that looks like a legitimate Twitter log-in page. When the user types in the username and password, a fake version of Twitter&#8217;s &#8220;over capacity&#8221; message is displayed, with the image of the notorious &#8220;fail whale&#8221; held aloft by birds.</p>
<p>Scam message is sent automatically by phishing bot program, there are the couple of fake users registered under various usernames , the message is received through. You may also receive this kind of message from your followers, don&#8217;t unfollow them, send them a message and ask to change their twitter passwords.</p>
<p>If you have been duped by this phishing ruse, Glurt suggests that you immediately change your password at Twitter and any other sites where you used the same log-in credentials.</p>
]]></content:encoded>
			<wfw:commentRss>http://glurt.com/new-phishing-attack-on-twitter/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
