How to header CSV to UTF-8
header('Content-Encoding: UTF-8');
header('Content-type: text/csv; charset=UTF-8');
header('Content-Disposition: attachment; filename=Customers_Export.csv');
echo "\xEF\xBB\xBF"; // UTF-8 BOM
Facebook Auto Post
Postsible help you to manage your content for Fan Page,Group and App Profile Page. You can post status,link and album at time and date you have plan.
Turn off caching for JavaScript files on Firefox
พิมพ์ about:config ในช่อง Url
ค้นหา network.http.use-cache เปลี่ยนเป็น false
ค้นหา browser.cache.offline.enable เปลี่ยนเป็น false
[Javascript] Unixtime to Datetime and Datetime to Unixtime
// อันนี้ Date Time => Unixtime
var d = Date.parse(“10/15/2011 02:00:00”);
// format ในตัวอย่างเป็น mm/dd/yyyy hh:ii:ss
เอาค่า d หาร 1000 ได้เท่ากับ Unix time บน MySQL เพราะ Java เก็บเป็นมิลลิวินาที
กรณีเอา Unixtime บน MySQL ก็ต้องเอามาคูณ 1000 ก่อนเหมือนกัน ก่อนนำมาใช้
// หา Date Month Year วันที่ โดย unixtime อย่าลืม 000 ที่เปนมิลลิวินาที
// ข้างล่างเป็น Unixtime => Date Time
// Date
var d=new Date(1318791600000);
document.write(d.getDate(1318791600000));
// return 17 [1-31]
// Month
var d=new Date(1318791600000);
document.write(d.getMonth(1318791600000)+1);
// return 10 ต้องบวก 1 เพราะ มัน 0-11 [0-11]
var d=new Date(1318791600000);
document.write(d.getFullYear(1318791600000));
// return 2011 [four digits]
var d=new Date(1318791600000);
document.write(d.getHours(1318791600000));
// return 2 [0-23]
var d=new Date(1318791600000);
document.write(d.getMinutes(1318791600000));
// return 0 [0-59]
นี่เป็นตัวอย่างฟังก์ชั่นง่าย ๆ ของ Javascript เกี่ยวกับ Date Time
ข้อมูลเพิ่มเติม http://www.w3schools.com/jsref/jsref_obj_date.asp