News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Paul Gregg's Blog:
PHP algorithms Determining if an IP is within a specific range.
April 28, 2009 @ 09:25:39

Paul Gregg has shared a method he's come up with to determine if a given IP is within a selected range.

Unfortunately although people usually understand that an IP address is simply an unsigned 32 bit integer, and is easily determined, usually with $_SERVER['REMOTE_ADDR'], where the real challenge is - is in specifying the range within which they wish to check that IP address. IP ranges are usually specified in three common ways (in increasing complexity): wildcard, start-end range, classless inter-domain routing.

He looks at each method and includes descriptions and code examples as well as a link to the source code and a live demo of it in action.

0 comments voice your opinion now!
algorithms ip address specific range three method wildcard cidr startend


Echolibre Blog:
Customising Zend Framework Routing
March 13, 2009 @ 10:23:04

On the echolibre blog J.D. has made a new post looking at Zend Framework routing and how you can customize it to get the user where they need to go.

I wanted to write a post that shows a few different ways to customise Zend Frameworks routing when you're using their MVC implementation. Most of this is covered in the documentation, but it can be a little difficult to dig out.

He starts with the normal routing setup (the standard /module/controller/action and /controller/action setups) and moves on to the "magic" - a way to have a standard "framework URL" without having to include an action. He sets up a route with a wildcard to catch anything for that controller and passes it off to a custom router that goes through the request values and returns the values as though they were formatted normally in the URL.

0 comments voice your opinion now!
zendframework routing custom wildcard match parameter url


WebReference.com:
How to Create a Search Feature with PHP and MySQL
August 07, 2008 @ 07:53:10

On WebReference.com today Ryan Butler has written up a tutorial of a simple search feature that can be integrated into any site (with their content in a MySQL database).

In this article, you'll learn how to create a searchable form feature that will query a database table and display current staff member information. During the analysis you'll learn how to do the following: create a database table that will hold current staff listings, create a search form and use PHP, in coordination with Structured Query Language (SQL) to capture information entered by the visitor and append the information to display the results we want to show.

They give you the files for the project and work through each, showing how to make the database, put information in and connect to the database to run the query. He opts for the LIKE functionality in the WHERE clause to find the term as a wildcard in the FirstName field. It's not the most efficient, but it can be useful.

0 comments voice your opinion now!
mysql search engine like wildcard tutorial


The bla.st Blog:
Process your URLs in PHP with Apache mod_rewrite and wildcard DNS
January 02, 2007 @ 08:10:00

There's a quick post on the bla.st blog about a handy method to create "pretty URLs" for your website without changing your code (much). With this example, it's all about Apache and mod_rewrite.

For our bla.st project, we decided to put all URLs through a single PHP script, and process them there. The advantage is then we can do what ever we want with the URLs.

They provide the settings and directives that you'll need to drop into Apache and what they're doing so you can customize them to your site. There's even a brief PHP example at the end showing how to get the information from the URL and into a usable form.

0 comments voice your opinion now!
process url apache modrewrite module wildcard dns process url apache modrewrite module wildcard dns



Community Events





Don't see your event here?
Let us know!


release deployment framework community api bugfix podcast zendserver tips series language developer symfony library opinion conference interview threedevsandamaybe laravel introduction

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework