Archive

Posts Tagged ‘PHP’

New Wordpress Plugin: Escape HTML

Sep 1st, 2010

Many of Wordpress users post codes online. Code can be HTML code, JavaScript code, PHP script or any other kind of code, codes need to be escaped so that it can come correctly in web page. I used to use this tool for escaping script for online posting on Wordpress… READ MORE

Y2K38 Bug and PHP DateTime Class to the rescue

Aug 28th, 2010

Are you aware of Y2K38 bug. I guess you are aware of it but do not know it by name. You may know that on 32 bit system, PHP date time can work from 1970 to 2038. 03:14:07 UTC on 19 January 2038 is farthest date you can use to… READ MORE

PHP Extensions List

Aug 26th, 2010

PHP has lots of extensions and many are loaded by defaults based on PHP version you are using.

I was just reading about this PHP function get_loaded_extensions(), which gives you list of PHP extensions loaded in your installation and thought of writing this post.
To get list of available PHP… READ MORE

PHP: Regex Find and Replace any Word (string or text) at one go

Aug 22nd, 2010

How to achieve find and replace in one go? I tried searching for find and replace at a time then I could not find the direct answer on net. There is find/search at a time or replace. I want to do both.
PHP regular expression function preg_replace_callback() can achieve this… READ MORE

Solution to Wordpress Blank Web Pages without error Display

Jul 25th, 2010

Are you getting blank pages on Wordpress without any error displaying on web browser? I got this error when I have deactivated the W3 Total Cache and with that removed subdomain used as cdn. Therefore, I have shifted all the media files to normal upload directly. In the process I… READ MORE

PHP + CURL: Get Returned Content Mime Type

Jul 22nd, 2010

Did you ever tried to get mime type of the returned content in CURL! I was writing a small application for something and thought to know the Content-Type (mime type) of the response data returned by CURL’s exec(). Before thinking of anything else, I habitually started Goggling and found this… READ MORE

Filter/Edit CSV (Comma Separated Value) Data

Jul 16th, 2010

CSV is very common format for data interchange. It is not as famous as XML and JSON but it is always easy to work with. CSV file can be opened directly in MS Excel and readable in any text editor. It does not take as much space as XML takes.… READ MORE

Get User Defined Constants in PHP

Jul 15th, 2010

PHP function – get_defined_constants()  gives all the constants defined in current scope.  It can be CORE Constants, extensions defined constants and user defined constants. As a developer you may be interested in all defined constants or user defined constants at a time. As the total number of constants printed on… READ MORE

EditPlus Text Editor’s Encoding support

Jul 3rd, 2010

I am using Editplus from quite long time. I use it as it is fast and efficient in whatever it is capable of doing. It is lightweight. EditPlus has very good support of Unicode. It’s  encoding facility works very well. It can auto detect encoding of a file and use… READ MORE

Junk Character Problem with ISO-8859-1 (Latin1) Encoding

Jun 27th, 2010

Here is a rumbling about the Junk characters that appear from time to time on page due to wrong settings on editors or for other reason.
Take this text for example:
Europa im Mietwagen bis zu 15 % GÜNSTIGER
Große Tour – große Ersparnis!
Here is image of the above… READ MORE