<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Neo22s</title> <link>http://neo22s.com</link> <description>Web development, scripts, source code and IT stuff</description> <lastBuildDate>Fri, 12 Mar 2010 10:35:07 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Neo22s" /><feedburner:info uri="neo22s" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><title>Open Classifieds 1.6.2 released</title><link>http://feedproxy.google.com/~r/Neo22s/~3/c1g7Ua9VQnY/</link> <comments>http://neo22s.com/open-classifieds-1-6-2-released/#comments</comments> <pubDate>Fri, 12 Mar 2010 10:35:07 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[Open Classifieds]]></category><guid isPermaLink="false">http://neo22s.com/?p=1061</guid> <description><![CDATA[I know it&#8217;s just 4 days since last release. But today we found a bug, that made display always the mobile theme to the IE browsers&#8230;.big mistake my apologies. Also please see that our reaction against a bug (even if it&#8217;s not a security one) it&#8217;s pretty fast, we want this software to be reliable. I&#8217;ve made just [...]]]></description> <content:encoded><![CDATA[<p>I know it&#8217;s just 4 days since last release.</p><p>But today we found a bug, that made display always the mobile theme to the IE browsers&#8230;.big mistake my apologies.</p><p>Also please see that our reaction against a bug (even if it&#8217;s not a security one) it&#8217;s pretty fast, we want this software to be reliable.</p><p>I&#8217;ve made just 2 changes more:</p><p>V 1.6.2<br /> Bug in themes.php, displayed mobile theme to IE browsers<br /> To install don&#8217;t require curl<br /> Compressed pages to browser that support it, using ob_gzhandler</p><p><strong>To upgrade from 1.6.1 you can simply <a href="https://sourceforge.net/projects/openclassifieds/files/openclassifieds/1.6.2/Open_Classifieds_1.6.2.tar.gz/download">dowload 1.6.2</a> and replace the files themes.php and functions.php from the /includes path</strong></p><p>Once more sorry for any inconvenience :(</p><p>from <a href="http://open-classifieds.com/2010/03/12/open-classifieds-1-6-2-released/">Open Classifieds blog</a></p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/c1g7Ua9VQnY" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/open-classifieds-1-6-2-released/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://neo22s.com/open-classifieds-1-6-2-released/</feedburner:origLink></item> <item><title>Compress HTML before sending to the browser</title><link>http://feedproxy.google.com/~r/Neo22s/~3/PfvoKqoOE8M/</link> <comments>http://neo22s.com/compress-html-before-sending-to-the-browser/#comments</comments> <pubDate>Fri, 12 Mar 2010 10:21:16 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[PHP]]></category><guid isPermaLink="false">http://neo22s.com/?p=1059</guid> <description><![CDATA[Hany function ob_gzhandler that help facilitate sending gz-encoded data to web browsers that support compressed web pages. This is the way I do it, checking the extension it&#8217;s loaded and that it&#8217;s possible to start the encoding:if &#40;extension_loaded&#40;'zlib'&#41;&#41; &#123;//check extension is loaded if&#40;!ob_start&#40;&#34;ob_gzhandler&#34;&#41;&#41; ob_start&#40;&#41;;//start HTML compression, if not normal buffer input mode &#125;]]></description> <content:encoded><![CDATA[<p>Hany function <a href="http://php.net/manual/en/function.ob-gzhandler.php">ob_gzhandler</a> that help facilitate sending gz-encoded data to web browsers that support compressed web pages.</p><p>This is the way I do it, checking the extension it&#8217;s loaded and that it&#8217;s possible to start the encoding:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">extension_loaded</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'zlib'</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;">//check extension is loaded</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">ob_start</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ob_gzhandler&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #990000;">ob_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//start HTML compression, if not normal buffer input mode</span>
<span style="color: #009900;">&#125;</span></pre></div></div><img src="http://feeds.feedburner.com/~r/Neo22s/~4/PfvoKqoOE8M" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/compress-html-before-sending-to-the-browser/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://neo22s.com/compress-html-before-sending-to-the-browser/</feedburner:origLink></item> <item><title>Open Classifieds 1.6.1 released</title><link>http://feedproxy.google.com/~r/Neo22s/~3/bDsJHMW5V2Y/</link> <comments>http://neo22s.com/open-classifieds-1-6-1-released/#comments</comments> <pubDate>Mon, 08 Mar 2010 17:45:30 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[Open Classifieds]]></category><guid isPermaLink="false">http://neo22s.com/?p=949</guid> <description><![CDATA[New release! There&#8217;s plenty of new things and improvements, please update to the newest version. Download Open Classifieds 1.6.1 Release notes: Improved all seo thanks to  SEO Marbella: Señor Muñoz Languages now they use the acronym ex Spanish = ES Header HTML with the language name. Bug: was not possible to erase images on post delete. Bug: the script file name is not [...]]]></description> <content:encoded><![CDATA[<p>New release!</p><p>There&#8217;s plenty of new things and improvements, please update to the newest version.</p><h2><a title="Download Open Classifieds 1.6.1" href="https://sourceforge.net/projects/openclassifieds/files/openclassifieds/1.6.1/Open_Classifieds_1.6.1.tar.gz/download" target="_blank">Download Open Classifieds 1.6.1</a></h2><p><strong>Release notes:</strong><span id="more-949"></span></p><div id="_mcePaste">Improved all seo thanks to <span style="font-family: TrebuchetMS, Arial, sans-serif; line-height: 16px;"> <a style="color: #0066b3; background: inherit; text-decoration: none;" title="Consultoria de Internet. Especialista en SEO, Posicionamiento en buscadores, diseño web, y marketing en Internet. Campañas de SEM y pago por clic." href="http://www.senormunoz.es/" target="_blank">SEO Marbella: Señor Muñoz</a></span></div><div><span style="font-family: TrebuchetMS, Arial, sans-serif; line-height: 16px;"><a style="color: #0066b3; background: inherit; text-decoration: none;" title="Consultoria de Internet. Especialista en SEO, Posicionamiento en buscadores, diseño web, y marketing en Internet. Campañas de SEM y pago por clic." href="http://www.senormunoz.es/" target="_blank"></a><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px;">Languages now they use the acronym ex Spanish = ES</span></span></div><div id="_mcePaste">Header HTML with the language name.</div><div id="_mcePaste">Bug: was not possible to erase images on post delete.</div><div id="_mcePaste">Bug: the script file name is not always the same for all servers, now works different in controller.php</div><div id="_mcePaste">Fixed few bugs short tags related</div><div id="_mcePaste">Renamed define ENVIRONMENT for DEBUG, now accepts only true or false, in functions.php</div><div id="_mcePaste">Fixed some problems with sitemap when you disable friendly url</div><div id="_mcePaste">New function that returns the item URL, in common.php</div><div id="_mcePaste">New URL structure to improve SEO, old URL will redirect 301 to the new ones ;)</div><div id="_mcePaste">Changes in .htaccess for better SEO, and replaced Options +FollowSymlinks for Options +SymLinksIfOwnerMatch</div><div id="_mcePaste">Changed the meta description length</div><div id="_mcePaste">Changes in /admin/, optimize db, new admin index</div><div id="_mcePaste">Ping to google sitemap, new functionality and new define</div><div id="_mcePaste">Sitemap compressed using gzip, sitemap.xml.gz</div><div id="_mcePaste">Type will not use sessions anymore since there&#8217;s plenty of problems when browsing.</div><div id="_mcePaste">Added to filter by type in advanced search.</div><div id="_mcePaste">Updated to phpMyDB 0.3</div><div id="_mcePaste">On install you can choose to use some sample data to start working</div><div id="_mcePaste">Improved installation, checking all the requirements before continue</div><div id="_mcePaste">Contact, Sitemap, Privacy, Search, Rss,New Item, Manage Item and Error now in folder /content/</div><div id="_mcePaste">Gmail can be configured from the settings</div><div id="_mcePaste">Settings panel in admin with new feel and look.</div><div id="_mcePaste">Mobile theme by default activated if its a mobile device</div><div><p><strong><span style="font-family: TrebuchetMS, Arial, sans-serif; font-weight: normal; line-height: 16px;"><strong>How to upgrade from previous versions:</strong></span></strong></p><p><strong></p><ul style="padding: 0px; margin: 0px;"><li style="list-style-type: none;">Make a backup of your files and DB, just in case</li><li style="list-style-type: none;">Erase the files form your FTP (<strong>NOT the folder /images/</strong>)</li><li style="list-style-type: none;">Upload the new files</li><li style="list-style-type: none;">Run http://yoursite.com/install/</li><li style="list-style-type: none;">Done</li></ul><p></strong></div><p>From <a href="http://open-classifieds.com/2010/03/08/open-classifieds-1-6-1-released/">open classifieds blog</a></p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/bDsJHMW5V2Y" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/open-classifieds-1-6-1-released/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://neo22s.com/open-classifieds-1-6-1-released/</feedburner:origLink></item> <item><title>Detect file extension in PHP</title><link>http://feedproxy.google.com/~r/Neo22s/~3/tNlRXKe3D30/</link> <comments>http://neo22s.com/detect-file-extension-in-php/#comments</comments> <pubDate>Sun, 07 Mar 2010 18:16:05 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[PHP]]></category><guid isPermaLink="false">http://neo22s.com/?p=944</guid> <description><![CDATA[Super easy trick to find a file extension:$file=&#34;some_file.jpg&#34;; $ext=end&#40;explode&#40;&#34;.&#34;, $file&#41;;Other ways: Substring:$ext = substr&#40;$file, strrpos&#40;$file, '.'&#41; + 1&#41;;Using path info:$info = pathinfo&#40;$file&#41;; $ext=$info&#91;'extenstion'&#93;;]]></description> <content:encoded><![CDATA[<p>Super easy trick to find a file extension:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$file</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;some_file.jpg&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ext</span><span style="color: #339933;">=</span><span style="color: #990000;">end</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;.&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Other ways:</p><p>Substring:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$ext</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #990000;">strrpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'.'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Using path info:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$info</span> <span style="color: #339933;">=</span> <span style="color: #990000;">pathinfo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ext</span><span style="color: #339933;">=</span><span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'extenstion'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div><img src="http://feeds.feedburner.com/~r/Neo22s/~4/tNlRXKe3D30" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/detect-file-extension-in-php/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://neo22s.com/detect-file-extension-in-php/</feedburner:origLink></item> <item><title>Function to check if visitor is a bot</title><link>http://feedproxy.google.com/~r/Neo22s/~3/jzxVzN1fCDY/</link> <comments>http://neo22s.com/function-to-check-if-visitor-is-a-bot/#comments</comments> <pubDate>Thu, 04 Mar 2010 17:57:11 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[PHP]]></category><guid isPermaLink="false">http://neo22s.com/?p=937</guid> <description><![CDATA[This function will check whether the visitor is a search engine robotfunction is_bot&#40;&#41;&#123; $botlist = array&#40;&#34;Teoma&#34;, &#34;alexa&#34;, &#34;froogle&#34;, &#34;Gigabot&#34;, &#34;inktomi&#34;, &#34;looksmart&#34;, &#34;URL_Spider_SQL&#34;, &#34;Firefly&#34;, &#34;NationalDirectory&#34;, &#34;Ask Jeeves&#34;, &#34;TECNOSEEK&#34;, &#34;InfoSeek&#34;, &#34;WebFindBot&#34;, &#34;girafabot&#34;, &#34;crawler&#34;, &#34;www.galaxy.com&#34;, &#34;Googlebot&#34;, &#34;Scooter&#34;, &#34;Slurp&#34;, &#34;msnbot&#34;, &#34;appie&#34;, &#34;FAST&#34;, &#34;WebBug&#34;, &#34;Spade&#34;, &#34;ZyBorg&#34;, &#34;rabaz&#34;, &#34;Baiduspider&#34;, &#34;Feedfetcher-Google&#34;, &#34;TechnoratiSnoop&#34;, &#34;Rankivabot&#34;, &#34;Mediapartners-Google&#34;, &#34;Sogou web spider&#34;, &#34;WebAlta Crawler&#34;,&#34;TweetmemeBot&#34;, &#34;Butterfly&#34;,&#34;Twitturls&#34;,&#34;Me.dium&#34;,&#34;Twiceler&#34;&#41;; &#160; foreach&#40;$botlist as $bot&#41;&#123; if&#40;strpos&#40;$_SERVER&#91;'HTTP_USER_AGENT'&#93;,$bot&#41;!==false&#41; return true;	// Is a bot &#125; &#160; return false;	// Not a bot &#125;There&#8217;s [...]]]></description> <content:encoded><![CDATA[<p>This function will check whether the visitor is a search engine robot</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> is_bot<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$botlist</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Teoma&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;alexa&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;froogle&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Gigabot&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;inktomi&quot;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">&quot;looksmart&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;URL_Spider_SQL&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Firefly&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;NationalDirectory&quot;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">&quot;Ask Jeeves&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;TECNOSEEK&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;InfoSeek&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;WebFindBot&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;girafabot&quot;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">&quot;crawler&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;www.galaxy.com&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Googlebot&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Scooter&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Slurp&quot;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">&quot;msnbot&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;appie&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;FAST&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;WebBug&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Spade&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;ZyBorg&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;rabaz&quot;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">&quot;Baiduspider&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Feedfetcher-Google&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;TechnoratiSnoop&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Rankivabot&quot;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">&quot;Mediapartners-Google&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Sogou web spider&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;WebAlta Crawler&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;TweetmemeBot&quot;</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">&quot;Butterfly&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;Twitturls&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;Me.dium&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;Twiceler&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$botlist</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$bot</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<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;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #000088;">$bot</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">!==</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>	<span style="color: #666666; font-style: italic;">// Is a bot</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>	<span style="color: #666666; font-style: italic;">// Not a bot</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>There&#8217;s any other better way?</p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/jzxVzN1fCDY" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/function-to-check-if-visitor-is-a-bot/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://neo22s.com/function-to-check-if-visitor-is-a-bot/</feedburner:origLink></item> <item><title>Ping your sitemap.xml to Google</title><link>http://feedproxy.google.com/~r/Neo22s/~3/jXvSD7-fFkA/</link> <comments>http://neo22s.com/ping-your-sitemap-xml-to-google/#comments</comments> <pubDate>Sun, 28 Feb 2010 18:56:29 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[PHP]]></category><guid isPermaLink="false">http://neo22s.com/?p=934</guid> <description><![CDATA[Not to long a go we explained how to generate a sitemap.xml with PHP. Well, there was something missing and I think really important, to ping Google about the changes in the sitemap. Simplest way of doing this:file_get_contents&#40;'http://www.google.com/webmasters/sitemaps/ping?sitemap=http://yoursite.com/sitemap.xml'&#41;;Remember to register your site at Google webmaster tools, since if you don&#8217;t will not work. ]]></description> <content:encoded><![CDATA[<p>Not to long a go we explained how to <a href="http://neo22s.com/php-sitemap-xml-generator/">generate a sitemap.xml with PHP</a>.</p><p>Well, there was something missing and I think really important, to ping Google about the changes in the sitemap.</p><p>Simplest way of doing this:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://www.google.com/webmasters/sitemaps/ping?sitemap=http://yoursite.com/sitemap.xml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Remember to register your site at <a href="http://www.google.com/webmasters/tools/">Google webmaster tools</a>, since if you don&#8217;t will not work.</p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/jXvSD7-fFkA" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/ping-your-sitemap-xml-to-google/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://neo22s.com/ping-your-sitemap-xml-to-google/</feedburner:origLink></item> <item><title>Check requirements for PHP web application</title><link>http://feedproxy.google.com/~r/Neo22s/~3/QtOf1p4FRps/</link> <comments>http://neo22s.com/check-requirements-for-php-web-application/#comments</comments> <pubDate>Fri, 26 Feb 2010 16:20:58 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[PHP]]></category><guid isPermaLink="false">http://neo22s.com/?p=926</guid> <description><![CDATA[Imagine that you need to have an installation form for your web app. Of course you will need to ask many things, but before you ask, what about been sure the client match all the software requirements? Check the PHP version:$phpversion = substr&#40;PHP_VERSION, 0, 6&#41;; if&#40;$phpversion &#62;= 5.2&#41; &#123; echo &#34;Right PHP [...]]]></description> <content:encoded><![CDATA[<p>Imagine that you need to have an installation form for your web app.</p><p>Of course you will need to ask many things, but before you ask, <strong>what about been sure the client match all the software requirements?</strong></p><p><strong>Check the PHP version:<br /> </strong></p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$phpversion</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">PHP_VERSION</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">6</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$phpversion</span> <span style="color: #339933;">&gt;=</span> <span style="color:#800080;">5.2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
       <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Right PHP version&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;No, you can't continue with the installation&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>In this example we require 5.2 at least to continue.</p><p><strong>Check extension loaded in PHP:</strong></p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">extension_loaded</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'curl'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Not found, please proceed to install'</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Found'</span><span style="color: #339933;">;</span></pre></div></div><p>In this example we check that CURL it&#8217;s loaded.</p><p><strong>Checking apache module installed:<br /> </strong></p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">in_array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mod_rewrite'</span><span style="color: #339933;">,</span><span style="color: #990000;">apache_get_modules</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Found'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Not found'</span><span style="color: #339933;">;</span></pre></div></div><p>In this example we check that mod_rewrite it&#8217;s loaded.</p><p><strong>Checking folder permissions:<br /> </strong></p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">is_writable</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/images'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'OK - Writable'</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span> 
