Function checkTime()

Disebabkan ada yang bertanya pasal function checkTime() yang digunakan dalam #WaktuSolat, camni rupanya :-

[php]

function checkTime($currentTime, $startTime, $endTime){

// written 11/26/2006 by Patrick H. (patrickh@gmail.com)

//

// the time passed must meet all the below criteria to return 1 (true):

//

// – current hour needs to be equal or greater than start hour

// – current hour needs to be equal or less than end hour

// – current minute needs to be equal or greater than start minute (if current hour is ok)

// – current minute needs to be equal or less than end minute (if current hour is ok)

//

// if any of those checks does not pass, it will return 0 (false)

 

global $cHour;

global $cMin;

global $sHour;

global $sMin;

global $eHour;

global $eMin;

 

// break up current time

$now = explode(“:”,$currentTime);

$cHour = intval($now[0]); // current time – hour

$cMin = intval($now[1]); // current time – minute

 

// break up start time

$start = explode(“:”,$startTime);

$sHour = intval($start[0]); // start of range – hour

$sMin = intval($start[1]); // start of range – minute

 

// brek up end time

$end = explode(“:”,$endTime);

$eHour = intval($end[0]); // end of range – hour

$eMin = intval($end[1]); // end of range – minute

 

// this is the variable used to track the result of the checks

$pass = true;

 

if($sHour <= $eHour){

// the range is on the same day

 

// compare to the start hour

if($cHour < $sHour){

$pass = false;

}

 

// compare to the end hour

if($cHour > $eHour){

$pass = false;

}

 

// compare to the start min

if($cHour == $sHour){

if($cMin < $sMin){

$pass = false;

}

}

 

// compare to the end min

if($cHour == $eHour){

if($cMin > $eMin){

$pass = false;

}

}

 

} else {

// the range is overnight, so the logic is a little different

 

if( ($cHour < $sHour) && ($cHour > $eHour) ){

$pass = false;

}

 

// compare to the start min

if($cHour == $sHour){

if($cMin < $sMin){

$pass = false;

}

}

 

// compare to the end min

if($cHour == $eHour){

if($cMin > $eMin){

$pass = false;

}

}

 

}

 

// done with check, return the result

if($pass == false){

return 0; // failed

} else {

return 1; // passed

}

 

}

[/php]

Selamat mencuba!

#TopSecretProject – Twitter Alert for Waktu Solat

Memperkenalkan the so-called #TopSecretProject lah. It’s actually a tweet alert which’ll send out tweets bila dah masuk waktu solat fardhu on daily basis. Data waktu solat fetched from JAKIM’s website http://www.e-solat.gov.my/.
It’s actually a simple PHP script connected to Twitter via OAuth, it’ll do a simple checking of current time against the data stored in MySQL database. In order to identify whether the current time is Subuh, Zuhur, etc, I did a checking based on range of time for each sets of solat fardhu using function CheckTime() written by Patrick H. (patrickh@gmail.com). Function can be found at his personal blog.

The idea is to setup twitter alerts for major towns in Malaysia. For now, I’ve started creating 5 twitter accounts to cover Kuala Lumpur, Melaka, Ipoh, Pulau Pinang, & Kuantan. From time to time, I’ll be adding the other areas as well.

Below is the list of covered areas (striked-through) & to be covered.

Feedbacks are welcomed.

  1. WP Kuala Lumpur
  2. Melaka
  3. Ipoh
  4. Pulau Pinang
  5. Kuantan
  6. Kuala Terengganu
  7. Kota Kinabalu
  8. Perlis
  9. Johor Bahru
  10. Kota Bharu
  11. Alor Setar
  12. Kuching
  13. Labuan
  14. Seremban

Credits to @raficyber & @dewmandew for their help.

Uploading YouTube Videos with Zend Framework

Attention all you Zend Framework junkies, Jochen Hartmann has uploaded a new video to youtube that demonstrates the basics of how to use Zend Framework with the YouTube Data API. This step-by-step demonstration walks you though everything you need to know to upload files to Youtube via Zend Framework.

httpv://www.youtube.com/watch?v=iIp7OnHXBlo

PHP 4.4.9 released!

The PHP development team would like to announce the immediate
availability of PHP 4.4.9. It continues to improve the security and the
stability of the 4.4 branch and all users are strongly encouraged to
upgrade to it as soon as possible. This release wraps up all the
outstanding patches for the PHP 4.4 series, and is therefore the
last PHP 4.4 release.

