Quantcast
Channel: Redips spideR Net» PHP
Browsing all 10 articles
Browse latest View live

Write to a log file with PHP

As I caught myself in process of writing PHP "log" function several times I have finally decided to create a simple Logging PHP class. After Logging class initialization, first call of lwrite method...

View Article


From MySQL to HTML with PHP and XML

In my post "From MySQL to XML with PHP", I described how to generate XML from the MySQL database. Instead of printing out XML, generated XML can be buffered and transformed with XSL to the HTML. Maybe...

View Article


Log PHP errors to the separate file

In this post you will find how to configure PHP to log errors and warnings to the separate log file - error_php. You can place error_php wherever you want, but I will suggest to choose the /tmp...

View Article

Create thumbnail with PHP (1)

PHP can be used to create and manipulate image files in a variety of different image formats. This post shows how to create thumbnail image in the same directory as the original image. Instead of GD...

View Article

Create thumbnail with PHP (2)

In this post you will find how to create thumbnail images with PHP. Function uses GD library so it doesn't depend on installed utilities like ImageMagick. On the other hand, you will have to install...

View Article


Find files with PHP

In PHP you can find files with function glob. The glob function searches for all the pathnames matching pattern according to the rules used by the libc glob function, which is similar to the rules used...

View Article

Backup Linux server with PHP

You can find a lot of backup solutions for Linux server. From expensive and multi platform software like NetBackup to simple BASH scripts. As a Linux (LAMP) administrator, I decided to write my own...

View Article

Week list for the current date in PHP

This post shows two examples of how to find the week list for the current date. Input parameter is date, and the output is date list from Monday till Sunday. First example is done with classic...

View Article


Reading multiple parameters in PHP

Suppose you have to send four values: element Id, table, row and column compounded in one URL parameter. That is simple, parameters can be concatenated and delimited with special character. But how to...

View Article


Convert PHP associative array to XML

Post shows simple PHP function of how to create XML string from associative array. In foreach loop, each item will be closed within XML tag named on key part of array member. After loop is finished,...

View Article
Browsing all 10 articles
Browse latest View live