<span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/images'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'File Not Found'</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;">'Unwritable (check permissions, chmod 755 should fix this)'</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p><strong>Checking mysql connection:<br /> </strong></p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">mysql_connect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;DB_HOST&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;DB_USER&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;DB_PASS&quot;</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: #000088;">$msg</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: #b1b100;">echo</span> <span style="color: #0000ff;">'Mysql error:'</span> <span style="color: #339933;">.</span><span style="color: #000088;">$msg</span><span style="color: #339933;">;</span>
	<span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;connected!&quot;</span><span style="color: #339933;">;</span></pre></div></div><img src="http://feeds.feedburner.com/~r/Neo22s/~4/QtOf1p4FRps" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/check-requirements-for-php-web-application/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://neo22s.com/check-requirements-for-php-web-application/</feedburner:origLink></item> <item><title>Read RSS in PHP with cache</title><link>http://feedproxy.google.com/~r/Neo22s/~3/K0rDei3LCV8/</link> <comments>http://neo22s.com/read-rss-in-php-with-cache/#comments</comments> <pubDate>Wed, 24 Feb 2010 13:57:18 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[PHP]]></category><guid isPermaLink="false">http://neo22s.com/?p=912</guid> <description><![CDATA[Simple function to read RSS where you can set some values:function rssReader&#40;$url,$maxItems=15,$begin=&#34;&#34;,$end=&#34;&#34;&#41;&#123; $rss = simplexml_load_file&#40;$url&#41;; $i=0; if&#40;$rss&#41;&#123; $items = $rss-&#62;channel-&#62;item; [...]]]></description> <content:encoded><![CDATA[<p>Simple function to <strong>read RSS</strong> where you can set some values:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> rssReader<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span><span style="color: #000088;">$maxItems</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">15</span><span style="color: #339933;">,</span><span style="color: #000088;">$begin</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$end</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$rss</span> <span style="color: #339933;">=</span> <span style="color: #990000;">simplexml_load_file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$rss</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$items</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">channel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$items</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">==</span><span style="color: #000088;">$maxItems</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #000088;">$out</span><span style="color: #339933;">;</span>
                <span style="color: #b1b100;">else</span> <span style="color: #000088;">$out</span><span style="color: #339933;">.=</span><span style="color: #000088;">$begin</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;a href=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; target=&quot;_blank&quot; &gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$end</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$out</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div><p>Usage example:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;ul&gt;'</span><span style="color: #339933;">.</span>rssReader<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://neo22s.com/feed/'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;li&gt;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/ul&gt;'</span><span style="color: #339933;">;</span></pre></div></div><p><strong>Using cache with the class <a href="http://neo22s.com/filecache/">fileCache</a>:</strong></p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000000; font-weight: bold;">function</span> rssReader<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span><span style="color: #000088;">$maxItems</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">15</span><span style="color: #339933;">,</span><span style="color: #000088;">$cache</span><span style="color: #339933;">,</span><span style="color: #000088;">$begin</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$end</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$cache</span><span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>bool<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$cache</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$cache</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$cacheRSS</span><span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> fileCache<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//seconds and path</span>
            <span style="color: #000088;">$out</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$cacheRSS</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cache</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//getting values from cache</span>
        <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span> <span style="color: #000088;">$out</span><span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$out</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>	<span style="color: #666666; font-style: italic;">//no values in cache</span>
            <span style="color: #000088;">$rss</span> <span style="color: #339933;">=</span> <span style="color: #990000;">simplexml_load_file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$rss</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000088;">$items</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">channel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #339933;">;</span>
                <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$items</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">==</span><span style="color: #000088;">$maxItems</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$cache</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$cacheRSS</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cache</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span><span style="color: #000088;">$out</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//save cache	</span>
                        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$out</span><span style="color: #339933;">;</span> 
                    <span style="color: #009900;">&#125;</span>
                    <span style="color: #b1b100;">else</span> <span style="color: #000088;">$out</span><span style="color: #339933;">.=</span><span style="color: #000088;">$begin</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;a href=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; target=&quot;_blank&quot; &gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$end</span><span style="color: #339933;">;</span>
                    <span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>   		
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$out</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div><p>Usage example RSS with cache:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;ul&gt;'</span><span style="color: #339933;">.</span>rssReader<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://neo22s.com/feed/'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;li&gt;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/ul&gt;'</span><span style="color: #339933;">;</span></pre></div></div><p>Based on this one from <a href="http://sihantech.wordpress.com/2008/08/06/simple-rss-reader-using-php/">sihan</a>:<span id="more-912"></span></p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://news.google.com/?ned=us&amp;topic=t&amp;output=rss&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$rss</span> <span style="color: #339933;">=</span> <span style="color: #990000;">simplexml_load_file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$rss</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;h1&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">channel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/h1&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;li&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">channel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pubDate</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$items</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">channel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$items</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$link</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$published_on</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pubDate</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$description</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;h3&gt;&lt;a href=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$link</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$title</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/a&gt;&lt;/h3&gt;'</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;span&gt;('</span><span style="color: #339933;">.</span><span style="color: #000088;">$published_on</span><span style="color: #339933;">.</span><span style="color: #0000ff;">')&lt;/span&gt;'</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;p&gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$description</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/p&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div><img src="http://feeds.feedburner.com/~r/Neo22s/~4/K0rDei3LCV8" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/read-rss-in-php-with-cache/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://neo22s.com/read-rss-in-php-with-cache/</feedburner:origLink></item> <item><title>.htaccess for Dreamhost users</title><link>http://feedproxy.google.com/~r/Neo22s/~3/ysSw8n7757I/</link> <comments>http://neo22s.com/htaccess-for-dreamhost-users/#comments</comments> <pubDate>Wed, 24 Feb 2010 08:42:58 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[News]]></category> <category><![CDATA[Open Classifieds]]></category><guid isPermaLink="false">http://neo22s.com/?p=907</guid> <description><![CDATA[If any of you it&#8217;s currently using Dreamhost as Hosting provider, since yesterday they had made some modificataions deprecating &#8220;Options +FollowSymlinks&#8221;. This means your site will return an 500 Error. After talking to the support for more than 1 hour they admitted they have made changes in the policies and now we should use &#8220;Options +SymLinksIfOwnerMatch&#8221; instead. Pretty [...]]]></description> <content:encoded><![CDATA[<p>If any of you it&#8217;s currently using Dreamhost as Hosting provider, since yesterday they had made some modificataions deprecating &#8220;Options +FollowSymlinks&#8221;.</p><p>This means your site will return an 500 Error.</p><p>After talking to the support for more than 1 hour they admitted they have made changes in the policies and now we should use &#8220;Options +SymLinksIfOwnerMatch&#8221; instead.</p><p>Pretty bad communication from them and making this changes without noticing them.</p><p>If you are affected by this issue, please your .htaccess for Open Classifieds should look like this to get to work:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ErrorDocument <span style="color: #000000;">404</span> <span style="color: #000000; font-weight: bold;">/</span>
Options +SymLinksIfOwnerMatch
<span style="color: #000000; font-weight: bold;">&lt;</span>IfModule mod_rewrite.c<span style="color: #000000; font-weight: bold;">&gt;</span>
RewriteEngine on
RewriteBase <span style="color: #000000; font-weight: bold;">/</span>
RewriteRule ^category<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.+<span style="color: #7a0874; font-weight: bold;">&#41;</span> index.php?<span style="color: #007800;">category</span>=$<span style="color: #000000;">1</span>
RewriteRule ^offer<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.+<span style="color: #7a0874; font-weight: bold;">&#41;</span> index.php?<span style="color: #007800;">category</span>=$<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #7a0874; font-weight: bold;">type</span></span>=<span style="color: #000000;">0</span>
RewriteRule ^need<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.+<span style="color: #7a0874; font-weight: bold;">&#41;</span> index.php?<span style="color: #007800;">category</span>=$<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #7a0874; font-weight: bold;">type</span></span>=<span style="color: #000000;">1</span>
RewriteRule ^type<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.+<span style="color: #7a0874; font-weight: bold;">&#41;</span> index.php?<span style="color: #007800;"><span style="color: #7a0874; font-weight: bold;">type</span></span>=$<span style="color: #000000;">1</span>
RewriteRule ^publish-a-new-ad-for-free<span style="color: #000000; font-weight: bold;">/</span> new<span style="color: #000000; font-weight: bold;">/</span>index.php
RewriteRule ^contact<span style="color: #000000; font-weight: bold;">/</span> contact<span style="color: #000000; font-weight: bold;">/</span>index.php
RewriteRule ^privacy-policy<span style="color: #000000; font-weight: bold;">/</span> privacy<span style="color: #000000; font-weight: bold;">/</span>index.php
RewriteRule ^sitemap<span style="color: #000000; font-weight: bold;">/</span> sitemap<span style="color: #000000; font-weight: bold;">/</span>index.php
RewriteRule ^advanced-search<span style="color: #000000; font-weight: bold;">/</span> search<span style="color: #000000; font-weight: bold;">/</span>index.php
RewriteRule ^map<span style="color: #000000; font-weight: bold;">/</span> map<span style="color: #000000; font-weight: bold;">/</span>index.php
RewriteRule ^<span style="color: #7a0874; font-weight: bold;">&#40;</span>.+<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.+<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.+<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.+<span style="color: #7a0874; font-weight: bold;">&#41;</span>$ item.php?<span style="color: #007800;">item</span>=$<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #7a0874; font-weight: bold;">type</span></span>=$<span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">category</span>=$<span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">title</span>=$<span style="color: #000000;">4</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div><p> Remember that needs to be in your language.</p><p>This would be fixed for Open Classifieds 1.6.1 that is coming soon with few improvements to make your life easier.</p><p>I&#8217;m getting pretty annoyed by this hosting, since I use a Privvate Server and this things should never happen (as this other one <a href="http://j.mp/d8WVXY">http://j.mp/d8WVXY</a>).</p><p>More or <a href="http://open-classifieds.com/forum/topic/htaccess-for-dreamhost-users">support for Open Classifieds in the forum</a>.</p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/ysSw8n7757I" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/htaccess-for-dreamhost-users/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://neo22s.com/htaccess-for-dreamhost-users/</feedburner:origLink></item> <item><title>I Love and I Hate WordPress</title><link>http://feedproxy.google.com/~r/Neo22s/~3/QVEh_qyzKT0/</link> <comments>http://neo22s.com/i-love-and-i-hate-wordpress/#comments</comments> <pubDate>Thu, 18 Feb 2010 21:03:18 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[WordPress]]></category><guid isPermaLink="false">http://neo22s.com/?p=896</guid> <description><![CDATA[ I&#8217;ve been using WordPress for over 4 years now.  I also have developed some plugins like Twitter Badge, WP-RIR, WP-PageScroll and I wrote few more thinks about it. We can say that I&#8217;m not the average user but neither I&#8217;m a PRO developer for WP. The point is that as user I Love WordPress but from [...]]]></description> <content:encoded><![CDATA[<p><img src="http://neo22s.s3.amazonaws.com/wp-content/uploads/2010/02/i-love-wordpress.jpg" alt="love wordpress" /></p><p><strong>I&#8217;ve been using WordPress for over 4 years now</strong>.  I also have developed some plugins like <a href="http://neo22s.com/wptwitterbadge/">Twitter Badge</a>, <a href="http://neo22s.com/wp-rir/">WP-RIR</a>, <a href="http://neo22s.com/wp-pagescroll/">WP-PageScroll</a> and <a href="http://neo22s.com/category/wp/">I wrote few more thinks about</a> it.</p><p>We can say that I&#8217;m not the average user but neither I&#8217;m a PRO developer for WP. The point is that as user I Love WordPress but from other side as technician sometimes I HATE IT.</p><p>I had a few discussions with people about the good and the bad things of WP, of course at the end for me it&#8217;s positive, but it<strong> bothers me that there&#8217;s few known issues that they should take care of and they don&#8217;t.</strong></p><p>Anyway here&#8217;s my list with a short description.</p><p><strong>The Love</strong></p><ul><li><strong>Easy</strong>, yep WP it&#8217;s easy and everybody knows how to use it. Great work on it.</li><li><strong>Community</strong>, there&#8217;s a huge community of developers and designers that releases their work for free making this software good.</li><li><strong>GPL,</strong> free software license, what else do you want?</li><li><strong>Custom</strong>, it&#8217;s pretty easy for any normal user to install plugins, themes&#8230;even change them.</li><li><strong>Upgrades and updates</strong>, they are automatically making your life easier, same as 1st point.</li><li><strong>WordCamps</strong>, this is a great idea I may say and I love it!</li></ul><p><strong>The Hate</strong></p><ul><li><strong>Slow</strong>, it maybe fast to you, but for me it&#8217;s a really heavy application to be a blog software. Without plugins to cache content you can&#8217;t run an instance of WP in a shared hosting&#8230;.</li><li><strong>Data Base</strong>, this is terrible, still uses MySam, now many people will say this is an advantage, come on we are in 2010! relational data bases it&#8217;s a must have, and what about normalization?</li><li><strong>Download size,</strong> now a days this is no trouble, but how can be over 2MB size?</li><li><strong>Bugs</strong>, there&#8217;s so many WP installations that some people is trying really hard to hack this software and for instance finding bugs. Thankfully we have a great community that seems to work 24/7.</li><li>Plugins,<strong> I love the plugins</strong> and the work from the community, but you need to be aware what you install in your WP, I know it&#8217;s not the fault of WP, but some how as they do with the themes being picky, should be with plugins testing them even just a little bit.</li></ul><p>As conclusion I will say that<strong> they should focus to improve performance instead of adding features</strong> and more and more features&#8230;.And as I said before <strong>WP it&#8217;s my favorite blogging and even CMS tool</strong>.</p><p><strong>Last words</strong>: Thanks to the WP team and the community for the work they have done, this is just a constructive opinion meaning the best intentions.</p><h6>Image from <a href="http://www.sitepoint.com/blogs/2009/03/03/10-must-have-wordpress-plugins/">sitepoint</a>.</h6> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/QVEh_qyzKT0" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/i-love-and-i-hate-wordpress/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://neo22s.com/i-love-and-i-hate-wordpress/</feedburner:origLink></item> <item><title>Open Classifieds 1.6 Released</title><link>http://feedproxy.google.com/~r/Neo22s/~3/CC_Djj5U18s/</link> <comments>http://neo22s.com/open-classifieds-1-6-released/#comments</comments> <pubDate>Sun, 07 Feb 2010 21:17:32 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[Open Classifieds]]></category><guid isPermaLink="false">http://neo22s.com/?p=892</guid> <description><![CDATA[The latest version of Open Classifieds 1.5.4 was released  the 8th of December. Two months later and with more than 11.100 downloads, I&#8217;m proud to release 1.6. I started working on 1.6 at the ends of 2009 and before the release of today we had two release candidates: RC 1, RC 2. Also I installed RC 2 successfully  in [...]]]></description> <content:encoded><![CDATA[<p>The latest version of <a href="http://neo22s.com/open-classifieds-1-5-4-released/">Open Classifieds 1.5.4 was released  the 8th of December</a>. Two months later and with more than <strong>11.100 downloads</strong>, <strong>I&#8217;m proud to release 1.6.</strong></p><p>I started <a href="/?p=584">working on 1.6</a> at the ends of 2009 and before the release of today we had two release candidates: <a href="/?p=586">RC 1</a>, <a href="/?p=629">RC 2</a>. Also I installed RC 2 successfully  in a few web sites.</p><p>In the upcoming dates we will update all the site FAQs but we already have the <a href="http://open-classifieds.com/forum/forum/16-en">forum</a> and the <a href="http://demo.open-classifieds.com/">demo</a> running.</p><p><strong>What&#8217;s new</strong><br /> Just a briefing of what&#8217;s new:</p><ul><li>Using Db class phpMyDb</li><li>Prefix for DB tables</li><li>Advanced search</li><li>Settings, everything from config.php in a simple form</li><li>Now templates can have their own index (listing) and template for items</li><li>New themes</li><li>New Languages</li><li>Check more in readme.txt</li></ul><p><strong><a href="https://sourceforge.net/projects/openclassifieds/files/openclassifieds/1.6/Open_Classifieds_1.6.tar.gz/download">Download 1.6 now!</a></strong></p><p><strong>How to upgrade from previous versions:</strong></p><ul><li>Make a backup of your files and DB, just in case</li><li>Erase the files form your FTP (<strong>NOT the folder /images/</strong>)</li><li>Upload the new files</li><li>Run http://yoursite.com/install/</li><li>Done</li></ul><p><a href="http://open-classifieds.com/2010/02/07/open-classifieds-1-6-released/">c&#038;p from Open Classifieds blog</a></p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/CC_Djj5U18s" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/open-classifieds-1-6-released/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://neo22s.com/open-classifieds-1-6-released/</feedburner:origLink></item> <item><title>Allow only numbers or letters in HTML inputs</title><link>http://feedproxy.google.com/~r/Neo22s/~3/EVl1Qk77VGs/</link> <comments>http://neo22s.com/allow-only-numbers-or-letters-in-html-inputs/#comments</comments> <pubDate>Thu, 04 Feb 2010 15:22:42 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[JavaScript]]></category><guid isPermaLink="false">http://neo22s.com/?p=885</guid> <description><![CDATA[ What about forcing the user to type a number/letter in the input you want. With just a bit of JavaScript we can control this what is the user typing int he input. Allow only numbers: (also dot and del)function isNumberKey&#40;evt&#41;&#123; var charCode = &#40;evt.which&#41; ? evt.which : event.keyCode; &#160; if&#40;&#40;charCode==46&#124;&#124;charCode==8&#124;&#124;charCode==45&#124;&#124;charCode==47&#41; &#124;&#124;&#40;charCode &#62;= 48 &#38;&#38; charCode &#60;= 57&#41; &#41;&#123; return true; &#125; else [...]]]></description> <content:encoded><![CDATA[<p><script type="text/javascript" src="http://demo.open-classifieds.com/includes/js/forms.js"></script> </p><p>What about forcing the user to type a number/letter in the input you want.</p><p>With just a bit of JavaScript we can control this what is the user typing int he input.</p><p><strong>Allow only numbers:<br /> </strong>(also dot and del)</p><div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> isNumberKey<span style="color: #009900;">&#40;</span>evt<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> charCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">which</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> evt.<span style="color: #660066;">which</span> <span style="color: #339933;">:</span> event.<span style="color: #660066;">keyCode</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>charCode<span style="color: #339933;">==</span><span style="color: #CC0000;">46</span><span style="color: #339933;">||</span>charCode<span style="color: #339933;">==</span><span style="color: #CC0000;">8</span><span style="color: #339933;">||</span>charCode<span style="color: #339933;">==</span><span style="color: #CC0000;">45</span><span style="color: #339933;">||</span>charCode<span style="color: #339933;">==</span><span style="color: #CC0000;">47</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span><span style="color: #009900;">&#40;</span>charCode <span style="color: #339933;">&gt;=</span> <span style="color: #CC0000;">48</span> <span style="color: #339933;">&amp;&amp;</span> charCode <span style="color: #339933;">&lt;=</span> <span style="color: #CC0000;">57</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>		
<span style="color: #009900;">&#125;</span></pre></div></div><p>And to use it in a input would be like this for example:</p><div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;math&quot;</span>  <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span>  <span style="color: #000066;">onkeypress</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;return isNumberKey(event);&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div><p><strong>Try it:</strong> How much is  20+10?<br /> <input id="math"  type="text"  onkeypress="return isNumberKey(event);" /><p><strong>Allow only letters:<br /> </strong> (also space, del, enter)</p><div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> isAlphaKey<span style="color: #009900;">&#40;</span>evt<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> charCode <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>evt.<span style="color: #660066;">which</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> evt.<span style="color: #660066;">which</span> <span style="color: #339933;">:</span> event.<span style="color: #660066;">keyCode</span><span style="color: #339933;">;</span>
	 <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>charCode<span style="color: #339933;">==</span><span style="color: #CC0000;">231</span> <span style="color: #339933;">||</span> charCode<span style="color: #339933;">==</span><span style="color: #CC0000;">199</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>charCode<span style="color: #339933;">==</span><span style="color: #CC0000;">241</span> <span style="color: #339933;">||</span> charCode<span style="color: #339933;">==</span><span style="color: #CC0000;">209</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span><span style="color: #009900;">&#40;</span>charCode<span style="color: #339933;">==</span><span style="color: #CC0000;">8</span> <span style="color: #339933;">||</span> charCode<span style="color: #339933;">==</span><span style="color: #CC0000;">32</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span>charCode <span style="color: #339933;">&gt;=</span> <span style="color: #CC0000;">65</span> <span style="color: #339933;">&amp;&amp;</span> charCode <span style="color: #339933;">&lt;=</span> <span style="color: #CC0000;">90</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>charCode <span style="color: #339933;">&gt;=</span> <span style="color: #CC0000;">97</span> <span style="color: #339933;">&amp;&amp;</span> charCode <span style="color: #339933;">&lt;=</span> <span style="color: #CC0000;">122</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	 	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	 <span style="color: #009900;">&#125;</span>
	 <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
		 <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	 <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>And to use it in a input would be like this for example:</p><div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;name&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span>  <span style="color: #000066;">onkeypress</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;return isAlphaKey(event);&quot;</span>  <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div><p><strong>Try it:</strong> Your name:<br /> <input id="name" type="text"  onkeypress="return isAlphaKey(event);"  /><p>I know should be easier, but just wait a bit for HTML 5 that is going to make our life better. For sure ;)</p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/EVl1Qk77VGs" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/allow-only-numbers-or-letters-in-html-inputs/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://neo22s.com/allow-only-numbers-or-letters-in-html-inputs/</feedburner:origLink></item> <item><title>Post it Board – HTML Template</title><link>http://feedproxy.google.com/~r/Neo22s/~3/LtNI2Ba4KcA/</link> <comments>http://neo22s.com/post-it-board/#comments</comments> <pubDate>Mon, 01 Feb 2010 09:37:58 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[Other]]></category><guid isPermaLink="false">http://neo22s.com/?p=881</guid> <description><![CDATA[ Demo &#124; Download &#124; For Open Classifieds Since I&#8217;m not a web designer, make this templete it&#8217;s been a bit difficult for me. Why I did it then? easy, I want to learn just a bit of CSS, in order of been able to make my own changes also I had an Idea for a template for [...]]]></description> <content:encoded><![CDATA[<p><img src="http://neo22s.s3.amazonaws.com/wp-content/uploads/2010/02/screenshot.png" alt="post it board template HTML" /></p><p><strong><a href="http://lab.neo22s.com//post-it-board/">Demo</a> | </strong><a href="http://neo22s.s3.amazonaws.com/wp-content/uploads/2010/02/post-it-board.zip"><strong>Download</strong></a> | <a href="https://sourceforge.net/projects/openclassifieds/files/openclassifieds/1.6/Themes/post-it-board_Open_Classifieds_1.6.tar.gz/download"><strong>For Open Classifieds</strong></a></p><p>Since I&#8217;m not a web designer, make this templete it&#8217;s been a bit difficult for me.</p><p><strong>Why I did it then?</strong> easy, I want to learn just a bit of CSS, in order of been able to make my own changes also I had an Idea for a template for Open Classifieds but since no one would help me I&#8217;ve decided to do it myself.</p><p><strong>I will not normally release this short of things.</strong></p><p><del datetime="2010-02-08T19:27:45+00:00">With Open Classifieds 1.6, that is coming really soon, I hope I will have this template ready by then ;) In the meantime please try <a href="http://open-classifieds.com/2010/01/21/open-classifieds-1-6-rc2/">1.6 RC 2</a>.</del></p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/LtNI2Ba4KcA" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/post-it-board/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://neo22s.com/post-it-board/</feedburner:origLink></item> <item><title>Browser support for IE 6 is dead</title><link>http://feedproxy.google.com/~r/Neo22s/~3/N4vP7H-18tQ/</link> <comments>http://neo22s.com/browser-support-for-ie-6-is-dead/#comments</comments> <pubDate>Sat, 30 Jan 2010 09:36:40 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[News]]></category><guid isPermaLink="false">http://neo22s.com/?p=879</guid> <description><![CDATA[I hate IE6 as many of you do. Long a go I&#8217;ve decided that my scripts are not going to be tested in ie6 anymore. Few webpages they are not longer supporting ie6 and are recommending to change it, to use other browser. But now the giant the &#8220;Big Boss&#8221; Google is doing one step [...]]]></description> <content:encoded><![CDATA[<p>I <a href="http://neo22s.com/no-ie6/">hate IE6</a> as many of you do. Long a go I&#8217;ve decided that my scripts are not going to be tested in ie6 anymore.</p><p>Few webpages they are not longer supporting ie6 and are recommending to change it, to use other browser. But now the giant the &#8220;Big Boss&#8221; Google is doing one step further to say bye to IE6.</p><p>They sent me this email yesterday that I absolutely aprove!<br /> <span id="more-879"></span></p><blockquote><p> Dear Google Apps admin,​</p><p>In order to continue to improve our products and deliver more sophisticated features and performance, we are harnessing some of the latest improvements in web browser technology.  This includes faster JavaScript processing and new standards like HTML5.  As a result, over the course of 2010, we will be phasing out support for Microsoft Internet Explorer 6.0 as well as other older browsers that are not supported by their own manufacturers.</p><p>We plan to begin phasing out support of these older browsers on the Google Docs suite and the Google Sites editor on March 1, 2010.  After that point, certain functionality within these applications may have higher latency and may not work correctly in these older browsers. Later in 2010, we will start to phase out support for these browsers for Google Mail and Google Calendar.</p><p>Google Apps will continue to support Internet Explorer 7.0 and above, Firefox 3.0 and above, Google Chrome 4.0 and above, and Safari 3.0 and above.</p><p>Starting next week, users on these older browsers will see a message in Google Docs and the Google Sites editor explaining this change and asking them to upgrade their browser.  We will also alert you again closer to March 1 to remind you of this change.</p><p>In 2009, the Google Apps team delivered more than 100 improvements to enhance your product experience.  We are aiming to beat that in 2010 and continue to deliver the best and most innovative collaboration products for businesses.</p><p>Thank you for your continued support!</p><p>Sincerely,</p><p>The Google Apps team</p></blockquote><p>2010 it&#8217;s going to be a better world for web developers ;)</p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/N4vP7H-18tQ" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/browser-support-for-ie-6-is-dead/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://neo22s.com/browser-support-for-ie-6-is-dead/</feedburner:origLink></item> <item><title>Input select generated from query – PHP</title><link>http://feedproxy.google.com/~r/Neo22s/~3/pSNUHslzdJg/</link> <comments>http://neo22s.com/input-select-generated-from-query-php/#comments</comments> <pubDate>Wed, 27 Jan 2010 23:00:31 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[PHP]]></category><guid isPermaLink="false">http://neo22s.com/?p=871</guid> <description><![CDATA[Just a handy function that I use a lot. With this function you can generate an input select from a given query. Parameters: 1- Query to be displayed as a select, the query needs to returns at least 2 values, 1st one for the option value, and the 2nd one for the display value. 2-Input Select name, thisw woud [...]]]></description> <content:encoded><![CDATA[<p>Just a handy function that I use a lot.</p><p>With this function you can generate an input select from a given query.</p><p>Parameters:<br /> 1- Query to be displayed as a select, the query needs to returns at least 2 values, 1st one for the option value, and the 2nd one for the display value.<br /> 2-Input Select name, thisw woud be the name that your select will have in the form.<br /> 3-Which option it&#8217;s selected from the list. I non is set the first one it&#8217;s selected.</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> sqlOption<span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #339933;">,</span><span style="color: #000088;">$name</span><span style="color: #339933;">,</span><span style="color: #000088;">$option</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//generates a select tag with the values specified on the sql, 2nd parameter name for the combo, , 3rd value selected if there's</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$ocdb</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span><span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//1 value needs to be the ID, second the Name, if there's more doens't work</span>
	<span style="color: #000088;">$sqloption</span><span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;select name='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' id='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&gt;
				&lt;option value='0'&gt;Home&lt;/option&gt;&quot;</span><span style="color: #339933;">;</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;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$first</span><span style="color: #339933;">=</span><span style="color: #990000;">mysql_field_name</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$second</span><span style="color: #339933;">=</span><span style="color: #990000;">mysql_field_name</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</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;">$option</span><span style="color: #339933;">==</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$first</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$sel</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;selected=selected&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
			<span style="color: #000088;">$sqloption</span><span style="color: #339933;">=</span><span style="color: #000088;">$sqloption</span> <span style="color: #339933;">.</span>  <span style="color: #0000ff;">&quot;&lt;option &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$sel</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; value='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$first</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&gt;&quot;</span> <span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$second</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/option&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$sel</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
		<span style="color: #000088;">$sqloption</span><span style="color: #339933;">=</span><span style="color: #000088;">$sqloption</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/select&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$sqloption</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>Same function but that can group:<br /> <span id="more-871"></span><br /> Parameters:<br /> 1- Query to be displayed as a select, the query needs to returns at least 2 values, 1st one for the option value, the 2nd one for the display value, and 3rd the value we use to group with.<br /> 2-Input Select name, thisw woud be the name that your select will have in the form.<br /> 3-Which option it&#8217;s selected from the list. I non is set the first one it&#8217;s selected.</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> sqlOptionGroup<span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #339933;">,</span><span style="color: #000088;">$name</span><span style="color: #339933;">,</span><span style="color: #000088;">$option</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//generates a select tag with the values specified on the sql, 2nd parameter name for the combo, , 3rd value selected if there's</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$ocdb</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span><span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//1 value needs to be the ID, second the Name, 3rd is the group</span>
	<span style="color: #666666; font-style: italic;">//echo $sql;</span>
	<span style="color: #000088;">$sqloption</span><span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;select name='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' id='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' onChange=<span style="color: #000099; font-weight: bold;">\&quot;</span>validateNumber(this);<span style="color: #000099; font-weight: bold;">\&quot;</span> lang=false &gt;&lt;option&gt;&lt;/option&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$lastLabel</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</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;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$first</span><span style="color: #339933;">=</span><span style="color: #990000;">mysql_field_name</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$second</span><span style="color: #339933;">=</span><span style="color: #990000;">mysql_field_name</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$third</span><span style="color: #339933;">=</span> <span style="color: #990000;">mysql_field_name</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">2</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;">$lastLabel</span><span style="color: #339933;">!=</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$third</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lastLabel</span><span style="color: #339933;">!=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$sqloption</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;/optgroup&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #000088;">$sqloption</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;optgroup label='<span style="color: #006699; font-weight: bold;">$row</span>[<span style="color: #006699; font-weight: bold;">$third</span>]'&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$lastLabel</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$third</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$option</span><span style="color: #339933;">==</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$first</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000088;">$sel</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;selected=selected&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span>
			<span style="color: #000088;">$sqloption</span><span style="color: #339933;">=</span><span style="color: #000088;">$sqloption</span> <span style="color: #339933;">.</span>  <span style="color: #0000ff;">&quot;&lt;option &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$sel</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; value='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$first</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&gt;&quot;</span> <span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$second</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/option&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$sel</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
		<span style="color: #000088;">$sqloption</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot;&lt;/optgroup&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$sqloption</span><span style="color: #339933;">=</span><span style="color: #000088;">$sqloption</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/select&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$sqloption</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p><strong>NOTE:</strong> Requires <a href="http://neo22s.com/phpmydb/">phpMyDB</a>.</p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/pSNUHslzdJg" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/input-select-generated-from-query-php/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://neo22s.com/input-select-generated-from-query-php/</feedburner:origLink></item> <item><title>Get visitor IP address – PHP</title><link>http://feedproxy.google.com/~r/Neo22s/~3/KTO85cYnwrg/</link> <comments>http://neo22s.com/get-visitor-ip-address-php/#comments</comments> <pubDate>Tue, 26 Jan 2010 22:42:47 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[PHP]]></category><guid isPermaLink="false">http://neo22s.com/?p=869</guid> <description><![CDATA[Simple code of the day:function getIp&#40;&#41;&#123;//obtain the ip // if getenv results in something, proxy detected if &#40;getenv&#40;'HTTP_X_FORWARDED_FOR'&#41;&#41; &#123; $ip=getenv&#40;'HTTP_X_FORWARDED_FOR'&#41;; &#125; else &#123;// otherwise no proxy detected $ip=getenv&#40;'REMOTE_ADDR'&#41;; &#125; &#160; return $ip; &#125;Anyway of doing this better? ]]></description> <content:encoded><![CDATA[<p>Simple code of the day:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> getIp<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//obtain the ip</span>
		<span style="color: #666666; font-style: italic;">// if getenv results in something, proxy detected</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">getenv</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'HTTP_X_FORWARDED_FOR'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$ip</span><span style="color: #339933;">=</span><span style="color: #990000;">getenv</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'HTTP_X_FORWARDED_FOR'</span><span style="color: #009900;">&#41;</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;">// otherwise no proxy detected</span>
			<span style="color: #000088;">$ip</span><span style="color: #339933;">=</span><span style="color: #990000;">getenv</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'REMOTE_ADDR'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$ip</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>Anyway of doing this better?</p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/KTO85cYnwrg" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/get-visitor-ip-address-php/feed/</wfw:commentRss> <slash:comments>4</slash:comments> <feedburner:origLink>http://neo22s.com/get-visitor-ip-address-php/</feedburner:origLink></item> <item><title>Open Classifieds 1.6 RC2</title><link>http://feedproxy.google.com/~r/Neo22s/~3/cAmO0MAyKME/</link> <comments>http://neo22s.com/open-classifieds-1-6-rc2/#comments</comments> <pubDate>Thu, 21 Jan 2010 12:40:58 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[Open Classifieds]]></category><guid isPermaLink="false">http://neo22s.com/?p=865</guid> <description><![CDATA[New Release Candidate for 1.6 now the RC2. Please DOWNLOAD try / test and give me feed back in the forum for this release. Open Classifieds 1.6 RC2 demo. New things: Fixed many bugs. addthis instead of the older slower service add to any Now templates can have their own index (listing) and template for items (check theme gallery-blue to see what I [...]]]></description> <content:encoded><![CDATA[<p><a href="http://open-classifieds.com/2010/01/21/open-classifieds-1-6-rc2/">New Release Candidate for 1.6 now the RC2.</a></p><p>Please <a href="http://neo22s.s3.amazonaws.com/wp-content/uploads/2010/01/OpenClassifieds_1.6_RC2.tar.gz">DOWNLOAD</a> try / test and give me feed back in the <a href="http://open-classifieds.com/forum/forum/16-rc-2">forum for this release</a>.</p><p><a href="http://open-classifieds.com/rc16/">Open Classifieds 1.6 RC2 demo.</a></p><p><strong>New things:</strong></p><p>Fixed many bugs.<br /> addthis instead of the older slower service add to any<br /> Now templates can have their own index (listing) and template for items (check theme gallery-blue to see what I mean)<br /> Using j.mp instead of bit.ly to short urls<br /> sort ads by price asc or desc in advanced search<br /> Improved seo now friendly urls for new, contact, sitemap, privacy, advanced search&#8230;</p><p><strong>Neeed translation for all languages (except english and spanish):</strong></p><pre>
