Archive for the 'PHP' Category

Web Hosting review blog


I’ve started a new blog, Have Your Business Online, which is a blog that centers around web hosting services, reviews, e-commerce and CMS solutions or the essential tools that you need to bring your business online.

Continue reading ‘Web Hosting review blog’

Convert documents into flash, a web-viewable format

One of my projects is studying on how to convert any documents in Word, Excel or Powerpoint formats into FLASH format which is viewable by most browsers with flash plugin.

Continue reading ‘Convert documents into flash, a web-viewable format’

To validate if an URL exists, use PHP CURL

PHP Curl allows you to validate if a given URL exists. What you need to do is just a simple function as follows, which takes an input URL and returns the code. If the returned code is 200, then the URL exists, else it doesn’t!

Continue reading ‘To validate if an URL exists, use PHP CURL’

How to shorten long URLs in a user-input text by using TinyURL programmatically

TinyURL allows long URL to be shortened. In this example, I’d like to show how you can build a text form that contains text keyed in by a user, and sends to the server-side PHP to detect those overly long URLs and shorten them one by one by sending them to TinyURL service.

Before I proceed, I’d like to let you know that TinyURL has an API, which is as follows and it returns a single string only that is the tiny url which has been shortened from the given “url” parameter.

Continue reading ‘How to shorten long URLs in a user-input text by using TinyURL programmatically’

Sorting data made easy using JavaScript table sorter

javascript-table-sorter
If you’re asked to build a PHP script that pumps out some data from the database and presents in an HTML table to the users. And on the first row of the table, shows the titles of each field (As pictured above). Once the user clicks on each title the data in the column need to be sorted. If you implement this in a server-side scripting such as PHP, it’ll then need to send the request back to the server to get the server-side PHP script to sort the data by changing the “ORDER BY” in an SQL statement.

Continue reading ‘Sorting data made easy using JavaScript table sorter’

A simple Java FTP connection + file download and upload

The Java or JDK comes with NO support of any official API for FTP connection. But there is an internal that comes in the sun.net package, but this is NOT well-documented, and you will hardly find how to use other methods within the sun.net.ftp.FtpClient class.

Continue reading ‘A simple Java FTP connection + file download and upload’

Compress JavaScript to speed up download : The online compressor for YUI

When building AJAX dynamic web applications you’ll have to load lots of JavaScript libraries, one of them will be the YUI, (Yahoo UI), which has a whole bunch of handy library components that you can use for Ajax and DHTML web apps.

Continue reading ‘Compress JavaScript to speed up download : The online compressor for YUI’

How to get rid of error or warning messages output by PHP in a programatic way for a production PHP web app

Lets say you’re on a shared hosting, or you’re only a programmer which you have NO control at all on the error warning messages output by PHP, such as those E_WARNING, E_ALL, E_STRICT etc.

Continue reading ‘How to get rid of error or warning messages output by PHP in a programatic way for a production PHP web app’

How to write your own cloaking detector in PHP

Cloaking is black hat SEO that we always hate, especially running wordpress that always gets hacked with spam links injection at the bottom of your footer page.

Continue reading ‘How to write your own cloaking detector in PHP’

Encode movie in FLV Flash video on your webpage


In order for a video clip to be shown on a webpage, you’ll need to convert it to a FLV flash format, which the file has the .flv extension

Continue reading ‘Encode movie in FLV Flash video on your webpage’