Security Enhancements and Fixes in PHP 4.4.9:

  • Updated PCRE to version 7.7.
  • Fixed overflow in memnstr().
  • Fixed crash in imageloadfont when an invalid font is given.
  • Fixed open_basedir handling issue in the curl extension.
  • Fixed mbstring.func_overload set in .htaccess becomes global.

For a full list of changes in PHP 4.4.9, see the ChangeLog.

PHP 5.3 alpha1 released!

The PHP development team is proud to announce the first alpha release (Windows binaries will appear in the next few days) of the upcoming minor version update of PHP. The new version PHP 5.3 is expected to improve stability and performance as well as add new language syntax and extensions. Several new features have already been documented in the official documentation, others are listed on the wiki in preparation of getting documented. Please also review the NEWS file.

THIS IS A DEVELEOPMENT PREVIEW – DO NOT USE IT IN PRODUCTION!

The purpose of this alpha release is to encourage users to not only actively
participate in identifying bugs, but also in ensuring that all new features or
necessary backwards compatibility breaks are noted in the documentation. Please
report any findings to the QA mailinglist
or the bug tracker.

There have been a great number of other additions and improvements, but here is a short overview of the most important changes:

Several under the hood changes also require in depth testing with existing applications to ensure that any backwards compatibility breaks are minimized. This is especially important for users that require the undocumented Zend engine multibyte support.

The current release plan states that there will be alpha/beta/RC releases in 2-3 week intervals with an expected stable release of PHP 5.3 between mid September and mid October of 2008.

TestFest 2008 wrap-up

Overall 158 tests have been submitted as part of TestFest 2008 since the launch of the TestFest submission site by 30 different people from people all over the world. Actually this is not counting the various submissions by existing core developers, who also took this opportunity to add some more tests. While the organization of the TestFest was a bit adhoc, there were numerous TestFest events in local user groups. So the number of people exposed to the PHP test framework is much greater. Hopefully this will lead to more people submitting bug reports with an accompanying phpt test file!

Our top submitter Felix has actually committed his last submissions himself since, based on the high quality of his submissions, he has been granted commit rights to the PHP repository. We have not heard back from all participants, but we encourage everybody to blog about their experience and provide us with feedback on how to improve future events.

Now better late than never, here are the 10 winners of the promised elePHPant raffle sponsored by Nexen. Note that Felix asked me not to include him in the raffle, since he is already herding quite a number of elePHPants at home.

  • Eric Stewart
  • HÃ¥vard Eide
  • Marc Veldman
  • Michelangelo van Dam
  • Rein Velt
  • Rob Young
  • Sami Greenbury
  • Sebastian Deutsch
  • Sebastian Schürmann
  • Stefan Koopmanschap

We will provide Nexen with the email addresses of the winners, so that they can arrange to get the elePHPants shipped. Also for those people wondering, you can continue to submit tests on the TestFest submission site. A bit thank you to all participants and TestFest organizers! Without the countless people that helped organize local events, implement the infrastructure and submissions reviewers, the TestFest would have obviously not worked out as well as it has. We will surely do similar events in the future based on the big success of TestFest 2008.

Manual restructure and license change

A few weeks ago the manual was restructured
to improve navigation and make room for
per-extension chapters
and usage examples along with
improved documentation for
object oriented extensions.

The most noticable changes are the function reference,
predefined variables,
context options and parameters and
predefined exceptions manual pages,
for which we would really appreciate feedback on.

The upcomming PHP5.3 release introduces
several major features
such as namespaces, closures,
late static bindings, internationalization functions,
INI sections, and Phar among others.
We would really appreciate any and all help we can get improving the documentation.

In related news, the manual was relicensed recently and is now
covered by the
CreativeCommons Attribution license.

ZendCon 2008 – September 15-18 – Santa Clara, CA-US

Join us for the largest PHP only gathering, September 15th18th. Discuss topics such as:

  • PHP in the Enterprise
  • Advanced PHP Programming Techniques
  • Scalability
  • PHP and RIAs

Our guest keynote speaker this year is Zak Greant who will be speaking on The Age of Literate Machines

For more information and to register for the biggest PHP even of the year, visit http://zendcon.com/

php|works CfP Announced!

php|works 2008 will be held November 12-14, 2008 in Atlanta, GA. Our Call for Papers is now open, but the deadline for submissions is July 25, 2008.

This year's php|works takes place concurrently with PyWorks 2008, MTA's new fall Python conference, organized by the publishers of Python Magazine, and attendees to both conferences will be able to attend talks from either.

This gives us a great opportunity to create cross-over talks to cover topics that bridge both worlds, enriching members of either communities and facilitating the cross-pollination of ideas. If you have a topic that fits the bill, or that could be equally interesting to both PHPers and Pythonistas, don't hesitate to propose it.