//1.6 new words!
define ("T_SORT","Sort");
define ("T_LINKS","Links");
define ("T_ERROR_CODE","There was a problem with your post. Please do not include code. <a href="javascript:history.go(-1)">Go Back</a>");
define ("T_SPAM_CONTACT","Ups! Spam? if you are not spam contact us.");
define ("T_SPAM","Spam");
define ("T_NO_SPAM","NO Spam!");
define ("T_SPAM_REPORTED","Spam reported");
define ("T_PRIVACY_COUNTRY","Spain");
define ("T_MAP","Map");
define ("T_ADV_SEARCH","Advanced search");
</pre><p>Please try and report.</p><p>Thanks!</p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/cAmO0MAyKME" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/open-classifieds-1-6-rc2/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://neo22s.com/open-classifieds-1-6-rc2/</feedburner:origLink></item> <item><title>PHP Set format date</title><link>http://feedproxy.google.com/~r/Neo22s/~3/NnV_r628d_w/</link> <comments>http://neo22s.com/php-set-format-date/#comments</comments> <pubDate>Tue, 19 Jan 2010 09:06:16 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[PHP]]></category><guid isPermaLink="false">http://neo22s.com/?p=862</guid> <description><![CDATA[Just a function to change the format of a mysql date to the one you want to.function setDate&#40;$L_date,$L_dateFormat=&#34;dd-mm-yyyy&#34;&#41;&#123;//sets a date in a format if&#40;strlen&#40;$L_date&#41;&#62;0&#41;&#123; $L_arrTemp = split&#40;&#34; &#34;,$L_date&#41;; $L_strDate = $L_arrTemp&#91;0&#93;; // 2007-07-21 year month day $L_arrDate = split&#40;&#34;-&#34;,$L_strDate&#41;;// split date $L_strYear =  $L_arrDate&#91;0&#93;; $L_strMonth = $L_arrDate&#91;1&#93;; $L_strDay = $L_arrDate&#91;2&#93;; &#160; if&#40;$L_dateFormat == 'yyyy-mm-dd'&#41;&#123;//default return $L_arrTemp&#91;0&#93;; [...]]]></description> <content:encoded><![CDATA[<p>Just a function to change the format of a mysql date to the one you want to.</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> setDate<span style="color: #009900;">&#40;</span><span style="color: #000088;">$L_date</span><span style="color: #339933;">,</span><span style="color: #000088;">$L_dateFormat</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;dd-mm-yyyy&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//sets a date in a format</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$L_date</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: #000088;">$L_arrTemp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">split</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$L_date</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$L_strDate</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$L_arrTemp</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 2007-07-21 year month day</span>
		<span style="color: #000088;">$L_arrDate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">split</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;-&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$L_strDate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">// split date </span>
		<span style="color: #000088;">$L_strYear</span> <span style="color: #339933;">=</span>  <span style="color: #000088;">$L_arrDate</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$L_strMonth</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$L_arrDate</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$L_strDay</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$L_arrDate</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$L_dateFormat</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'yyyy-mm-dd'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//default</span>
		    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$L_arrTemp</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$L_dateFormat</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;dd-mm-yyyy&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//day month year</span>
			<span style="color: #000088;">$returnDate</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$L_strDay</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;-&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$L_strMonth</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;-&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$L_strYear</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$returnDate</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$L_dateFormat</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;mm-dd-yyyy&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//month day year</span>
			<span style="color: #000088;">$returnDate</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$L_strMonth</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;-&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$L_strDay</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;-&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$L_strYear</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$returnDate</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: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><img src="http://feeds.feedburner.com/~r/Neo22s/~4/NnV_r628d_w" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/php-set-format-date/feed/</wfw:commentRss> <slash:comments>6</slash:comments> <feedburner:origLink>http://neo22s.com/php-set-format-date/</feedburner:origLink></item> <item><title>Open Classifieds 1.6 RC1</title><link>http://feedproxy.google.com/~r/Neo22s/~3/2_zYAQJb01I/</link> <comments>http://neo22s.com/open-classifieds-1-6-rc1/#comments</comments> <pubDate>Wed, 13 Jan 2010 11:54:56 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[Open Classifieds]]></category><guid isPermaLink="false">http://neo22s.com/?p=855</guid> <description><![CDATA[Finally I have the first Release Candidate for 1.6. Please DOWNLOAD try / test and give me feed back in the forum for this release. Open Classifieds 1.6 RC1 demo. Once more the change log for V 1.6 RC1:Romanian language thank to tutankanon, russian thanks to levgen, italian thanks to paolo Now languages are in /languages/ Created include controller that [...]]]></description> <content:encoded><![CDATA[<p>Finally I have the first <a href="http://open-classifieds.com/2010/01/13/open-classifieds-1-6-rc1/">Release Candidate for 1.6</a>.</p><p>Please <a href="http://neo22s.s3.amazonaws.com/wp-content/uploads/2010/01/OpenClassifieds_1.6_RC1.tar.gz">DOWNLOAD</a> try / test and give me feed back in the <a href="http://open-classifieds.com/forum/forum/16-rc-1">forum for this release</a>.</p><p><a href="http://open-classifieds.com/rc16/">Open Classifieds 1.6 RC1 demo.</a></p><p><strong>Once more the change log for V 1.6 RC1:<br /> </strong><br /> Romanian language thank to tutankanon, russian thanks to levgen, italian thanks to paolo<br /> Now languages are in /languages/<br /> Created include controller that loads the needed data (before was called data.php)<br /> Db class phpMyDb<br /> new cache class integrated with db class<br /> Mark as spam sends to akismet<br /> no install if minimun requirements (PHP > 5 and writable in /includes/)<br /> prefix for db tables (allows you to have more than one install in the same DB)<br /> Adsense deleted, there was problems with google. please donate<br /> Sidebar allows to change theme<br /> config.php define in admin<br /> categories allow duplicates, changes the post slug<br /> advanced search in /search/<br /> fixed few mistakes at sitemap.php</p><p>Also it&#8217;s important to check all the themes that are included since there&#8217;s few changes.</p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/2_zYAQJb01I" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/open-classifieds-1-6-rc1/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://neo22s.com/open-classifieds-1-6-rc1/</feedburner:origLink></item> <item><title>PHP sitemap.xml generator</title><link>http://feedproxy.google.com/~r/Neo22s/~3/yR8BtsN16kI/</link> <comments>http://neo22s.com/php-sitemap-xml-generator/#comments</comments> <pubDate>Tue, 12 Jan 2010 23:38:14 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[PHP]]></category><guid isPermaLink="false">http://neo22s.com/?p=851</guid> <description><![CDATA[Any web page should use a sitemap.xml, it&#8217;s really important for the bots to crawl your site properly. But how to make it work using PHP? This is the way I do it for Open Classifieds: First of all I use to defines, for the path of the file, and when it would expire:define&#40;SITEMAP_FILE,&#34;sitemap.xml.gz&#34;&#41;; define&#40;SITEMAP_EXPIRE,3600&#41;; //secondsAt the beginning of [...]]]></description> <content:encoded><![CDATA[<p>Any <a href="http://neo22s.com/dont-forget-in-your-web-site/">web page should use a sitemap.xml</a>, it&#8217;s really important for the bots to crawl your site properly.</p><p>But how to make it work using PHP?</p><p>This is the way I do it for <a href="http://open-classifieds.com/">Open Classifieds</a>:</p><p>First of all I use to defines, for the path of the file, and when it would expire:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span>SITEMAP_FILE<span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;sitemap.xml.gz&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span>SITEMAP_EXPIRE<span style="color: #339933;">,</span><span style="color: #cc66cc;">3600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//seconds</span></pre></div></div><p>At the beginning of any of your scripts we check if the sitempa it&#8217;s expired, if it&#8217;s expired we generate another time the sitemap :<br /> <span id="more-851"></span></p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">filemtime</span><span style="color: #009900;">&#40;</span>SITEMAP_FILE<span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span>SITEMAP_EXPIRE<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	generateSitemap<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">// the sitemap is expired then generates it</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>Then I use this function to generate the file, everytime it&#8217;s needed.</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">function generateSitemap(){//generates the sitemap returns the xml
	$file=SITEMAP_FILE;
	$sitemap=&quot;<span style="color: #000000; font-weight: bold;">&lt;?</span>xml version<span style="color: #339933;">=</span><span style="color: #0000ff;">'1.0'</span> encoding<span style="color: #339933;">=</span><span style="color: #0000ff;">'UTF-8'</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'
	xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
	xsi:schemaLocation='http://www.sitemaps.org/schemas/sitemap/0.9
			    http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd'&gt;&quot;;
