Contest Submissions Have Closed
Thank you for your interest in WestHost's PHP contest. As of March 16th, 2011, the contest is closed for new submissions. We would like to thank our sponsors, System 76, Zend, and php|architect and all who participated in the contest.
Congratulations to the following individuals for their winning functions:
- Mark Willis
- Joost de Valk
- Klaus Silveira
- Fabian Schmengler
- Michal Vrchota
- Jan Martinek
- John Proffer
- Bnaya
- Jakub Vrana
- Weldan Jamili
-
getCenter
By subrahmanyam, submitted on 03/15/2011This function returns center of any two unsigned integers. It works with any type of data types.
-
Image Compress & Resize
By Arivazhagan, submitted on 03/14/2011Compress Upload Image Size and Re-Size Image
-
AmPM
By Ali A, submitted on 03/13/2011Converts time in the format: HH:MM:SS and HH:MM into AM/PM format. E.g: 13:05:00 -> 1:05 PM 15:30 -> 3:30 PM If the time is in the format: HH:MM instead of HH:MM:SS, set the 2nd argument to false.
-
mysqlToHuman
By Ali a, submitted on 03/13/2011This function takes a date in mysql date format, i.e 2011-06-30, and returns a more easily readable date, e.g 6th June, 2011.
-
time_ago
By Bui Hoang Hai, submitted on 03/11/2011A small and function for display past time that user posted (like 1 hour ago...). We just don't care the exact time like: he posted 2 days 1 hour 3 minutes ago. The logic is, the futher an event, the less we care about the exact time.
-
tryRepeat Object Function.
By John Anderson, submitted on 03/11/2011try Repeat allows you to continuously execute a function until it returns true. $wtry = new tryRepeat('$this->objct->connect();',300,$dbLayer); first argument = function or method call second argument = time between trys third = object for method call also optional
-
XML String to Array - Concise
By James, submitted on 03/11/2011There is no quick and convenient way to convert XML into an assoc array (that I know of). This concise function does just that using json_decode & json_encode. Compatible only with PHP5 and up. Also, requires the JSON extension.
-
Array Return By Key
By Brandon Kozak, submitted on 03/10/2011This function will return an array by any key held within the array. Very nice for sorting by returned columns from a database.
-
Array Dereference
By Shaun, submitted on 03/10/2011Returns the value of an array by key when the array is returned via a function call. Ex: $x = dereference(func(),'someKey'); instead of $arr = func(); $x = $arr['someKey'];
-
Get Disk Memroy Space based on option
By Tam, submitted on 03/09/2011Function is used to get memory limit of particular disk and will print memory space in according to kilo, mega, giga, tera bytes level
CDP
Continuous Data Protection takes a snapshot of your site every six hours and allows you to restore as many or as few files as you wish; all done without talking to anyone but your keyboard. Add it in the order form.
Hosting Solutions
Web HostingReseller Hosting
Cloud Servers
Dedicated Servers
Domain Registration
Register a DomainDomain Hosting
Information Center
About WestHostContact Us
Media Center
Forum
Blog
Careers
Affiliates
Data Center
Terms & Policies
Site Map