For more information about our Call for Papers, visit our site at http://phpworks.mtacon.com/c/p/phpworks,cfp.

Call for PUG, for elePHPants, 2008 generation

The elePHPants are now ready to make their 2008 generation.
PHP User groups, enthusiasts and companies that are interested in
groups of elePHPants, shall join this year’s herd.

ElePHPants are a great link of the community, happily promoting your favorite
language in conferences, on work station, baby cribs and other unusual places.
Production prices make it possible for groups to raise funds, entice membership
or simply bring joy and PHP around.

Pre-register your herd of elePHPants
online, for big and small,
and join the world of blue elePHPants.

PHP 5.2.6 Released

The PHP development team would like to announce the immediateavailability of PHP 5.2.6. This release focuses on improving the stability ofthe PHP 5.2.x branch with over 120 bug fixes, several of which are security related.All users of PHP are encouraged to upgrade to this release.

Further details about the PHP 5.2.6 release can be found in the release announcement for 5.2.6, the full list of changes is available in the ChangeLog for PHP 5.

Security Enhancements and Fixes in PHP 5.2.6:

  • Fixed possible stack buffer overflow in the FastCGI SAPI identified by Andrei Nigmatulin.
  • Fixed integer overflow in printf() identified by Maksymilian Aciemowicz.
  • Fixed security issue detailed in CVE-2008-0599 identified by Ryan Permeh.
  • Fixed a safe_mode bypass in cURL identified by Maksymilian Arciemowicz.
  • Properly address incomplete multibyte chars inside escapeshellcmd() identified by Stefan Esser.
  • Upgraded bundled PCRE to version 7.6

Update (May 6th): The Windows installers were missing the XSL
and IMAP extensions.

Update (May 3rd): The Windows archives were missing the XSL
and IMAP extensions.

Google Summer of Code: php.net students

The PHP team is once again proud to participate in the
Google Summer of Code.
Ten students will “flip bits instead of burgers” this summer:

Update (May 11th):
Unfortunately Nicholas Sloan had to drop out of the
program, but he will be replaced by Rudy Nappée working on the same application.

PHP DC conference 2008

The DC PHP Developers Group recently announced Kshemendra Paul as a
featured keynote speaker at the DC PHP Conference & Expo,
June 24,
2008, at George Washington University in Washington, DC. Paul, chief
architect for the Office of Management and Budget Executive Office of
the President, will be presenting on “Federal E-Government and
Enterprise Architecture Updates.”

Join hundreds of PHP practitioners, business managers, and government
officials from around the world in the exchange of ideas and solutions
for building a better web application infrastructure. The DC PHP
conference will include tracks pertaining to business cases, best
practices, the art of PHP, PHP applications, PHP in the enterprise,
and Open Source. The full speaker schedule will be announced shortly.

For more information about DC PHP Conference & Expo 2008 and to register,
please visit www.dcphpconference.com.
Early discounted registration rates affective until April 15, 2008

TestFest 2008

The PHP-QA team would like to announce the
TestFest for the month of
May 2008. The TestFest is an event that aims at improving the
code coverage of the
test suite for the PHP
language itself. As part of this event, local User Groups (UG) are
invited to join the TestFest. These UGs can meet physically or come
together virtually. The point however is that people network to learn
together. Aside from being an opportunity for all of you to make friends
with like minded people in your (virtual) community, it also will
hopefully reduce the work load for the PHP.net mentors.

All it takes is someone to organize a UG to spearhead the event and
to get others involved in
writing phpt tests.
The submissions will then be reviewed by members of php.net before
getting included in the official test suite. Please visit the
TestFest homepage to get
additional details on the TestFest on how to get involved, either as a
UG or by setting up the necessary infrastructure.

Open Source Developers' Conference 2008 – Sydney – Call for Papers

The Open Source Developers’ Conference 2008 is a conference run by open
source developers, for developers and business people. It covers
numerous programming languages across a range of operating systems, and
related topics such as business processes, licensing, and strategy.
Talks vary from introductory pieces through to the deeply technical. It
is a great opportunity to meet, share, and learn with like-minded
individuals.

This year, the conference will be held in Sydney, Australia during the
first week of December. If you are an Open Source maintainer, developer
or user, the organising committee would encourage you to submit a talk
proposal on open source tools, solutions, languages or technologies you
are working with.

For more details, see:
http://osdc.com.au/2008/papers/cfp.html.

If you have any questions or require assistance with your submission,
please don’t hesitate to ask!