&nbsp;
//to add url's:
	$sitemap.=makeUrlTag (&quot;http://yoursite.com/rss/&quot;,&quot;&quot;, &quot;hourly&quot;, &quot;0.6&quot;);
//end adding urls	
&nbsp;
	$sitemap.=&quot;&lt;/urlset&gt;&quot;;
&nbsp;
	if (file_exists($file))  unlink ($file);
	$gzdata = gzencode($sitemap, 9);
        $fp = fopen($file, &quot;w&quot;);
        fwrite($fp, $gzdata);
        fclose($fp);
&nbsp;
	return $sitemap;
}</pre></div></div><p>Also we need this functions that I use from <a href="http://www.smart-it-consulting.com/article.htm?node=133&#038;page=37">smart-it-consulting</a> to make everything work good:</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> makeUrlString <span style="color: #009900;">&#40;</span><span style="color: #000088;">$urlString</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #990000;">htmlentities</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$urlString</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_QUOTES</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'UTF-8'</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;">function</span> makeIso8601TimeStamp <span style="color: #009900;">&#40;</span><span style="color: #000088;">$dateTime</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$dateTime</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$dateTime</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Y-m-d H:i:s'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_numeric</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dateTime</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">11</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$isoTS</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dateTime</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;T&quot;</span>
                 <span style="color: #339933;">.</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dateTime</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">11</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">8</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;+00:00&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: #000088;">$isoTS</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dateTime</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$isoTS</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> makeUrlTag <span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$modifiedDateTime</span><span style="color: #339933;">,</span> <span style="color: #000088;">$changeFrequency</span><span style="color: #339933;">,</span> <span style="color: #000088;">$priority</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">GLOBAL</span> <span style="color: #000088;">$newLine</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">GLOBAL</span> <span style="color: #000088;">$indent</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">GLOBAL</span> <span style="color: #000088;">$isoLastModifiedSite</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$urlOpen</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$indent</span>&lt;url&gt;<span style="color: #006699; font-weight: bold;">$newLine</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$urlValue</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$urlClose</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$indent</span>&lt;/url&gt;<span style="color: #006699; font-weight: bold;">$newLine</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$locOpen</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$indent</span><span style="color: #006699; font-weight: bold;">$indent</span>&lt;loc&gt;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$locValue</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$locClose</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;/loc&gt;<span style="color: #006699; font-weight: bold;">$newLine</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$lastmodOpen</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$indent</span><span style="color: #006699; font-weight: bold;">$indent</span>&lt;lastmod&gt;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$lastmodValue</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$lastmodClose</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;/lastmod&gt;<span style="color: #006699; font-weight: bold;">$newLine</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$changefreqOpen</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$indent</span><span style="color: #006699; font-weight: bold;">$indent</span>&lt;changefreq&gt;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$changefreqValue</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$changefreqClose</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;/changefreq&gt;<span style="color: #006699; font-weight: bold;">$newLine</span>&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$priorityOpen</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$indent</span><span style="color: #006699; font-weight: bold;">$indent</span>&lt;priority&gt;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$priorityValue</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$priorityClose</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;/priority&gt;<span style="color: #006699; font-weight: bold;">$newLine</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$urlTag</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$urlOpen</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$urlValue</span>     <span style="color: #339933;">=</span> <span style="color: #000088;">$locOpen</span> <span style="color: #339933;">.</span>makeUrlString<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<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: #000088;">$locClose</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$modifiedDateTime</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #000088;">$urlValue</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$lastmodOpen</span> <span style="color: #339933;">.</span>makeIso8601TimeStamp<span style="color: #009900;">&#40;</span><span style="color: #000088;">$modifiedDateTime</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #000088;">$lastmodClose</span><span style="color: #339933;">;</span>
     <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$isoLastModifiedSite</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// last modification of web site</span>
         <span style="color: #000088;">$isoLastModifiedSite</span> <span style="color: #339933;">=</span> makeIso8601TimeStamp<span style="color: #009900;">&#40;</span><span style="color: #000088;">$modifiedDateTime</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;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$changeFrequency</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #000088;">$urlValue</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$changefreqOpen</span> <span style="color: #339933;">.</span><span style="color: #000088;">$changeFrequency</span> <span style="color: #339933;">.</span><span style="color: #000088;">$changefreqClose</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$priority</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #000088;">$urlValue</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$priorityOpen</span> <span style="color: #339933;">.</span><span style="color: #000088;">$priority</span> <span style="color: #339933;">.</span><span style="color: #000088;">$priorityClose</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000088;">$urlTag</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$urlValue</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$urlTag</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$urlClose</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$urlTag</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p>And that should be all ;)</p><p>Now you can submit your sitemap.xml to the google webmaster tools!</p><p>UPDATED: Now creates the file with .gz</p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/yR8BtsN16kI" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/php-sitemap-xml-generator/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <feedburner:origLink>http://neo22s.com/php-sitemap-xml-generator/</feedburner:origLink></item> <item><title>Ubuntu 9.10 Karmic Koala in Eee PC 1101HA</title><link>http://feedproxy.google.com/~r/Neo22s/~3/o_YjPNRSYb8/</link> <comments>http://neo22s.com/ubuntu-karmic-eeepc/#comments</comments> <pubDate>Tue, 05 Jan 2010 19:41:59 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[Linux]]></category><guid isPermaLink="false">http://neo22s.com/?p=843</guid> <description><![CDATA[Since I bought my beloved Eee PC 1101HA (wonderful screen and battery life), I&#8217;ve been using Ubuntu 9.04, yesterday I&#8217;ve decided to upgrade to Karmic Koala.When I&#8217;ve installed 9.04, I had problem with the network (wifi and ethernet drivers), and the display drivers. That was all, the rest was great. When I did the upgrade, the display [...]]]></description> <content:encoded><![CDATA[<p>Since I bought my beloved <a href="http://eeepc.asus.com/global/product1101ha.html">Eee PC 1101HA</a> (wonderful screen and battery life), I&#8217;ve been using Ubuntu 9.04, yesterday I&#8217;ve decided to upgrade to Karmic Koala.<br /> <img src="http://rir.li/http://www.liliputing.com/wp-content/uploads/2009/06/eee-pc-1101ha.jpg" alt="Eee PC 1101HA" /></p><p>When I&#8217;ve installed <strong>9.04, I had problem with the network (wifi and ethernet drivers), and the display drivers.</strong> That was all, the rest was great.</p><p>When I did the upgrade, the display once more was not working properly but the worst was the speed connection, awful.</p><p><strong>Then I&#8217;ve decided to do a fresh clean installation:</strong><span id="more-843"></span></p><ol><li>Download Karmic Koala</li><li>Make a pen drive bootable with the app in system-&gt;administration-&gt;Usb Startup Disk Creator</li><li>Boot you Eeepc form the pendrive (you can find this in the bios F2-&gt;Boot)</li><li>Install Karmic Koala</li><li>After this almost everything was working fine but the display and still the internet connection</li></ol><p>Problems and how I fixed them:</p><p><strong>Display resolution:</strong></p><p>I found many solutions the easier was <a href="https://wiki.ubuntu.com/HardwareSupportComponentsVideoCardsPoulsbo#karmic">this one</a>:<br /> In command shell:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>gma500re.altervista.org<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>poulsbo_ppa.sh <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #c20cb9; font-weight: bold;">sh</span> .<span style="color: #000000; font-weight: bold;">/</span>poulsbo_ppa.sh
