 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPClasses.org: PHP Zeitgeist 2012
by Chris Cornutt January 18, 2012 @ 10:04:24
On the PHPClasses.org blog there's a new post with a "zeitgeist" they've generated from statistics on the site (such as search queries and overall popularity of packages).
For those that are not yet aware of this probably because they only arrived to the PHPClasses site recently, PHP Zeitgeist is an initiative that aims to study what were the last year trends regarding what PHP developers have been searching for.
According to their results, some of the trends ramping up (or still going strong) for 2012 include:
- Social media sites
- Sites like Groupon, Foursquare and Bitcoin
- jQuery plugins
- Doctrine
- MODX
- SugarCRM
voice your opinion now!
zeitgeist2011 phpclasses zeitgeist search
PHPMaster.com: Practicing Regular Expressions with Search and Replace
by Chris Cornutt November 23, 2011 @ 14:27:59
On PHPMaster.com today there's a new tutorial that shares a few regular expression tips about doing some search and replace in your content.
So how can you practice using regex if you are limited to just using them in your code? The answer is to use a utility, of which there are many, that uses regex for performing search and replace. I'm sure everyone is familiar with the standard "find x and replace it with y" type of search and replace. Most IDEs and text editors have built in regex engines to handle search and replace. In this article I'd like to walk through a series of exercises to help you practice using regex.
His examples are based on Netbeans but can be used in just about any IDE that supports regex (or even just your code). He shows how to match word boundaries, do some grouping, work with back references and doing some search/replace based on multiple groupings.
voice your opinion now!
regular expression practice search replace boundaries group backreference
php|architect: Full-text Search with SQLite
by Chris Cornutt November 15, 2011 @ 09:53:50
On the php|architect site there's a recent tutorial from Jeremy Kendall about full-text searching in SQLite, a lightweight database alternative that, since it's stored locally, can be used without a full database server.
Full-text search with SQLite is so ridiculously easy to implement, there are only two valid reasons you haven't done it yet. The first is you don't need the full-text capability, and the second is you didn't know it could be done.
In his method he creates a full-text search table (using fts4) and populating it with your data. You can use the "MATCH" keyword in your SQL to find the closest matches and even handy modifiers like "NEARBY", wildcards and token/prefixes in queries. For more detailed information, check out the SQLite documentation for a full guide.
voice your opinion now!
fulltext sqlite search fts4 table
Sameer Borate's Blog: Grabbing the referrer search engine keywords for a site
by Chris Cornutt October 18, 2011 @ 13:25:27
On his blog today Sameer Borate has a new post with a handy bit of code you can use to find the keywords from a search engine referral to help with tracking how visitors have come to your site.
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.
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 regular expression). 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).
voice your opinion now!
search engine keyword referrer url snippet
DZone.com: Solarium PHP Solr client
by Chris Cornutt April 07, 2011 @ 10:09:31
New on DZone.com today there's an article from Bas De Nooijer talking about a new tool he's created to allow PHP to work directly with Solr (the popular searching platform from the Apache project) as a result of research he'd done from a previous article. The result is < href="https://github.com/basdenooijer/solarium">Solarium, an open sourced PHP client for Solr.
I've worked on a lot of Solr implementations in PHP applications. There are multiple solutions: manual HTTP requests, the solr-php-client library, custom implementations etcetera. However they all have one issue in common: they only handle the communication with Solr, many other important parts like query building are not covered at all. And the parts that are covered are usually over-simplified. [...] At first I developed it as a library for my own projects, but I've decided to turn it into an opensource project. The project is called 'Solarium' and can be found on github: https://github.com/basdenooijer/solarium
You can find complete details about the project over on its wiki including basics concepts of query flow and using the ping/select/update query methods to access your Solr server.
voice your opinion now!
solarium solr client github opensource search
PHPCodeBase.com: PHP Magic Function glob()
by Chris Cornutt April 01, 2011 @ 08:21:20
On PHPCodeBase.com there's a recent post looking at a handy file system function that you can use to search directories simpler than a usual opendir/readdir method - glob.
Are you guys still using opendir() function to read the the files from the folder in PHP? Luckily PHP have the glob() function which perform this task very faster and smarter.
He compares an example of the opendir/readdir method to a few line replacement with glob, both searching the same directory for files. He looks at the arguments you can pass into glob - the path to search and a flag that adds special handling to the method (like turning off sorting, modifying the regular expression handling and stopping on errors).
voice your opinion now!
function glob opendir readdir regularexpression search
Timothy Boronczyk's Blog: Geolocation Search
by Chris Cornutt January 28, 2011 @ 11:49:49
In a post earlier this month Timothy Boronczyk took a look at a common feature for web applications that's popping up more and more given the emphasis of social networking - geolocation of your users. The post shows you how to use various web services and data sets to determine where a user is and how they relate to other locations.
Services that allow users to identify nearby points of interest continue to grow in popularity. I'm sure we're all familiar with social websites that let you search for the profiles of people near a postal code, or mobile applications that use geolocation to identify Thai restaurants within walking distance. [...] The first step is to obtain the latitude and longitude coordinates of any locations you want to make searchable.
He talks about why postal code-based location isn't the best option, a web service (like Geocoder.ca for Canadians) could provide more accurate results. He includes code you can use to help search the data based off of two formulas - one to grab the larger area of locations and the other to filter them down into the closest. Finally, he shows how to use the Geolocation API service to get the results based on the user's search parameters.
voice your opinion now!
tutorial geolocation search forumla webservice postalcode
|
Community Events
Don't see your event here? Let us know!
|