We continue to recognise the increasing importance of Open Source
in providing a medium for collaboration between individuals,
researchers, business and government. In recognition of this and
ensure a high standard of presentations, we intend to peer-review
all submitted papers.

OSDC 2008 Sydney (Australia) – Key Program Dates:

  1. 28 Apr – Call for Papers
  2. 30 Jun – Initial proposals (short abstract) due
  3. 21 Jul – Proposal acceptance
  4. 15 Sep – Accepted paper submissions

For all information, contacts and updates, see the OSDC conference
web site at http://osdc.com.au/2008/.

Google Summer of Code 2008

Once again we are glad to announce that we have been accepted to be a Google Summer of Code project. See our program for this year’s GSoC.

We would like to take this opportunity to say thanks to Google Inc. for this privilege to participate once again, and would like to invite everyone to look at our list of ideas: http://wiki.php.net/gsoc/2008. Students are of course more than welcome to come up with their own ideas for their proposals and we will consider each and every application that we will receive.

So once again, thanks to everyone who is involved in this magnificent journey and we hope to see many of you great students and open source passionate join us in our most enjoyable Google Summer of Code projects.

php|tek 2008: Chicago

php|tek 2008: Chicago

The publishers of php|architect Magazine are proud to announce the php|tek 2008 conference in Chicago, Illinois, USA.

The PHP Community meets May 2023 for one of North America’s premier PHP conferences of 2008. Join us to hear top speakers such as Derick Rethans (eZ Systems), Lucas Nelan (Facebook), Chris Shiflett (OmniTI), Eli White (Digg) and yes, even Terry Chay (Tagged).

For the past two years, php|architect’s spring conference has sold out weeks before the start date, so if you’re interested in attending, don’t delay, and be sure to sign up ASAP!

PHP 4.4.8 Released

The PHP development team would like to announce the immediate availability of PHP 4.4.8. It continues to improve the security and the stability of the 4.4 branch and all users are strongly encouraged to upgrade to it as soon as possible. This release wraps up all the outstanding patches for the PHP 4.4 series, and is therefore the last normal PHP 4.4 release. If necessary, releases to address security issues could be made until 2008-08-08.

Security Enhancements and Fixes in PHP 4.4.8:

* Improved fix for MOPB-02-2007.
* Fixed an integer overflow inside chunk_split(). Identified by Gerhard Wagner.
* Fixed integer overlow in str[c]spn().
* Fixed regression in glob when open_basedir is on introduced by #41655 fix.
* Fixed money_format() not to accept multiple %i or %n tokens.
* Addded “max_input_nesting_level” php.ini option to limit nesting level of input variables. Fix for MOPB-03-2007.
* Fixed INFILE LOCAL option handling with MySQL – now not allowed when open_basedir or safe_mode is active.
* Fixed session.save_path and error_log values to be checked against open_basedir and safe_mode (CVE-2007-3378).

For a full list of changes in PHP 4.4.8, see the ChangeLog.

Source : http://www.php.net

Subdreamer CMS

SubdreamerSubdreamer CMS is a powerful yet simple program used for creating websites. With it’s quick installation and easy to use admin interface you will have your website up and running within minutes.

Whether your goal is creating a simple website with a couple pages or a larger website with hundreds of pages, Subdreamer CMS will get you there by providing unbeatable content management tools. Download today and join the thousands of members that are already using Subdreamer CMS to power their websites!

KEY FEATURES

WYSIWYG Editor
Create your pages and articles easily with one of the best editors available. This HTML text editor brings to you many of the powerful functionalities of known desktop editors like Word.

Images and tables can easily be added using the Wysiwyg editor. The editor is compatible with the most important browsers available in the market: IE 5.5+, Firefox 1.0+, Mozilla 1.3+ and Netscape 7+.

Forum Integration
Not only does Subdreamer offer its own member system, but it also allows complete integration with phpBB 2, phpBB 3, vBulletin 2, vBulletin 3, Simple Machines Forum 1, and Invision Power Board 2.

With integration, you can login from any page, display top posters, display forum stats, integrate usergroups, and so much more!

Search Engine-Friendly URLs
The robots used by search engines have problems with dynamic pages that are created by most Content Mangement Systems. However, Subdreamer converts dynamic URLs into static URLs so that they can be indexed! For example, a link such as: subdreamer.com?index.php?categorid=2 would be rewritten to subdreamer.com/features.

Image Manager
No longer will you need to open your FTP program to upload images. Subdreamer provides an Image Manager to sort through, resize, and upload images on to your website. This makes it incredibly easy to add news images to articles and overall keep track of all your images.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