Archive

Archive for June, 2006

Search Engine Optimizing PHP Scripts

June 28th, 2006 No comments

PHP pages have a reputation of being more difficult (or at least different) to SEO than static HTML pages. Here is an overview of the major issues encountered when trying to optimize PHP script for search engines. While this focuses on PHP much of it is still relevant to SEO ing dynamic pages in general.

PHP Speed

While page size does affect load time, spiders run on servers connected to high bandwidth networks, so download time is less important than the latency of the PHP script execution time. If a search engine spider follows a link on a site and is forced to wait too long for the server to process the PHP code behind that page, it may label your page as unresponsive.

The biggest delays in a PHP script typically are the database and loop code. Avoid making SELECT * calls, instead explicitly name all the columns you want to retrieve, and if you are using MySQL, test your queries using the EXPLAIN statement. To optimize loops consider using duplicated code instead of loops that don’t repeat very many times, also use as many static values, such as count($array) values inside the loop as you can, generating their values before the loop once.

Use of Compile Cache

The execution times can be improved by implementing compile caches like Turk MMCache (http://turck-mmcache.sourceforge.net) or APC as a php module. Though I do agree, that these would not be sufficient where contents are changing dynamically or across time.

Read more…

Categories: Uncategorized Tags: ,

SiteX – The Automated Personal Website

June 26th, 2006 No comments

SiteX is a web tool that will enable you to start your own dynamic website in under 5 minutes. Driven by PHP and MySQL, SiteX is comprised of components common to most personal websites including a photo gallery, journal, calendar/events, guestbook, link manager, forum and web polls. Everything in SiteX is managed via your own personal administration panel. Additional pages can also be added by the user by preference through the easy WYSIWYG editor. SiteX utilizes an advanced control panel that lets the end-user completely customize the site down to the colors, text, pages, components, navigation, and advanced options.

See some of the sites hosted with saturn which were personalized by in house designers with the support from the respective maintainters.

From the features available in the above listed sites, as well as the design aspect, one can know well that SiteX is going to make the hits.

Visit the SiteX Home: http://sitex.bjsintay.com/

Categories: PHP, Suite Reviews Tags: ,

File Caching Class

June 26th, 2006 No comments

Howdy,

This comes useful when you think about getting content from other sites like RSS Feeds, text feeds, currency conversion rates etc. I tried to make this several times without such an enhancement. Finally the need arose and I have made this a reality.

I will need to find a better code highlighter plugin for wordpress before I can post many php codes and classes. Meanwhile this is being trying for a change:

Read more…

A file proxy class

June 25th, 2006 No comments

In a recent web project of mine, it was needed to offload some mp3 files to another server as per the hosting providers specifications. ;) these could not be overidden since the service was free for a specific purpose. The database was on a different server, and as most of you know, this does not affect php a bit.

But the media bifurcation did take me for a spell. On my test bed, I was using readfile() to read the contents of the mp3file to the browser, after providing correct header tags. In the test server this was working fine, since the file urls were relative ofcourse. I checked through the hosting system using phpinfo() and did confirm the url_fopen wrappers were enabled. But to my dismay, when loaded on to the hosting space, it seemed that the readfile was failing and hence I needed a different method.

Then like a thunderbolt this idea of a file proxy class came to my mind. And this was implemented. It works for me and my project. There may be different view points, as well as enhancements. I would appreciate it if some one could enhance it in case the url_fopen wrappers is disabled in the php configuration.

Read more...