Entrepreneur, Web Developer and Facilitator from God's Own Country

Last date of a month in php

Last date of a month in php

May 12, 2011

I have came across some crazy snippets of code finding the last day of a month in php. Then I came across this very simple method. PHP date function takes a paramater as ‘t’ which gives the number of days of a month which is the last day Winking smile

so

<?php
echo date(‘Y-m-t’)';
?>

will give you the last day of the month

You can use the same method to find the last method of any month/year using strtotime

<?php
echo date(‘Y-m-t’, strtotime(‘next month’));
?>

Peace of cake right Smile

Twitter API whitelisting Approved in hours…

Twitter API whitelisting Approved in hours…

Jul 22, 2009

As I will be working on kukku, my twitter app, i thought of applying for Twitter API whiltelisting. So i did it yesterday night, and today when i woke up found its approved. So cool. The mail which they sent is here.

Rate1

They mention in the mail that it’ll take 48 hours to activate it but surprisingly when i checked my Tweetdeck, It was activated. 150 to 20,000 API requests per hour. Must utilize this…

Rate2

What all things you will see here?

As you can see in the heading of the blog, this is all about technical stuff. You can articles, source codes, samples etc on Linux, Windows, Apacahe, MySQL, PHP, WAMP Server, Code Igniter , Ajax, Javascript, Web 2.0, Web 3.0, CSS, HTML, Web development, SEO etc etc etc…