Main Contents

Flash CMS v0.0.1

March 19, 2009

This was a proof of concept we sent to our client requesting dynamic content for Flash media plus a web based editor for the content.
At first glance it seems as if they are asking for something that could take months to develop. However, it’s actually simple enough that could be done by patching one component [...]

Filed under: ActionScript, Flash, General, PHP | Comments (3)
Related Links:

Filter non-numeric characters

December 24, 2008

Usually when creating a scraper or a simple parser we encounter data that are usually not as clean as we expected it to be. For example We should be parsing only the sale price but the label gets in the way. These codes could be useful for the purpose of filtering out unwanted characters.
Integers:

$dirty_data = [...]

Filed under: PHP, PHP & MySQL | Comments (1)
Related Links:

Inserting records from a SELECT statement (MySQL)

September 9, 2008

I often forget even simple syntax that makes MySQL operation easy. I’m just adding this basically for personal reference.
Using INSERT statement combined with the SELECT statement you could actually add records from one table to another table. Adding a WHERE clause could enable you to filter the records to copy. Below is the syntax.

INSERT INTO [...]

Filed under: MySQL | Comments (4)
Related Links:

NOT id IN (1, 2, 3) vs NOT (id IN (1, 2, 3))

September 5, 2008

Problem:
You’re probably wondering why the following query doesn’t  work on some mySQL databases
SELECT * FROM table1 WHERE NOT id IN (1, 2, 3)
works on mySQL v5.0.51a
doesn’t work on mySQL v4.1.21
Solution:

Filed under: MySQL | Comments (2)
Related Links:

PHP Sample – RSS v1.0

August 16, 2008

There are basically three parts you need to be concerned about when generating an RSS v1.0:

The RSS related data
The feeds
The search information

RSS related data
These will be the data that are specific to the whole feed or to the website. These would include the following:

title
link
description
image

Feed Items
These will be items you would want to put on the [...]

Filed under: PHP, Samples | Comments (1)
Related Links:

PHP Force Download :: Fixing Safari Download Header Issues

October 26, 2007

Problem:
We’d got this client requesting a download script written in PHP. The Script should be able to run in Mozilla Firefox, MS IE, and Safari. Sounds simple enough right? I mean this could simply be done by just sending the following headers:

header(“Pragma: public”);
header(“Expires: 0″);
header(“Cache-Control: must-revalidate, post-check=0, pre-check=0″);
header(“Cache-Control: private”,false);
header(“Content-Transfer-Encoding: binary”);
header(“Content-Type: video/x-ms-wmv”);
header(“Content-Length: “.@filesize($filepath));
header(“Content-Disposition: attachment; filename=\””.$filename.“\”;”);

We’ve been using [...]

Filed under: PHP, Safari | Comments (2)
Related Links: