News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Hasin Hayder's Blog:
WorldTimeEngine - How about making your own in PHP?
0 comments :: posted Monday March 10, 2008 @ 11:17:00
voice your opinion now!

Hasin Hayder has posted an example of a "world time search" he's worked up that uses the geonames.org and Yahoo! developer APIs to pin down the time at any given location.

I recently came by this site WorldTimeEngine where users can search the local time of any place using the name, street address or just latitude and longitude. Since that time I was thinking how easily you can make your own. As long there are some good people over there (For Geocoding API) - its a not a big deal, you know?

His script pulls the location of the place (latitude/longitude) from the Yahoo! geocoding API and passes that back into the geonames web service to get the local time. The result is an array with the lat/long, address you submitted and the time output in a standard string.

tagged with: world time engine example yahoo api webservice geonames


Developer Tutorials Blog:
Give Your Visitors a Relative Time
0 comments :: posted Friday March 07, 2008 @ 11:19:00
voice your opinion now!

Following on the heels of this post to the SitePoint blog (about "roughtime"), Akash Mehta has posted his own version of providing users with something a little different - relative time.

I understood the merits of the approach, but it struck me that a relative time might be a little more useful for many situations. For example, in a fast moving discussion, a short timestamp (e.g. 8:30 AM) as well as a verbal summary of how long ago the time was (e.g. "4 hours ago", "20 minutes ago") are most useful to the user. [...] Now, I figured this could be achieved very easily in PHP - and it could.

His code is included showing a series of if/else comparisons that change the values to their hour/minute/second counterparts. He also recommends the PEAR Numbers_Words package to help with readability.

tagged with: relative time pear numberswords since

SitePoint WebTech Blog:
Give Your Visitors a Rough Time
0 comments :: posted Thursday March 06, 2008 @ 08:44:00
voice your opinion now!

In a new post to the Web Tech blog over on SitePoint, Toby Somerville has posted something he calls "RoughTime" - his method for displaying a more "human friendly" output of a timestamp.

When asked the time, we generally don't need to be military accurate with our response [...] we generally communicate the approximate time. i.e. 'its nearly ten' or 'its just gone half past three'. Yet on the web, time is generally shown as '12:24:13 AM', or similar â€" not very visitor friendly.

His RoughTime uses two switch statements to map the hour and minute values to different strings. For example, minutes between 15 and 20 become "quarter past" and the hours are changed over from numeric versions to their word counterparts.

tagged with: roughtime switch approximate time hour minute translate

Leon Chevalier's Blog:
Improve website load time by 500% with 3 lines of code
0 comments :: posted Wednesday January 23, 2008 @ 12:09:00
voice your opinion now!

Leon Chevalier has posted about a class he's developed (you can download it here) that can help to speed up the load times for your site.

There are 4 relatively easy ways by which you can speed up the time it takes a browser to download a page. Following on from my post on joining CSS and JavaScript files, I have written a PHP script which will automatically do all of the above.

He gives example code of the class in action and includes some screenshots of the benchmarks from the YSlow Firefox extension showing the improvements.

tagged with: website load time compress gzip class download

PHPWomen.org:
elePHPants
0 comments :: posted Friday January 18, 2008 @ 07:56:00
voice your opinion now!

To help "sweeten the deal" a bit and encourage you to give towards the causes that the PHP Women are trying to accomplish, they're offering a special little bonus for those who donate at a certain level:

Cal Evans from the Zend DevZone - being the awesome guy that he is - has graciously offered to mail out to the first 10 people who donate to PHPWomen $50 or more, a PHP elePHPant. Yep - you get one of the hard to find and much sought after plushy PHP elePHPants.

You can find out more about the goals for their fund raising in this other post to the PHPWomen.org blog as well as information on submitting whatever you feel like donating (time or money).

tagged with: elephpants stuffed toy donate money time phpwomen

Ryan Grove's Blog:
Minify combines, minifies &caches JavaScript & CSS files to speed up page loads
0 comments :: posted Friday May 04, 2007 @ 16:52:00
voice your opinion now!

This new entry on Ryan Grove's blog today points out a handy little tool written in PHP that can be used to (somewhat) reduce the time it takes for your pages to download.

Minify is a PHP library that attempts to fix this problem by combining multiple CSS or JavaScript files into one download. By default, it also removes comments and unnecessary whitespace to decrease the amount of data that must be sent to the browser. Most importantly, it does all of this on the fly and requires only a few simple changes to your existing web pages.

He gives a before and after example of the things it can do - mainly combining multiple tags (like link and script) and their information into one. Check out its page on the Google Code site for more information.

tagged with: css javascript combine reduce load time css javascript combine reduce load time


ajax application zend PHP5 conference framework pecl cakephp database mysql security package releases zendframework PEAR release developer job book code

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework