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

DevShed:
Inserting Comments and Accessing Nodes with the DOM XML Extension in PHP 5
March 11, 2008 @ 15:40:21

DevShed continues their series looking at using the DOM extension in PHP5 to work with XML in your application. They've already looked at adding attributes and creating CDATA information in a new DOM document. This time they build on that and also include new methods - appending comment nodes and getting at XML nodes by their IDs.

I'm talking about the DOM XML extension, which allows you to handle XML documents by using the DOM API. Thus, if you're interested in learning how to put this extension to work for you quickly, look no further, because you've come to the right place. [...] In this third installment of the series, I'll be teaching you specifically how to append comment nodes to a given XML string and how to extract certain elements via their IDs.

They review the method to add attributes and CDATA to an XML document first. Then they cover the other two new topics - appending comment nodes and grabbing nodes by their ID attribute.

0 comments voice your opinion now!
dom extension php5 node cdata attribute id fetch tutorial


Graham Bird's Blog:
Extra-pretty URLs with slugs
June 21, 2006 @ 12:45:35

As the CakePHP framework grows in popularity, more and more tutorials are show up for it, including this quick and handy one from Graham Bird. In it, he explains the use of "slugs" instead of IDs to make URLs simpler to use and remember.

In this tutorial you will learn how to use words rather than IDs in your Cake URLs. These words are known as "slugs" in Wordpress so I decided to call them slugs too.

Cake's normal URLs look like this: www.example.com/stories/read/123245221
and we are going to make them look like this: www.example.com/stories/read/sleepingbeauty

Thanks to the simplicity of the framework, the tutorial is pretty short, using one of CakePHP's "magic functions" to help cross-match the slug given with a table in the database with a slug/title relationship. There's not much code to it and he provides a demo

0 comments voice your opinion now!
cakephp tutorial slugs id simple database cakephp tutorial slugs id simple database


VoucherTrader.co.uk Blog:
A Further Problem With PHP Session IDs and Google
January 12, 2006 @ 06:48:32

On vouchertrader.co.uk today, there's this look at some more issues that can be caused by session IDs with the indexing that Google performs.

While search for the VoucherTrader site in Google I noticed that the description for some pages was coming up as a PHP error about sessions. I actually thought I'd fixed this problem before by preventing PHP from creating sessions when the browsing user's user agent was the Googlebot. Unfortunately I was wrong...

Come to find out, he figured out that, at the time the GoogleBot was coming through, the PHP install wasn't making a session for it. For a fix, he threw in a check to ensure that the user, based on the HTTP_USER_AGENT value, would start the session correctly. The code is included in the post...

0 comments voice your opinion now!
session ID google indexing session_start HTTP_USER_AGENT session ID google indexing session_start HTTP_USER_AGENT



Community Events





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


podcast tool package opinion application symfony introduction security series community language composer voicesoftheelephpant interview laravel framework install version release library

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