Archive for the 'How-tos' Category

How to develop desktop-like web applications ?

Uki is a JavaScript library that allows you to develop web applications to have the look and feel and interactiveness of a desktop application. You can get Uki from Ukijs.org.

Continue reading ‘How to develop desktop-like web applications ?’

How to eliminate Mixed content security warning on your web pages

Security mixed content warning
You should have been pretty familiar with the above prompt of your web browser, especially Internet Explorer, if you’ve been involved in developing web pages for your websites that are delivered via the HTTPS secure channel.

Continue reading ‘How to eliminate Mixed content security warning on your web pages’

Google Gears Geolocation API, example displays your location on Google Map

The Google Gears Geolocation API allows you to display your current position data by obtaining it from your WiFi antenna. The Google Gears Geolocation API is able to obtain the exact location of the user’s current location, in terms of latitude, longitude and even the address etc. User browsers such as Internet Explorer, Firefox must have Google Gears installed excepts Google Chrome, in order to have the Google Gears API to work on your browser.

Continue reading ‘Google Gears Geolocation API, example displays your location on Google Map’

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’

How to recover deleted files emptied from the Recycle bin

I know it’s a disaster, when you’ve mistakenly deleted some important files or documents and you’ve mistakenly emptied the recycle bin of your Windows again. If you’ve done both, in your mind those files must have been completely gone, there is no way for you to have the files back in Windows, it’s just like a complete disaster to you now.

Continue reading ‘How to recover deleted files emptied from the Recycle bin’

JavaScript, how to copy DIV’s or SPAN’s content to clipboard

In one of my previous posts, I had a DIV that contains some codes, and I wanted to have this code to be able to be copied by someone onto a clipboard for better viewing. So, what I had was only a very simple javascript function for doing it. And note, it works on Internet Explorer only.

Continue reading ‘JavaScript, how to copy DIV’s or SPAN’s content to clipboard’

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’