Cesar D. Rodas, web development. Technology news. PHP, MySQL, Apache, C, Bash, ASM

Archive for the ‘phpclasses’ Category

Database abstraction layer on PHP with cache

Tuesday, November 13th, 2007

There are many Database abstraction (DBA) for PHP, the well known PDO (PHP Database Object) is a good implementation of a DBA. The small problem is that PDO is only for PHP5, and therefore there many web developers (like me) are not able to use PDO because most of our work was code for PHP4, and PHP5 has many backwards incompatible changes with previous versions. (more…)

Remote File system in PHP

Monday, October 22nd, 2007

Hello to every one, you may be surprised by the title of this post and you may be wondering why a remote file-system in PHP? If around there exist many projects that do that, why re-invent the road?

Well, there are sometimes that you are not the root and you need to share files, especially when you had shared hosting or simple, you wanna became the competition of Amazon S3 (I don’t know why the first example is a bit more possible than the seconds =) ). (more…)

PHP: optimizing the use of Arrays

Saturday, September 29th, 2007

Write programs in PHP is very easy, that is because PHP syntax is simple and very effective. But also in PHP you must have some concepts for write effective programs, because if you are planing to have a very busy web site that little optimizations tips could help you to handle more visitors and to offload a little the processor. (more…)

PHP: Amazon S3 Stream Wrapper

Monday, September 24th, 2007

PHP since version 4 comes with a great feature that is with the possibility to register new Stream Wrapper. (see this articles are good, this, an this too).

Usually IO functions (fopen, unlink, mkdir and others) are handle by the Operating System or an Deamon(service) that works with the hardware for do the operation. PHP because is an JIT (just in time compiling, a kind of interpreted language) gives a tool to developers that is create a Class that manage a type of IO operations, for example take a look behind: (more…)

smb stream wrapper for PHP

Monday, September 17th, 2007

Today in PHPclasses I saw a new class that is very useful. A Stream wrapper that uses the smbclient to access access Windows shared files.

Very useful when you need to work with Windows and shared resources, because use the native PHP may not work correctly sometimes, not because there is a bug, that is simple a windows bug, for further details about the problem, please read this.

The class description said:

This class is a stream wrapper that can be used to access remote files and directories on Windows or other operating systems that support the SMB protocol.

It uses the smbclient program to access Windows network shares, so it works under Linux, other Unix platforms or even under Windows with the Samba client packages installed.

The class implements functions to create, read and write to files available in the local network shares.

It can also list the local network hosts, available shares in an host, and directories of a share.

Congratulations Victor M Varela, and keep writing good and useful class.

While I was writing this post I saw that this class has a Notable package notification with following comment of the site administrator:

Useful package that can simplify accessing local network files on Windows shares or other operating systems that support the SMB protocol.

Once again congratulations Victor.

Download the class

PHP: The easiest way to write and Read RSS

Wednesday, August 1st, 2007

RSS is wild use by blogs, news sites and many others sites by entries syndication. I wrote a class (of course public domain) called gFeed that create a Stream Wrapper for easy manipulation such us creation, append and read. I’ve focus in try to give a easy interface. I hope you like it. Below are a few of examples.

(more…)

Getting recognition for write Free Software

Wednesday, August 1st, 2007

After a long time of be offline without write nothing in my blog, I am back. In this time I will write about the PHP Classes Innovation Award. This is a method used by PHP Classes site to give recognitions to users that with contribute really good PHP classes or projects and encouraging they to do that usually.

Congratulations to the actually winner Khaled Al-Shamaa with ArZipStr him class that compress text using letter frequency for its idiom and Michael Kamleitner for him second place with him phpTube class that upload and download video files from YouTube and to the others. (more…)

Useful tool for organizing MP3

Monday, July 23rd, 2007

Surfing in php classes I’ve found an useful script to organize the MP3 musics file in a given directory. It is useful because it is writen in PHP/MySQL and offer a Web font-end.

Also it store clips of files, usually of 20 seconds but it is configurable. Useful to debug a list of duplicated mp3 files when you have a great number of files.

Of course this is free software written by Nadir

(more…)

Making HTML page sections into draggable blocks

Tuesday, July 17th, 2007

This class can be used make certain HTML page sections into draggable blocks.

It generates start and end div tags and the necessary Javascript to intercept the events of when the user clicks and drags the block inside the div.

The class can assign given Javascript function to handle the event of when the mouse button is released.

Also this class is Public domain, that mean that you are legaly free to copy, redistribute, modify and also include into close source projects for free

Download gWidgets

Here is a simple test how to use it (more…)

PHP: Guess the language of a given text

Monday, July 9th, 2007

There exist a open project called LibTextCat. I’ve used this class for many projects with greats results. What this project do is recieve a text as a parameter and return in what lang it is text written.

A great project for web-crawler and other kinds of projects that need text categorization. The only “problem” (that is not a problem) is that I haven’t found a PHP port of it.

So, I’ve implement the LibTextCat algorithm, and the result could be found here. (more…)

Enter your email address:

Delivered by FeedBurner

this Site

Archives

August 2008
S M T W T F S
« Jun    
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Syndication

Google