dpkg-reconfigure psb-kernel-source</pre></div></div><p>Restart and works ;)</p><p><strong>Internet connection Speed:</strong></p><p>There&#8217;s some short of bug that for some weird reason makes your browsing experience really slow. As far as I know (and how I did to solve it) <a href="http://superuser.com/questions/67921/slow-website-loading-on-ubuntu-karmic">it&#8217;s caused by ipv6</a>.</p><p>If you use <strong>firefox</strong> you can <a href="http://www.james-blogs.com/2009/11/04/have-you-upgraded-to-ubuntu-9-10-karmic-koala/">use this solution to disable ipv6 only in firefox</a> of course.</p><p>Open a firefox browser window and type this in the address bar:</p><pre>about:config</pre><p>In the filter bar put:</p><pre>network.dns.disableIPv6</pre><p>You will disable the IPv6 DNS if you set the value to true. Once you have done that close Firefox and then reopen a browser a window. Your internet should be fast again!</p><p>But I use Chomium!! and skype&#8230;.then we need to <a href="https://answers.launchpad.net/ubuntu/+question/89485"><strong>disable the module ipv6 to load on start</a> (boot).</strong></p><p>Open a terminal:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gksudo gedit <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>default<span style="color: #000000; font-weight: bold;">/</span>grub</pre></div></div><p>Look for this line and add:</p><pre>GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet splash"</pre><p>Save and close your file then run:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> update-grub</pre></div></div><p>That&#8217;s all until now&#8230;<strong>seems everything to work pretty good</strong>, just I don&#8217;t like from karmic the new Ubuntu Software Center, I liked more the old one&#8230;</p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/o_YjPNRSYb8" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/ubuntu-karmic-eeepc/feed/</wfw:commentRss> <slash:comments>8</slash:comments> <feedburner:origLink>http://neo22s.com/ubuntu-karmic-eeepc/</feedburner:origLink></item> <item><title>Adiós 2009, Welcome 2010!</title><link>http://feedproxy.google.com/~r/Neo22s/~3/RvLAy1SsE40/</link> <comments>http://neo22s.com/adios-2009-welcome-2010/#comments</comments> <pubDate>Thu, 31 Dec 2009 10:15:40 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[News]]></category><guid isPermaLink="false">http://neo22s.com/?p=835</guid> <description><![CDATA[Last day of the year and waiting for a new fresh start ;) This year was specially fast at least for me. I did many things, that involves many areas from my life, travelling, studying, developing&#8230; Maybe some of you are interested in what I&#8217;ve done this year:In February I moved from Holland to Thailand for 5 months. In [...]]]></description> <content:encoded><![CDATA[<p><strong>Last day of the year</strong> and waiting for a new fresh start ;)</p><p>This year was specially fast at least for me. <strong>I did many things</strong>, that involves many areas from my life, travelling, studying, developing&#8230;</p><p>Maybe some of you are interested in <strong>what I&#8217;ve done this year</strong>:</p><ul><li>In February I moved from <a href="http://www.deambulando.com/category/holanda/">Holland</a> to <a href="http://www.deambulando.com/category/tailandia/">Thailand</a> for 5 months.</li><li>In March I started developing <a href="http://www.open-classifieds.com/">Open Classifieds</a>, just for learning.</li><li>I&#8217;ve visited <a href="http://www.deambulando.com/2009/04/08/las-torres-petronas-galeria-de-fotos/">Malaysia</a> , <a href="http://www.deambulando.com/2009/06/02/cosas-vietnamitas/">Vietnam</a>,Liverpool, &#8230;</li><li>In July I moved from Thailand back to my home in Barcelona.</li><li>I have <a href="http://twitter.com/deambulando">twitter account</a> since July only&#8230;</li><li>Since August we have our lovely cat Chang (means elephant in Thai).</li><li>In <strong>August I started this blog</strong>, with the forum and the lab ;) (Currently I have 300 unique visitors day)</li><li>In September I started English school for first time in my life and it&#8217;s in the official school level 4 of 5.</li><li>In October I&#8217;ve quited my work and I started a Software Engineering Master.</li><li>I&#8217;ve went to the <a href="http://neo22s.com/php-barcelona-conference-2009/">PHP international conference in Barcelona</a> as Speaker.</li><li>I started playing paddle and Ive been defeated twice by my dutch girlfriend :S</li></ul><p><strong>Goals 2010:</strong></p><ul><li>Finish my studies successfully.</li><li><a href="http://neo22s.com/open-classifieds-2-0-draft/">Release Open Classifieds 2.0</a>.</li><li>Visit more and more countries!</li><li>Start my own E-business (already working on it).</li><li><del datetime="2010-01-04T10:17:10+00:00">Defeat my gf in Paddle, finally</del>.</li><li>Learn to use a PHP Framework (Still don&#8217;t know which one).</li><li>Learn to relax and take it easy.</li><li>Driving license for motorbike (now I can only drive 125cc).</li><li>Attend to more conferences, even if I&#8217;m not an Speaker.</li><li><del datetime="2009-12-31T10:20:00+00:00">Stop smoking</del> (wait I never smoked!!)</li></ul><p><strong>BTW, HAPPY NEW YEAR!!!</strong></p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/RvLAy1SsE40" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/adios-2009-welcome-2010/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <feedburner:origLink>http://neo22s.com/adios-2009-welcome-2010/</feedburner:origLink></item> <item><title>phpMyDB – Data base class for MySql</title><link>http://feedproxy.google.com/~r/Neo22s/~3/hv0IHfsm8FY/</link> <comments>http://neo22s.com/phpmydb/#comments</comments> <pubDate>Wed, 30 Dec 2009 11:02:12 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[PHP]]></category><guid isPermaLink="false">http://neo22s.com/?p=824</guid> <description><![CDATA[phpMyDB is not only a class handler for MySql written in PHP, it&#8217;s also has a query cache built in, a great debugger and is damn easy to use! I&#8217;ve wrote this class just few weeks a go since I need it for the new version of Open Classifieds (coming soon I promise, many changes). This class uses [...]]]></description> <content:encoded><![CDATA[<p><strong>phpMyDB is not only a class handler for MySql</strong> written in PHP, it&#8217;s also has a query cache built in, a great debugger and is<strong> damn easy to use!</strong></p><p>I&#8217;ve wrote this class just few weeks a go since I need it for the new version of Open Classifieds (coming soon I promise, many changes).</p><p>This class uses <a href="http://neo22s.com/filecache/">fileCache</a> class to be able (if you want to) to <strong>cache the query result </strong>in a really simple way (transparent to the programmer).</p><p>First <strong><a href="http://neo22s.s3.amazonaws.com/wp-content/uploads/2009/12/phpMyDB.zip">Download</a></strong></p><p><strong>Usage with examples:</strong></p><p><strong>Constructor:</strong><br /> DB Constructor &#8211; connects to the server and selects a database</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$ocdb</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> phpMyDB<span style="color: #009900;">&#40;</span>DB_USER<span style="color: #339933;">,</span> DB_PASS<span style="color: #339933;">,</span> DB_NAME<span style="color: #339933;">,</span>DB_HOST<span style="color: #339933;">,</span>DB_CHARSET<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>In case of error will print using the private function print_error</p><p><strong>Debugger:</strong><br /> Logs all the connection or action inside the class, you can set it on whenever you want.</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setDebug</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">returnDebug</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>We set it on, and at the end of our script(or whenever you want) we should returnDebug, by default in &#8220;HTML&#8221;, but can return as an &#8220;array&#8221;.<br /> Also you can add new &#8220;logs&#8221; with $ocdb->addLog(&#8220;any string&#8221;);</p><p><strong>Activate cache:</strong><br /> Uses fileCache class. As parameter we have:<br /> 1: true or false to activate or deactivate the cache, by default false<br /> 2: Time in seconds by default 3600  (10 seconds expires in the example)<br /> 3: Path for the cache, by default cache/</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setCache</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p><strong>Normal query:</strong><br /> Just performs a normal query, but keeps the query counter and logs the action if debugger it&#8217;s on</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$result</span> <span style="color: #339933;">=</span><span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">query</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</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;">$result</span><span style="color: #009900;">&#41;</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;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
          <span style="color: #b1b100;">echo</span> 	<span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p><strong>getRows</strong><br /> Returns in rows the target query. If cache is activated automatically cache the result as an array.<br /> Parameters:<br /> 1: Query to return values<br /> 2: Returning as &#8220;assoc&#8221; (default), &#8220;row&#8221; , &#8220;object&#8221; ,&#8221;value&#8221; (returns first field form the query)<br /> 3: Cache type &#8220;cache&#8221; or &#8220;APP&#8221; by default &#8220;cache&#8221;<br /> Example: Cached query, returning the row as an object (cache must be activated):</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$result</span><span style="color: #339933;">=</span><span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getRows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;object&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//more than 1 result</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$result</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$row</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
           <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">;</span>
       <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div><p><span id="more-824"></span><br /> <strong>getValue</strong><br /> Get value from first value of the query and stores it in the cache.</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$query</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SELECT count(*) total FROM oc_postshits&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$total_records</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;APP&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>In the second parameter we can use &#8220;cache&#8221; (default).</p><p><strong>Insert:</strong><br /> Insert into,parameters:<br /> 1: table + fields<br /> 2: values</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">insert</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;categories (name,friendlyName)&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;'name','fname'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>To get the last id use $ocdb->getLastID();</p><p><strong>Update:</strong><br /> Updates table, parameters:<br /> 1: table<br /> 2: sets<br /> 3: where</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">update</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;posts&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;isAvailable=0,isConfirmed=0&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;idPost=1 and password='asdsadsad'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p><strong>Delete:</strong><br /> Delete from, parameters:<br /> 1: table<br /> 2: where</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">delete</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;categories&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;idCategory=2&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p><strong>Close db:</strong><br /> Closes DB connection and unsets variables.</p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">closeDB</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p><strong>Full example:</strong></p><div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">include</span> <span style="color: #0000ff;">&quot;phpMyDB.php&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_HOST'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'localhost'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_USER'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'user'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_PASS'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'some pass'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_NAME'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'openclassifieds'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DB_CHARSET'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'utf8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$ocdb</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> phpMyDB<span style="color: #009900;">&#40;</span>DB_USER<span style="color: #339933;">,</span> DB_PASS<span style="color: #339933;">,</span> DB_NAME<span style="color: #339933;">,</span>DB_HOST<span style="color: #339933;">,</span>DB_CHARSET<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setDebug</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setCache</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">insert</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;postshits (idPost,ip)&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;97,'10.0.0.0'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'test insert see id:'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getLastID</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$query</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SELECT count(*) total FROM oc_posts&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$total_records</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;APP&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Total records: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$total_records</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$query</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;SELECT p.title from oc_posts p Limit 3&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setCache</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//cache deactivated</span>
