Archive for the ‘php’ Category

Testing out OpenX – PHP-based Ad delivery

Tuesday, June 3rd, 2008

I have a couple of sites I want to run ads on and just installed open-source ad server, OpenX. The installation was easy. I plan to run the first tests here – so watch out!

I tried this out years ago as PHPAdsNew. New name and new product really. My first impressions are good. Will post how I go once I get into it some more.

Here is a walkthrough of setting up a campaign …

Generating Barcodes with PHP

Wednesday, May 14th, 2008

Note: if you are going to use the barcode class I mention check out the comments from Zech below. He found a bug

barcode example
see below for the translation of the barcode

PHP Classes is always my first stop when looking for PHP code, no matter how advanced (or easy to be honest).

I have recently been working on a shopping cart system and implementing barcode generation, as well as allowing a barcode scanner be used as an input device to speed up aspects of order management and data entry.

There are a number of barcode generation classes at PHP Classes. Harish Chauhan’s Barcode Class has been very useful. His class supports a number of barcode standards and allows generation at various sizes. There is a simple form provided to allow generation of barcodes and demonstrate the features of the class.

I will update this when I have finished all the functionality.

The barcode scanner arrives in the morning!

Oh – and the barcode above says “www.createwebsite.info” in the code128 format.

UPDATE: here it is with the font uploaded for the text!

a barcode example with the text embedded

Having problems importing a large MySQL database? Try this …

Saturday, April 19th, 2008

Bigdump is a PHP script that staggers the import of a large MySQL dump. It processes a small chunk and then refreshes. This continues until the database is fully imported. This is great for hosts that don’t give you access to ssh or who place restrictions on file uploads or server execution times.

The only thing to configure is the database host, user, and password. Simply upload the dump file to the same directory as the bigdump file (use FTP or the built-in uploader) and then process that file.

Reasons for switching back to PHP from Ruby on Rails – one perspective …

Sunday, March 23rd, 2008

Great article by the developer of CD Baby on changing back to PHP after working with Ruby on Rails. Not a diss on Rails – he just states several reasons why he found it easier to return to PHP. Good perspective.

read more | digg story

Save yourself some work: important PHP classes/libraries/projects for developers

Saturday, March 22nd, 2008

From sending mail with attachments to fetching content via RSS to sending a trackback – a list of common coding tasks that is solved with good existing code.

read more | digg story

One they didn’t mention and that I use all the time is Manuel Lemos’ HTTP Protocol Client – complete with lots of examples!

PHP and MySQL Optimization

Wednesday, March 19th, 2008

A list featuring a few very simple tips for optimizing php/mysql applications …

read more | digg story

PHP Security Presentation

Wednesday, March 19th, 2008

List of Web Development Cheat Sheets

Sunday, March 16th, 2008

Great list of links to web development cheat sheets covering Javascript, CSS, HTML/XHTML, AJAX, Colors, Microformats, Browser Compatability, and XML.

read more | digg story

Web Application Security for PHP

Saturday, March 15th, 2008

Very good resource on common security concerns for web applications relating to application design and development.
Web Application Security

Speeding up PHP Code

Saturday, March 15th, 2008

40 tips to optimize PHP code – for example “Error suppression with @ is very slow.” and “$row[’id’] is 7 times faster than $row[id]“.

read more | digg story