<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 23 May 2012 12:53:06 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Grabbing the referrer search engine keywords for a site]]></title>
      <guid>http://www.phpdeveloper.org/news/17009</guid>
      <link>http://www.phpdeveloper.org/news/17009</link>
      <description><![CDATA[<p>
On his blog today <i>Sameer Borate</i> has a new post with a handy bit of code you can use to <a href="http://www.codediesel.com/php/grabbing-the-referrer-search-engine-keywords-for-a-site/">find the keywords from a search engine referral</a> to help with tracking how visitors have come to your site.
</p>
<blockquote>
A couple of weeks back I had to write a solution for a client to track the referrer search engine from where the user came to his sites contact page, without using Google Analytics. If a user was to fill the contact form on the website, the referring search engine name and the keyword for which it was refereed was to be emailed along with the contact information. The following is a solution for the same.
</blockquote>
<p>
The code itself is pretty simple - it checks the $_SERVER['HTTP_REFERER'] and, based on an array of search engine types, looks for a certain "query" keyname in the URL and matches what follows (with <a href="http://php.net/preg_match">a regular expression</a>). This can be useful for not only determining what sort of audience is visiting your site, but could also be used to present a custom message to visitors from certain search engines (or, more complicated, to show different content based on search terms).
</p>]]></description>
      <pubDate>Tue, 18 Oct 2011 13:25:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Evert Pot's Blog: Taking advantage of PHP namespaces with older code]]></title>
      <guid>http://www.phpdeveloper.org/news/15838</guid>
      <link>http://www.phpdeveloper.org/news/15838</link>
      <description><![CDATA[<p>
<i>Evert Pot</i> has <a href="http://www.rooftopsolutions.nl/blog/taking-advantage-of-php-namespaces-with-older-code">a quick post</a> about a suggestion mentioned at <a href="http://conference.phpbenelux.eu/2011/">PHPBenelux</a> related to using namespaces with older code.
</p>
<blockquote>
If you're running PHP 5.3 and you have to use pesky old code that uses long class prefixes (yea, so, pretty much all PHP code out there), you can still make use of namespace features to shorten them.
</blockquote>
<p>
He includes a quick example that shows the shift from using the traditional Zend_Controller_Action_Helper_AutoComplete_Abstract to an aliasing with the use/as to just reference it as AutoComplete.
</p>]]></description>
      <pubDate>Tue, 01 Feb 2011 10:10:35 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: How to Use PHP Namespaces (Parts 2 &3)]]></title>
      <guid>http://www.phpdeveloper.org/news/12873</guid>
      <link>http://www.phpdeveloper.org/news/12873</link>
      <description><![CDATA[<p>
The SitePoint PHP blog has posted the next two parts of their series looking at using namespaces in PHP - parts 2 and 3:
</p>
<p>
In <a href="http://www.sitepoint.com/blogs/2009/07/14/php-namespaces-import-alias-resolution/">the second part</a> of the series they build on <a href="http://www.phpdeveloper.org/news/12861">the basics</a> and look at importing namespaces into a script, aliasing them to a shorter, easier to use name and some rules to consider about name resolution.
</p>
<p>
The <a href="http://www.sitepoint.com/blogs/2009/07/15/how-to-use-php-namespaces-part-3-keywords-and-autoloading/">third part</a> of the series (the last part) looks at the keywords the namespace functionality uses and how to autoload namespaced classes to keep their namespacing intact.
</p>]]></description>
      <pubDate>Wed, 15 Jul 2009 08:16:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: The Best Ways to Fight Spam]]></title>
      <guid>http://www.phpdeveloper.org/news/11149</guid>
      <link>http://www.phpdeveloper.org/news/11149</link>
      <description><![CDATA[<p>
Spam is a constant burden for anyone on the web, be it through email or via something like comments on a website. The NETTUTS site can't help so much with the first one, but they've come up with <a href="http://nettuts.com/misc/the-best-ways-to-fight-spam/">a new tutorial</a> that can help with the second with a few methods.
</p>
<blockquote>
Deciding on the best method of spam prevention on your blogs, forums, or even contact forms can be difficult. In this article we will take a look at a service called Akismet and how it can help. We will also look at why some other methods of fighting spam fail. 
</blockquote>
<p>They give a few ways to waylay the spammers including:</p>
<ul>
<li>Disallowing multiple consecutive submissions
<li>Keyword Blacklist
<li>CAPTCHA
<li>and a service called <a href="http://akismet.com/">Akismet</a>
</ul>
<p>
They go into a bit more detail on this last one, even going so far as to included code (<a href="http://www.achingbrain.net/files/PHP5Akismet/PHP5Akismet.0.4.zip">this class</a>) and examples of how to let the Akismet service see if something is spam or not. Links to libraries for other languages are included too.
</p>]]></description>
      <pubDate>Mon, 06 Oct 2008 09:30:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Weier O'Phinney's Blog: Migrating OOP Libraries and Frameworks to PHP 5.3]]></title>
      <guid>http://www.phpdeveloper.org/news/10529</guid>
      <link>http://www.phpdeveloper.org/news/10529</link>
      <description><![CDATA[<p>
<i>Matthew Weier O'Phinney</i> recently <a href="http://weierophinney.net/matthew/archives/181-Migrating-OOP-Libraries-and-Frameworks-to-PHP-5.3.html">posted about</a> a method he's come up with for migrating your object-oriented libraries (including frameworks) over to the upcoming PHP 5.3 version of the language.
</p>
<blockquote>
With PHP 5.3 coming up on the horizon, I'm of course looking forward to using namespaces. 
</blockquote>
<p>
He gives an example of how useful these namespaces can be for you and your code, but points out one failing point - trying to define classes in a namespace that are named the same as a built-in keyword for PHP. There's already been a suggestion to add a captial "I" in front of the class name to prevent this collision.
</p>
<p>
There's also the problem of throwing custom exceptions - unless you use the namespace properly your script will just throw a default exception.
</p>]]></description>
      <pubDate>Wed, 02 Jul 2008 10:24:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[IBM developerWorks: Use the YouTube API with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/9980</guid>
      <link>http://www.phpdeveloper.org/news/9980</link>
      <description><![CDATA[<p>
In <a href="http://www.ibm.com/developerworks/xml/library/x-youtubeapi/index.html?ca=drs-tp1608">this new tutorial</a> on the IBM developerWorks website, they show you how - with a little simple HTML and PHP - to integrate functionality from the YouTube API into your site.
</p>
<blockquote>
The YouTube video sharing site allows Web application developers to access public content through its REST-based developer API. [...] This article introduces the YouTube Data API, demonstrates how you can use it to browse user-generated video content; access video metadata, comments and responses; and perform keyword searches.
</blockquote>
<p>
They help you get started by outlining the format that the YouTube messages use (Atom feeds) and how to run a query against the API and return back the custom data for things like video categories, popularity and the results of keyword searches.
</p>]]></description>
      <pubDate>Wed, 16 Apr 2008 22:42:36 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jeff Moore's Blog: Keywords and Language Simplicity]]></title>
      <guid>http://www.phpdeveloper.org/news/8828</guid>
      <link>http://www.phpdeveloper.org/news/8828</link>
      <description><![CDATA[<p>
<i>Jeff Moore</i> has <a href="http://www.procata.com/blog/archives/2007/10/11/keywords-and-language-simplicity/">posted</a> and shared an interesting graph showing something I'd never thought about comparing one language versus another on - the number of keywords it uses.
</p>
<blockquote>
Well, I like programming language comparisons, so how could I resist <a href="http://iolanguage.com/about/simplicity/">this chart</a> (<a href="http://programming.reddit.com/info/2z11k/comments">via</a>) promoting the simplicity of the io language by pointing out how few keywords it has. The interesting thing about this is that Java and PHP are tied on this measure of simplicity with 53 keywords.
</blockquote>
<p>
Though not too meaningful, it is interesting to see how the different languages stack up in the number of reserved words you can't use for anything else. So, does that mean that Perl is the list limiting?
</p>]]></description>
      <pubDate>Fri, 12 Oct 2007 11:55:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[David Sklar's Blog: Runkit, "static", and inheritance]]></title>
      <guid>http://www.phpdeveloper.org/news/7859</guid>
      <link>http://www.phpdeveloper.org/news/7859</link>
      <description><![CDATA[<p>
<i>David Sklar</i> <a href="http://www.sklar.com/blog/archives/108-Runkit,-static,-and-inheritance.html">points out</a> an issue that keeps coming up over and over again in the course of object-oriented applications - why the static keyword doesn't know about inheritance.
</p>
<blockquote>
<p>
There are plenty of good reasons why PHP 5 works this way and it seems that in PHP 6 the static keyword will be able to be used in place of self to get the dynamic behavior a lot of folks are looking for. [...] All well and good once PHP 6 is done.
</p>
<p>
In the meantime, I was noodling around with <a href="http://pecl.php.net/package/runkit">runkit</a> and came up with some glue that lets you do something like this.
</p>
</blockquote>
<p>
In his runkit example uses a glue class called MethodHelper that uses various things (including some reflection) to manually look into the classes and find the static information.
</p>
<blockquote>
A fun proof of concept, but not something (for efficiency reasons) you'd probably want to run on a busy production site. 
</blockquote>]]></description>
      <pubDate>Thu, 17 May 2007 08:43:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Nick Halstead's Blog: How to make AuctionAd$ dynamic with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/7787</guid>
      <link>http://www.phpdeveloper.org/news/7787</link>
      <description><![CDATA[<p>
On the Programming and Management blog today, <i>Nick Halstead</i> has posted <a href="http://blog.assembleron.com/2007/05/04/how-to-make-auctionad-dynamic-with-php/">a quick look</a> at how to make the AuctionAd$ you include on your site a bit more dynamic.
</p>
<blockquote>
<p>
Before you read the rest of the article (you may not be interested in the coding side) the end result is that I have built an AuctionAd$ display system that adjusts the keywords it uses based upon the visitor clicking adverts. This means that your visitors will automatically adjust what is displayed for them by clicking or not clicking on the adverts shown. 
</p>
<p>
You still have control over the keywords you use but, instead of a supplying a single keyword, you supply a list that it initially selects from and then adapts based on your visitors interaction.
</p>
</blockquote>
<p>
He shows <a href="http://blog.assembleron.com/2007/05/04/how-to-make-auctionad-dynamic-with-php/">his method</a> - grabbing the keyword information from a SQL database that has a weighting system based on the number of mouseovers for the ad for that keyword. The information is stored in a SQL database and is updated dynamically via an ajax request.
</p>]]></description>
      <pubDate>Mon, 07 May 2007 10:30:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ilia Alshanetsky's Blog: Reliably locating phpinfo()]]></title>
      <guid>http://www.phpdeveloper.org/news/6552</guid>
      <link>http://www.phpdeveloper.org/news/6552</link>
      <description><![CDATA[<p>
In his <a href="http://ilia.ws/archives/135-Reliably-locating-phpinfo.html">latest post</a>, <i>Ilia Alshanetsky</i> shares a handy (and a little scary) tip on finding the location of a phpinfo page reliably to help figure out the common PHP settings developers out there are using.
</p>
<blockquote>
The problem with finding a reliable pool of such pages is that basic search often contaisn many blog, forum, bugs.php.net and alike entries which area copy & paste outputs from users. This maybe fine in some instances, but what if you just want the real phpinfo() pages. The answer is surprisingly simple.
</blockquote>
<p>
His solution? To <a href="http://ilia.ws/archives/135-Reliably-locating-phpinfo.html">search for an element</a> always in the page, but unique to it - usually the term you're looking for (like his suggestion of "Zend Scripting Language Engine"). He links to two result sets, one from <a href="http://www.google.com/search?num=100&hl=en&lr=&safe=off&q=inurl%3Aphp+%22Zend+Scripting+Language+Engine%22+%22Mozilla%2F5.0+%28compatible%3B+Googlebot%2F2.1%3B%22&btnG=Search">Google</a> and the other from <a href="http://search.yahoo.com/search?p=%22Zend+Scripting+Language+Engine%22+%22Mozilla%2F5.0+%28compatible%3B+Yahoo%21%22&prssweb=Search&ei=UTF-8&fr=yfp-t-501&x=wrt">Yahoo</a>. 
</p>
<p>
Besides the phpinfo information, <i>Ilia</i> also mentions the other handy data you can find with similar searches to major search engines like Apache header information.
</p>]]></description>
      <pubDate>Mon, 23 Oct 2006 11:26:00 -0500</pubDate>
    </item>
  </channel>
</rss>