<span style="color: #000088;">$result</span><span style="color: #339933;">=</span><span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getRows</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;object&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setCache</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//after the query is done activated once more</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//more than 1 result</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$result</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$row</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>	
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #666666; font-style: italic;">//if count</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;nothing found&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">closeDB</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">returnDebug</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getQueryCounter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' queries generated and '</span><span style="color: #339933;">.</span><span style="color: #000088;">$ocdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getQueryCounter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;cache&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' queries cached'</span><span style="color: #339933;">;</span></pre></div></div><img src="http://feeds.feedburner.com/~r/Neo22s/~4/hv0IHfsm8FY" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/phpmydb/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://neo22s.com/phpmydb/</feedburner:origLink></item> <item><title>Spotify links in Chrome on Gnome/Ubuntu</title><link>http://feedproxy.google.com/~r/Neo22s/~3/aZ8g5TTtb7Y/</link> <comments>http://neo22s.com/spotify-links/#comments</comments> <pubDate>Sat, 26 Dec 2009 10:13:21 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[links]]></category> <category><![CDATA[spotify]]></category><guid isPermaLink="false">http://neo22s.com/?p=816</guid> <description><![CDATA[I like spotify a lot, but was bothering to me a lot that I couldn&#8217;t open the links in Chrome&#8230; After trying few solutions (for KDE, gnome ), I finally managed to make it work: First you need to install Spotify in linux At the console we create this script:echo '#!/bin/sh' &#62; ~/.browser2spotify echo 'wine  &#34;$HOME/.wine/drive_c/Program Files/Spotify/spotify.exe&#34; /uri [...]]]></description> <content:encoded><![CDATA[<p>I like spotify a lot, but was bothering to me a lot that I couldn&#8217;t open the links in Chrome&#8230;</p><p>After trying few solutions (for <a href=" "$HOME/.wine/drive_c/Program Files/Spotify/spotify.exe"">KDE</a>, <a href="http://www.unreliablepollution.net/p/other/how-to-spotify-and-xdg-open">gnome</a> ), I finally managed to make it work:</p><p>First you need to <a href="http://www.spotify.com/en/help/faq/wine/">install Spotify in linux</a></p><p>At the console we create this script:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'#!/bin/sh'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.browser2spotify
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">'wine  &quot;$HOME/.wine/drive_c/Program Files/Spotify/spotify.exe&quot; /uri &quot;$@&quot;'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.browser2spotify
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> ~<span style="color: #000000; font-weight: bold;">/</span>.browser2spotify</pre></div></div><p>Then we change few options from gnome to know what to do with the url&#8217;s:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-t</span> string <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>desktop<span style="color: #000000; font-weight: bold;">/</span>gnome<span style="color: #000000; font-weight: bold;">/</span>url-handlers<span style="color: #000000; font-weight: bold;">/</span>spotify<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">command</span> <span style="color: #ff0000;">&quot;/home/<span style="color: #007800;">${USER}</span>/.browser2spotify %s&quot;</span>
gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>desktop<span style="color: #000000; font-weight: bold;">/</span>gnome<span style="color: #000000; font-weight: bold;">/</span>url-handlers<span style="color: #000000; font-weight: bold;">/</span>spotify<span style="color: #000000; font-weight: bold;">/</span>needs_terminal <span style="color: #c20cb9; font-weight: bold;">false</span> <span style="color: #660033;">-t</span> bool
gconftool-<span style="color: #000000;">2</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>desktop<span style="color: #000000; font-weight: bold;">/</span>gnome<span style="color: #000000; font-weight: bold;">/</span>url-handlers<span style="color: #000000; font-weight: bold;">/</span>spotify<span style="color: #000000; font-weight: bold;">/</span>enabled <span style="color: #c20cb9; font-weight: bold;">true</span> <span style="color: #660033;">-t</span> bool</pre></div></div><p>Remember to replace the user name in the folder.</p><p>That&#8217;s all!</p><p>To see if it works, try to open this any from this list:</p><p><strong><a target="_blank" href="spotify:user:spotify:playlist:2B2cUq8sJVMHX7HsxC7zmR" >Top 100 2009 PlayList</a></strong><br /> <span id="more-816"></span></p><table><tbody><tr><td>1.</td><td><strong><a target="_blank" href="spotify:track:70cTMpcgWMcR18t9MRJFjB">I Gotta Feeling</a></strong> by <strong><a target="_blank" href="spotify:artist:1yxSLGMDHlW21z4YXirZDS">Black Eyed Peas</a></strong></td><td></td></tr><tr><td>2.</td><td><strong><a target="_blank" href="spotify:track:0bVVTWIBqdjHBvYgJVtwXE">Right Round &#8211; Amended Album Version</a></strong> by <strong><a target="_blank" href="spotify:artist:0jnsk9HBra6NMjO2oANoPY">Flo Rida</a></strong></td><td></td></tr><tr><td>3.</td><td><strong><a target="_blank" href="spotify:track:28O4PwkH8bzARStxeL4pxL">Sexy Bitch (Featuring Akon;explicit)</a></strong> by <strong><a target="_blank" href="spotify:artist:1Cs0zKBU1kc0i8ypK3B9ai">Akon, David Guetta</a></strong></td><td></td></tr><tr><td>4.</td><td><strong><a target="_blank" href="spotify:track:6w1hZMlo2SVuq29liebhb8">Poker Face</a></strong> by <strong><a target="_blank" href="spotify:artist:1HY2Jd0NmPuamShAr6KMms">Lady Gaga</a></strong></td><td></td></tr><tr><td>5.</td><td><strong><a target="_blank" href="spotify:track:4JehYebiI9JE8sR8MisGVb">Halo</a></strong> by <strong><a target="_blank" href="spotify:artist:6vWDO969PvNqNYHIOW5v0m">Beyoncé</a></strong></td><td></td></tr><tr><td>6.</td><td><strong><a target="_blank" href="spotify:track:3QkNkun3dzkeGo1jpkC76S">Use Somebody</a></strong> by <strong><a target="_blank" href="spotify:artist:2qk9voo8llSGYcZ6xrBzKx">Kings Of Leon</a></strong></td><td></td></tr><tr><td>7.</td><td><strong><a target="_blank" href="spotify:track:0rXgKeO7DWMiXCmNDhkRdd">Boom Boom Pow</a></strong> by <strong><a target="_blank" href="spotify:artist:1yxSLGMDHlW21z4YXirZDS">Black Eyed Peas</a></strong></td><td></td></tr><tr><td>8.</td><td><strong><a target="_blank" href="spotify:track:2TBwIEhkzVeMQ5bUlDaOlb">Ayo Technology</a></strong> by <strong><a target="_blank" href="spotify:artist:6mo0UbyIvIePdXNyLwQlk5">Milow</a></strong></td><td></td></tr><tr><td>9.</td><td><strong><a target="_blank" href="spotify:track:619bJQ9uDi8dnXzLebFI7y">When Love Takes Over (Feat.Kelly Rowland)</a></strong> by <strong><a target="_blank" href="spotify:artist:1Cs0zKBU1kc0i8ypK3B9ai">Kelly Rowland, David Guetta</a></strong></td><td></td></tr><tr><td>10.</td><td><strong><a target="_blank" href="spotify:track:1jJci4qxiYcOHhQR247rEU">Kids</a></strong> by <strong><a target="_blank" href="spotify:artist:0SwO7SWeDHJijQ3XNS7xEE">MGMT</a></strong></td><td></td></tr><tr><td>11.</td><td><strong><a target="_blank" href="spotify:track:72Odtn9RpwBnSWPeSbyvSm">Man In The Mirror</a></strong> by <strong><a target="_blank" href="spotify:artist:3fMbdgg4jU18AjLCKBhRSm">Michael Jackson, Andrae Crouch</a></strong></td><td></td></tr><tr><td>12.</td><td><strong><a target="_blank" href="spotify:track:1mea3bSkSGXuIRvnydlB5b">Viva La Vida</a></strong> by <strong><a target="_blank" href="spotify:artist:4gzpq5DPGxSnKTe4SA8HAU">Coldplay</a></strong></td><td></td></tr><tr><td>13.</td><td><strong><a target="_blank" href="spotify:track:395C2pn0PdOYPzM4B1jLoO">Sex On Fire</a></strong> by <strong><a target="_blank" href="spotify:artist:2qk9voo8llSGYcZ6xrBzKx">Kings Of Leon</a></strong></td><td></td></tr><tr><td>14.</td><td><strong><a target="_blank" href="spotify:track:1FKxKGONukVFXWVJxAKmlz">Sweet Dreams</a></strong> by <strong><a target="_blank" href="spotify:artist:6vWDO969PvNqNYHIOW5v0m">Beyoncé</a></strong></td><td></td></tr><tr><td>15.</td><td><strong><a target="_blank" href="spotify:track:0TuTx2Gwtfrt769k4sJRgh">If I Were A Boy</a></strong> by <strong><a target="_blank" href="spotify:artist:6vWDO969PvNqNYHIOW5v0m">Beyoncé</a></strong></td><td></td></tr><tr><td>16.</td><td><strong><a target="_blank" href="spotify:track:5tb91XZX6dbjwMTB9TDw97">We Made You &#8211; Single Version</a></strong> by <strong><a target="_blank" href="spotify:artist:7dGJo4pcD2V6oG8kP0tJRR">Eminem</a></strong></td><td></td></tr><tr><td>17.</td><td><strong><a target="_blank" href="spotify:track:64yrDBpcdwEdNY9loyEGbX">21 Guns</a></strong> by <strong><a target="_blank" href="spotify:artist:7oPftvlwr6VrsViSDV7fJY">Green Day</a></strong></td><td></td></tr><tr><td>18.</td><td><strong><a target="_blank" href="spotify:track:6hTcRuSaaTNwlyIYkkMpWX">Infinity 2008 &#8211; Klaas Vocal Edit</a></strong> by <strong><a target="_blank" href="spotify:artist:4ME85YvMUi1hdqhbind7gy">Guru Josh Project</a></strong></td><td></td></tr><tr><td>19.</td><td><strong><a target="_blank" href="spotify:track:3WggV4HBM6ZIZHgryyKKmm">Fix You</a></strong> by <strong><a target="_blank" href="spotify:artist:4gzpq5DPGxSnKTe4SA8HAU">Coldplay</a></strong></td><td></td></tr><tr><td>20.</td><td><strong><a target="_blank" href="spotify:track:3ZlFUr0RBrUYYsmlcFvD0e">Paper Planes</a></strong> by <strong><a target="_blank" href="spotify:artist:1QLoe4M9MBhNEQzOnpO9t5">M.I.A.</a></strong></td><td></td></tr><tr><td>21.</td><td><strong><a target="_blank" href="spotify:track:2PBOI7vYicqDaG9rYbycUO">Not Fair</a></strong> by <strong><a target="_blank" href="spotify:artist:13saZpZnCDWOI9D4IJhp1f">Lily Allen</a></strong></td><td></td></tr><tr><td>22.</td><td><strong><a target="_blank" href="spotify:track:3KzBxXbF2tc01LeKu1uIMM">Live Your Life &#8211; Explicit Album Version</a></strong> by <strong><a target="_blank" href="spotify:artist:4OBJLual30L7gRl5UkeRcT">T.I.</a></strong></td><td></td></tr><tr><td>23.</td><td><strong><a target="_blank" href="spotify:track:7Fv96yqjGTHJCgRuBRrOeO">Love Story</a></strong> by <strong><a target="_blank" href="spotify:artist:06HL4z0CvFAxyc27GXpf02">Taylor Swift</a></strong></td><td></td></tr><tr><td>24.</td><td><strong><a target="_blank" href="spotify:track:1mzn6CQ71eUmgCSfbVmicN">Smooth Criminal (Radio Edit)</a></strong> by <strong><a target="_blank" href="spotify:artist:3fMbdgg4jU18AjLCKBhRSm">Michael Jackson</a></strong></td><td></td></tr><tr><td>25.</td><td><strong><a target="_blank" href="spotify:track:5P6dk8y40cCgHcWtPwF3N3">Losing You</a></strong> by <strong><a target="_blank" href="spotify:artist:4XQZzpMWIuQ266ixFHQkrI">Dead by April</a></strong></td><td></td></tr><tr><td>26.</td><td><strong><a target="_blank" href="spotify:track:4rqR0yM2k41leqyErhNzTs">Beautiful</a></strong> by <strong><a target="_blank" href="spotify:artist:0z4gvV4rjIZ9wHck67ucSV">Akon, Colby O’Donis, Kardinal Offishall</a></strong></td><td></td></tr><tr><td>27.</td><td><strong><a target="_blank" href="spotify:track:32yIEFS62uS5ryhr2Xlooj">Hotel Room Service</a></strong> by <strong><a target="_blank" href="spotify:artist:0TnOYISbd1XYRBk9myaseg">Pitbull, Jim Jonsin</a></strong></td><td></td></tr><tr><td>28.</td><td><strong><a target="_blank" href="spotify:track:0eH2eHURaXUP15D8gQlfjx">LoveGame</a></strong> by <strong><a target="_blank" href="spotify:artist:1HY2Jd0NmPuamShAr6KMms">Lady Gaga</a></strong></td><td></td></tr><tr><td>29.</td><td><strong><a target="_blank" href="spotify:track:3TbUO5qw7OA33yyYpeCWrJ">Dead And Gone [feat. Justin Timberlake] &#8211; Explicit Album Version</a></strong> by <strong><a target="_blank" href="spotify:artist:4OBJLual30L7gRl5UkeRcT">T.I.</a></strong></td><td></td></tr><tr><td>30.</td><td><strong><a target="_blank" href="spotify:track:5IxUJIYiwfkwa9Q2hMcNxm">Svennebanan</a></strong> by <strong><a target="_blank" href="spotify:artist:6tbXwhqy3WAFqanusCLvEU">Promoe</a></strong></td><td></td></tr><tr><td>31.</td><td><strong><a target="_blank" href="spotify:track:7gDKfEMIhyyO4asgEXwcrs">Fire Burning</a></strong> by <strong><a target="_blank" href="spotify:artist:6S0dmVVn4udvppDhZIWxCr">Sean Kingston, RedOne</a></strong></td><td></td></tr><tr><td>32.</td><td><strong><a target="_blank" href="spotify:track:3Z8cX6y0SeJIsI3yxoaQ8K">Closer</a></strong> by <strong><a target="_blank" href="spotify:artist:2qk9voo8llSGYcZ6xrBzKx">Kings Of Leon</a></strong></td><td></td></tr><tr><td>33.</td><td><strong><a target="_blank" href="spotify:track:0BCPKOYdS2jbQ8iyB56Zns">Clocks</a></strong> by <strong><a target="_blank" href="spotify:artist:4gzpq5DPGxSnKTe4SA8HAU">Coldplay</a></strong></td><td></td></tr><tr><td>34.</td><td><strong><a target="_blank" href="spotify:track:02XnQdf7sipaKBBHixz3Zp">Paparazzi</a></strong> by <strong><a target="_blank" href="spotify:artist:1HY2Jd0NmPuamShAr6KMms">Lady Gaga</a></strong></td><td></td></tr><tr><td>35.</td><td><strong><a target="_blank" href="spotify:track:6xoR54qAPRbY934G8d8vtY">Knock You Down</a></strong> by <strong><a target="_blank" href="spotify:artist:63wjoROpeh5f11Qm93UiJ1">Kanye West, Keri Hilson, Ne-Yo</a></strong></td><td></td></tr><tr><td>36.</td><td><strong><a target="_blank" href="spotify:track:0leJr3UNvxrXqrwgE8v0ps">Human</a></strong> by <strong><a target="_blank" href="spotify:artist:0C0XlULifJtAgn6ZNCW2eu">The Killers</a></strong></td><td></td></tr><tr><td>37.</td><td><strong><a target="_blank" href="spotify:track:0IZM2onaTBMRTEIcc5oIi9">Hot N Cold</a></strong> by <strong><a target="_blank" href="spotify:artist:6jJ0s89eD6GaHleKKya26X">Katy Perry</a></strong></td><td></td></tr><tr><td>38.</td><td><strong><a target="_blank" href="spotify:track:3WUbVS0J4Ulf0XZR6LNRnh">Eh, Eh (Nothing Else I Can Say)</a></strong> by <strong><a target="_blank" href="spotify:artist:1HY2Jd0NmPuamShAr6KMms">Lady Gaga</a></strong></td><td></td></tr><tr><td>39.</td><td><strong><a target="_blank" href="spotify:track:0Ketr9du9SbrbfpgBYe0SL">Mayhem</a></strong> by <strong><a target="_blank" href="spotify:artist:7yjQSKM1rBSYbUOTtPKF8j">Lorentz &amp; M.Sakarias</a></strong></td><td></td></tr><tr><td>40.</td><td><strong><a target="_blank" href="spotify:track:59wpu37k02o2UGZIPpcSPd">Jai Ho! (You Are My Destiny)</a></strong> by <strong><a target="_blank" href="spotify:artist:6wPhSqRtPu1UhRCDX5yaDJ">A.R. Rahman, The Pussycat Dolls, Nicole Scherzinger</a></strong></td><td></td></tr><tr><td>41.</td><td><strong><a target="_blank" href="spotify:track:03yc0G2OoH1Eeyu7Piy8fK">I’m Yours</a></strong> by <strong><a target="_blank" href="spotify:artist:4phGZZrJZRo4ElhRtViYdl">Jason Mraz</a></strong></td><td></td></tr><tr><td>42.</td><td><strong><a target="_blank" href="spotify:track:5YAY2D4s3o0QNOpFwEsynX">Black Or White</a></strong> by <strong><a target="_blank" href="spotify:artist:3fMbdgg4jU18AjLCKBhRSm">Michael Jackson</a></strong></td><td></td></tr><tr><td>43.</td><td><strong><a target="_blank" href="spotify:track:53gcDgFyqqpvCzXWrnFZpH">Heartless</a></strong> by <strong><a target="_blank" href="spotify:artist:5K4W6rqBFWDnAN6FQUkS6x">Kanye West</a></strong></td><td></td></tr><tr><td>44.</td><td><strong><a target="_blank" href="spotify:track:7n8UWYTawkrcC1KBsY5XRc">Beautiful</a></strong> by <strong><a target="_blank" href="spotify:artist:7dGJo4pcD2V6oG8kP0tJRR">Eminem</a></strong></td><td></td></tr><tr><td>45.</td><td><strong><a target="_blank" href="spotify:track:5st5644IlBmKiiRE73UsoZ">Fuck You</a></strong> by <strong><a target="_blank" href="spotify:artist:13saZpZnCDWOI9D4IJhp1f">Lily Allen</a></strong></td><td></td></tr><tr><td>46.</td><td><strong><a target="_blank" href="spotify:track:5g2GVm8NFACpKl2F2OWXwA">When It Was Good</a></strong> by <strong><a target="_blank" href="spotify:artist:6S9rh06VCCIYEvYMFnVMVN">Flipsyde</a></strong></td><td></td></tr><tr><td>47.</td><td><strong><a target="_blank" href="spotify:track:75JFxkI2RXiU7L9VXzMkle">The Scientist</a></strong> by <strong><a target="_blank" href="spotify:artist:4gzpq5DPGxSnKTe4SA8HAU">Coldplay</a></strong></td><td></td></tr><tr><td>48.</td><td><strong><a target="_blank" href="spotify:track:4iG2gAwKXsOcijVaVXzRPW">Time To Pretend</a></strong> by <strong><a target="_blank" href="spotify:artist:0SwO7SWeDHJijQ3XNS7xEE">MGMT</a></strong></td><td></td></tr><tr><td>49.</td><td><strong><a target="_blank" href="spotify:track:4WcCW10tnJCljX8Fhs0FdE">She Wolf</a></strong> by <strong><a target="_blank" href="spotify:artist:0EmeFodog0BfCgMzAIvKQp">Shakira</a></strong></td><td></td></tr><tr><td>50.</td><td><strong><a target="_blank" href="spotify:track:6li2D8wQPvgwI2QIrGPhAF">My Life Would Suck Without You</a></strong> by <strong><a target="_blank" href="spotify:artist:3BmGtnKgCSGYIUhmivXKWX">Kelly Clarkson</a></strong></td><td></td></tr><tr><td>51.</td><td><strong><a target="_blank" href="spotify:track:69yVxyuRahEzs2taFMVVoO">Empire State Of Mind [Jay-Z + Alicia Keys] &#8211; Explicit Album Version</a></strong> by <strong><a target="_blank" href="spotify:artist:3nFkdlSjzX9mRTtwJOzDYB">Jay-Z</a></strong></td><td></td></tr><tr><td>52.</td><td><strong><a target="_blank" href="spotify:track:06T10fEzN8ZCcqzQZYA184">Gotta Be Somebody</a></strong> by <strong><a target="_blank" href="spotify:artist:6deZN1bslXzeGvOLaLMOIF">Nickelback</a></strong></td><td></td></tr><tr><td>53.</td><td><strong><a target="_blank" href="spotify:track:05cLHUb65Na1jBi9KC2oUT">Free Fallin’ &#8211; Live at the Nokia Theatre</a></strong> by <strong><a target="_blank" href="spotify:artist:0hEurMDQu99nJRq8pTxO14">John Mayer</a></strong></td><td></td></tr><tr><td>54.</td><td><strong><a target="_blank" href="spotify:track:0jVmQ616tYw60y7yqwO9FV">Billie Jean &#8211; Single Version</a></strong> by <strong><a target="_blank" href="spotify:artist:3fMbdgg4jU18AjLCKBhRSm">Michael Jackson</a></strong></td><td></td></tr><tr><td>55.</td><td><strong><a target="_blank" href="spotify:track:2hubQyLihYSKOeI01mS3vn">Dirty Diana</a></strong> by <strong><a target="_blank" href="spotify:artist:3fMbdgg4jU18AjLCKBhRSm">Michael Jackson</a></strong></td><td></td></tr><tr><td>56.</td><td><strong><a target="_blank" href="spotify:track:3HSerBi92GxDcB3rWm3epr">Rap Das Armas &#8211; Lucana Radio Edit</a></strong> by <strong><a target="_blank" href="spotify:artist:2rwHPBK5IvPCDr0QjKlgQc">Cidinho &amp; Doca</a></strong></td><td></td></tr><tr><td>57.</td><td><strong><a target="_blank" href="spotify:track:77NNZQSqzLNqh2A9JhLRkg">Don’t Stop Believin’</a></strong> by <strong><a target="_blank" href="spotify:artist:0rvjqX7ttXeg3mTy8Xscbt">Journey</a></strong></td><td></td></tr><tr><td>58.</td><td><strong><a target="_blank" href="spotify:track:7aE1vrBiMH5CNQj7uvt3X3">Womanizer &#8211; Main Version</a></strong> by <strong><a target="_blank" href="spotify:artist:26dSoYclwsYLMAKD3tpOr4">Britney Spears</a></strong></td><td></td></tr><tr><td>59.</td><td><strong><a target="_blank" href="spotify:track:6VCqx14OVaX9uwSvC0PvAG">The Girl And The Robot</a></strong> by <strong><a target="_blank" href="spotify:artist:5nPOO9iTcrs9k6yFffPxjH">Röyksopp</a></strong></td><td></td></tr><tr><td>60.</td><td><strong><a target="_blank" href="spotify:track:5M8nEsWqUkwUwCp58ydE4W">Run This Town [Jay-Z + Rihanna + Kanye West] &#8211; Explicit Album Version</a></strong> by <strong><a target="_blank" href="spotify:artist:3nFkdlSjzX9mRTtwJOzDYB">Jay-Z</a></strong></td><td></td></tr><tr><td>61.</td><td><strong><a target="_blank" href="spotify:track:0upQ8bgqXGhFsBgvchxbGm">Love Sex Magic &#8211; Main Version</a></strong> by <strong><a target="_blank" href="spotify:artist:6bnBYEmvxHNrDGRBsOd4yJ">Ciara featuring Justin Timberlake</a></strong></td><td></td></tr><tr><td>62.</td><td><strong><a target="_blank" href="spotify:track:6L89mwZXSOwYl76YXfX13s">Basket Case</a></strong> by <strong><a target="_blank" href="spotify:artist:7oPftvlwr6VrsViSDV7fJY">Green Day</a></strong></td><td></td></tr><tr><td>63.</td><td><strong><a target="_blank" href="spotify:track:3K8ErhGR5lZgGCdmvv4UDU">Crack A Bottle &#8211; Edited Version</a></strong> by <strong><a target="_blank" href="spotify:artist:7dGJo4pcD2V6oG8kP0tJRR">Eminem, Dr. Dre, 50 Cent</a></strong></td><td></td></tr><tr><td>64.</td><td><strong><a target="_blank" href="spotify:track:4UJt3Ipg45AqLdaSvejmNg">The Fear</a></strong> by <strong><a target="_blank" href="spotify:artist:13saZpZnCDWOI9D4IJhp1f">Lily Allen</a></strong></td><td></td></tr><tr><td>65.</td><td><strong><a target="_blank" href="spotify:track:4OSRg1faLprPCt86C80zWt">Ambitions</a></strong> by <strong><a target="_blank" href="spotify:artist:0UACE2nWl5uUyJRo1kIYQO">Donkeyboy</a></strong></td><td></td></tr><tr><td>66.</td><td><strong><a target="_blank" href="spotify:track:1dzQoRqT5ucxXVaAhTcT0J">Just Dance</a></strong> by <strong><a target="_blank" href="spotify:artist:1HY2Jd0NmPuamShAr6KMms">Colby O’Donis, Lady Gaga</a></strong></td><td></td></tr><tr><td>67.</td><td><strong><a target="_blank" href="spotify:track:6SpLc7EXZIPpy0sVko0aoU">Misery Business</a></strong> by <strong><a target="_blank" href="spotify:artist:74XFHRwlV6OrjEM0A2NCMF">Paramore</a></strong></td><td></td></tr><tr><td>68.</td><td><strong><a target="_blank" href="spotify:track:5Mhmb7EJiUVF55qtsKvVHK">Keep You Much Longer</a></strong> by <strong><a target="_blank" href="spotify:artist:0z4gvV4rjIZ9wHck67ucSV">Akon</a></strong></td><td></td></tr><tr><td>69.</td><td><strong><a target="_blank" href="spotify:track:7MzmBmyI9KkyQJaPNLdtUi">17 år</a></strong> by <strong><a target="_blank" href="spotify:artist:2OIWxN9xUhgUHkeUCWCaNs">Veronica Maggio</a></strong></td><td></td></tr><tr><td>70.</td><td><strong><a target="_blank" href="spotify:track:6NVvx94mxobf4u6FJX9l9T">Mockingbird</a></strong> by <strong><a target="_blank" href="spotify:artist:7dGJo4pcD2V6oG8kP0tJRR">Eminem</a></strong></td><td></td></tr><tr><td>71.</td><td><strong><a target="_blank" href="spotify:track:6i24LdtpurY1OPvRVjNsSH">Let It Rock</a></strong> by <strong><a target="_blank" href="spotify:artist:4UhjD0E3vXBAE4l36QyVlx">Kevin Rudolf, Lil Wayne</a></strong></td><td></td></tr><tr><td>72.</td><td><strong><a target="_blank" href="spotify:track:2QXQ9BrS8bmfKYbHuuYkkS">In For The Kill</a></strong> by <strong><a target="_blank" href="spotify:artist:3K2zB87GZv1krx031en5VA">La Roux</a></strong></td><td></td></tr><tr><td>73.</td><td><strong><a target="_blank" href="spotify:track:41SJCRqUG2lAFtfR6MJ8mm">How You Remind Me &#8211; LP Mix</a></strong> by <strong><a target="_blank" href="spotify:artist:6deZN1bslXzeGvOLaLMOIF">Nickelback</a></strong></td><td></td></tr><tr><td>74.</td><td><strong><a target="_blank" href="spotify:track:3AJwUDP919kvQ9QcozQPxg">Yellow</a></strong> by <strong><a target="_blank" href="spotify:artist:4gzpq5DPGxSnKTe4SA8HAU">Coldplay</a></strong></td><td></td></tr><tr><td>75.</td><td><strong><a target="_blank" href="spotify:track:7IjdIp3WlQtEnN2BXjr7ov">The Kids Aren’t Alright</a></strong> by <strong><a target="_blank" href="spotify:artist:5LfGQac0EIXyAN8aUwmNAQ">The Offspring</a></strong></td><td></td></tr><tr><td>76.</td><td><strong><a target="_blank" href="spotify:track:0nDqJMKcSTtYlGK6OQ3sLC">Kiss Me Thru The Phone</a></strong> by <strong><a target="_blank" href="spotify:artist:49pNW7BpR7N25ikqYFgH4C">Soulja Boy Tell`em, Sammie</a></strong></td><td></td></tr><tr><td>77.</td><td><strong><a target="_blank" href="spotify:track:0kO3njY9N1Rxgv27Ha1lLh">Numb</a></strong> by <strong><a target="_blank" href="spotify:artist:6XyY86QOPPrYVGvF9ch6wz">Linkin Park</a></strong></td><td></td></tr><tr><td>78.</td><td><strong><a target="_blank" href="spotify:track:7cx6hiNiJIcSNfFZYW5fsQ">Don’t Stop Me Now</a></strong> by <strong><a target="_blank" href="spotify:artist:1dfeR4HaWDbWqFHLkxsg1d">Queen</a></strong></td><td></td></tr><tr><td>79.</td><td><strong><a target="_blank" href="spotify:track:2nPXRL8SX00vl9zeQHMSQp">I Want You Back</a></strong> by <strong><a target="_blank" href="spotify:artist:3fMbdgg4jU18AjLCKBhRSm">Michael Jackson, Jackson 5</a></strong></td><td></td></tr><tr><td>80.</td><td><strong><a target="_blank" href="spotify:track:75dHnNDDenNLCUwU1Shvcj">Sugar &#8211; feat. Wynter</a></strong> by <strong><a target="_blank" href="spotify:artist:0jnsk9HBra6NMjO2oANoPY">Flo Rida</a></strong></td><td></td></tr><tr><td>81.</td><td><strong><a target="_blank" href="spotify:track:1r1eut6GuXFFDbX0vd9NPv">Bulletproof</a></strong> by <strong><a target="_blank" href="spotify:artist:3K2zB87GZv1krx031en5VA">La Roux</a></strong></td><td></td></tr><tr><td>82.</td><td><strong><a target="_blank" href="spotify:track:3eag3qvx1Cwsn1ABAN4otn">Battlefield &#8211; Main Version</a></strong> by <strong><a target="_blank" href="spotify:artist:2AQjGvtT0pFYfxR3neFcvz">Jordin Sparks</a></strong></td><td></td></tr><tr><td>83.</td><td><strong><a target="_blank" href="spotify:track:75lONKZNhv4bvUxiwzKxIc">Dance With Somebody &#8211; Radio Version</a></strong> by <strong><a target="_blank" href="spotify:artist:5I4eibDkC7gg0hmczTZuND">Mando Diao</a></strong></td><td></td></tr><tr><td>84.</td><td><strong><a target="_blank" href="spotify:track:0e9yNhxYfJul6sQ8Cizr1B">The Climb</a></strong> by <strong><a target="_blank" href="spotify:artist:5YGY8feqx7naU7z4HrwZM6">Miley Cyrus</a></strong></td><td></td></tr><tr><td>85.</td><td><strong><a target="_blank" href="spotify:track:4hy4fb5D1KL50b3sng9cjw">Smells Like Teen Spirit</a></strong> by <strong><a target="_blank" href="spotify:artist:6olE6TJLqED3rqDCT0FyPh">Nirvana</a></strong></td><td></td></tr><tr><td>86.</td><td><strong><a target="_blank" href="spotify:track:4BbxSTDqfnX76DtwZLHuJb">The Boy Does Nothing</a></strong> by <strong><a target="_blank" href="spotify:artist:5jLwURKdEPDvuYnac74s9c">Alesha Dixon</a></strong></td><td></td></tr><tr><td>87.</td><td><strong><a target="_blank" href="spotify:track:2ygaLrZRz3rSrghhlv0sSN">Supernova</a></strong> by <strong><a target="_blank" href="spotify:artist:1zV9UjTUevjp5VUddqIUUn">Mr Hudson, Kanye West</a></strong></td><td></td></tr><tr><td>88.</td><td><strong><a target="_blank" href="spotify:track:0vJCPCKymBZJqcFqSMxLFM">Rockstar</a></strong> by <strong><a target="_blank" href="spotify:artist:6deZN1bslXzeGvOLaLMOIF">Nickelback</a></strong></td><td></td></tr><tr><td>89.</td><td><strong><a target="_blank" href="spotify:track:3FtYbEfBqAlGO46NUDQSAt">Electric Feel</a></strong> by <strong><a target="_blank" href="spotify:artist:0SwO7SWeDHJijQ3XNS7xEE">MGMT</a></strong></td><td></td></tr><tr><td>90.</td><td><strong><a target="_blank" href="spotify:track:3xKUTwzJKRYtbPWN6oQxXq">I Know You Want Me [Calle Ocho] &#8211; Radio Edit</a></strong> by <strong><a target="_blank" href="spotify:artist:0TnOYISbd1XYRBk9myaseg">Pitbull</a></strong></td><td></td></tr><tr><td>91.</td><td><strong><a target="_blank" href="spotify:track:4dPFAbEvx9GscqsDICUg96">Hurtful</a></strong> by <strong><a target="_blank" href="spotify:artist:1K65R5zY4i7esTh3cX1Bfi">Erik Hassle</a></strong></td><td></td></tr><tr><td>92.</td><td><strong><a target="_blank" href="spotify:track:71J35WJeJJKTg9WNTya0pf">Summer Of ‘69</a></strong> by <strong><a target="_blank" href="spotify:artist:3Z02hBLubJxuFJfhacLSDc">Bryan Adams</a></strong></td><td></td></tr><tr><td>93.</td><td><strong><a target="_blank" href="spotify:track:5j0OkRN4KRzVeSfY63buDe">Down</a></strong> by <strong><a target="_blank" href="spotify:artist:3Z02hBLubJxuFJfhacLSDc">Jay Sean, Lil Wayne</a></strong></td><td></td></tr><tr><td>94.</td><td><strong><a target="_blank" href="spotify:track:3GvCywrlMlMQX7aEd2fRTP">Om du lämnade mig nu</a></strong> by <strong><a target="_blank" href="spotify:artist:33zLgL7tT1vg7eRpWYX5uI">Miss Li, Lars Winnerbäck</a></strong></td><td></td></tr><tr><td>95.</td><td><strong><a target="_blank" href="spotify:track:5R9a4t5t5O0IsznsrKPVro">Single Ladies (Put A Ring On It)</a></strong> by <strong><a target="_blank" href="spotify:artist:6vWDO969PvNqNYHIOW5v0m">Beyoncé</a></strong></td><td></td></tr><tr><td>96.</td><td><strong><a target="_blank" href="spotify:track:0jDWRUbxSn8zQlwFbeLHwo">Evacuate The Dancefloor</a></strong> by <strong><a target="_blank" href="spotify:artist:5BoFxAHL4lunOzKtO3bOL0">Cascada</a></strong></td><td></td></tr><tr><td>97.</td><td><strong><a target="_blank" href="spotify:track:6J2Gg6h1pnLi6kijjXOXCs">The Funeral</a></strong> by <strong><a target="_blank" href="spotify:artist:0OdUWJ0sBjDrqHygGUXeCF">Band of Horses</a></strong></td><td></td></tr><tr><td>98.</td><td><strong><a target="_blank" href="spotify:track:4xJjD28UsZlqbX7tBV3Aj5">Bad</a></strong> by <strong><a target="_blank" href="spotify:artist:3fMbdgg4jU18AjLCKBhRSm">Michael Jackson</a></strong></td><td></td></tr><tr><td>99.</td><td><strong><a target="_blank" href="spotify:track:3tvWMBIblzT5FSjKtIeRR1">Whatever You Like</a></strong> by <strong><a target="_blank" href="spotify:artist:4OBJLual30L7gRl5UkeRcT">T.I.</a></strong></td><td></td></tr><tr><td>100.</td><td><strong><a target="_blank" href="spotify:track:6PPu2SJkd5XmHU7q4QifbQ">New Divide</a></strong> by <strong><a target="_blank" href="spotify:artist:6XyY86QOPPrYVGvF9ch6wz">Linkin Park</a></strong></td></tr></tbody></table><p>List provided thanks to <a href="http://soyplastic.net/top-100-con-lo-mas-escuchado-en-spotify-en-2009">soyplastic</a>.</p> <img src="http://feeds.feedburner.com/~r/Neo22s/~4/aZ8g5TTtb7Y" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/spotify-links/feed/</wfw:commentRss> <slash:comments>5</slash:comments> <feedburner:origLink>http://neo22s.com/spotify-links/</feedburner:origLink></item> <item><title>WP-Rir, Plugin to prevent you to do image hotlinking</title><link>http://feedproxy.google.com/~r/Neo22s/~3/J-sh8dbkuc8/</link> <comments>http://neo22s.com/wp-rir/#comments</comments> <pubDate>Thu, 24 Dec 2009 18:13:09 +0000</pubDate> <dc:creator>Chema</dc:creator> <category><![CDATA[WordPress]]></category><guid isPermaLink="false">http://neo22s.com/?p=804</guid> <description><![CDATA[First of all, Merry Xmas!!! Do you remember rir.li this service to prevent you to do image hotlinking? To make easier the usage of this service, here you have the plugin for WordPress. Installation:Download In your WordPress go to admin Dashboard -&#62; Plugins -&#62; Add new-&#62;Upload Select the downloaded file Activate Enjoy ;)Usage: Once it&#8217;s installed, you can use it to copy any [...]]]></description> <content:encoded><![CDATA[<p><strong>First of all, Merry Xmas!!!</strong></p><p>Do you remember <a href="http://rir.li/">rir.li</a> this service to prevent you to do image hotlinking?</p><p>To make easier the usage of this service, here you have the plugin for WordPress.</p><p><strong>Installation:</strong></p><ul><li><a href="http://wordpress.org/extend/plugins/wp-rir/">Download</a></li><li>In your WordPress go to admin Dashboard -&gt; Plugins -&gt; Add new-&gt;Upload</li><li>Select the downloaded file</li><li>Activate</li><li>Enjoy ;)</li></ul><p><strong>Usage:</strong><br /> Once it&#8217;s installed, you can use it to copy any images in the service of rir.li like this:</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;rir&gt;http://www.turisbot.com/images/maastricht.jpg&lt;/rir&gt;</pre></div></div><p>or</p><div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[rir]http://www.turisbot.com/images/maastricht.jpg[/rir]</pre></div></div><img src="http://feeds.feedburner.com/~r/Neo22s/~4/J-sh8dbkuc8" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://neo22s.com/wp-rir/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <feedburner:origLink>http://neo22s.com/wp-rir/</feedburner:origLink></item> </channel> </rss><!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk
Database Caching 11/13 queries in 0.018 seconds using disk
Content Delivery Network via Amazon Web Services: S3: neo22s.s3.amazonaws.com

Served from: ps20232.dreamhostps.com @ 2010-03-13 01:52:15 -->
