Hao909 - blog.hao909.com - Davy's Blog
General Information:
Latest News:
MySQL Optimize Top 21 Tips 7 Aug 2013 | 06:02 pm
1. Optimize Your Queries For the Query Cache Most MySQL servers have query caching enabled. It’s one of the most effective methods of improving performance, that is quietly handled by the database eng...
How to create a full screen iframe 30 May 2013 | 01:52 am
A useful script to make a full page iframe. No scrollbars! Work in FF, Chrome and IE. <html> <head> <style type="text/css"> body { margin: 0; overflow: hidden; } #iframe1 { height: 100%; left: 0px; po...
How to XSS attack – JS injection in url 11 Apr 2013 | 12:57 am
Some websites validate some bits and pieces but fail in other cases assuming that user will not pass anything strange there. French OS Con website is and example of that XSS security risk. If you go t...
HowTo install ImageMagick PHP extension 5 Mar 2013 | 07:34 pm
How to install ImageMagick from YUM repository The easiest way to install ImageMagick extension is to install it from yum repository: 1) Run “yum search imagick” command to check if ImageMagick extens...
How to expand/adjustable iframe height 2 Mar 2013 | 09:20 pm
Works fine in all browsers. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <title>iframe example</title> <style type="te...
How to flush the local DNS cache in Fedora? 14 Dec 2012 | 08:16 pm
You can flush your local DNS cache in Linux by following these easy steps: 1. Open your terminal to use the command line. 2. Log in as root using the su command: user@host:~$ su Password: root@host: 3...
PHP library for PDF Word Excel 19 Nov 2012 | 08:03 pm
PHP Excel Reader – Parse and retrieve information from XLS files http://code.google.com/p/php-excel-reader/ PHPExcel – OpenXML – Read, Write and Create Excel documents in PHP – Spreadsheet engine http...
How to get a list of month between two dates using PHP 22 Jun 2012 | 11:02 pm
This demo will show you how to get a list of month between 2 dates. First, let’s find out how to get the next month : function get_next_month($tstamp) { return (strtotime('+1 months', strtotime(date(...
MySQL group by day, month or year 15 Jun 2012 | 12:34 am
Using the DATE_FORMAT operator, you can easily group the timestamp, date or datetime column using any format you want. For example, I needed to group rows that were added on the same day. Here is my q...
Import CSV File into PHP Array 14 Jun 2012 | 12:31 am
A Comma-separated values (CSV) file stores tabular data (numbers and text) in plain-text form. Often it is one record per line seperated by a comma or any other delimeter. The comma , is often used in...