Author Archives: Victoria Carroll

PHP Function to return readable mysql timestamps

Something almost every PHP app needs is a way to take Mysql timestamps and convert them to a readable format. So, I went and wrote a few functions to handle this. I used PHP’s date function and strtotime to make this happen. You can edit what it returns by understanding how PHP’s date function works. […]

Lowercase everything in string, upper case first letter in sentence

Another quick and easy one. Using ucfirst, strolower, and a few other functions. In this case my string is called $whyexp but you can change it to whatever you want just make sure you change of of them. $whyexp = ucfirst(strtolower($whyexp)); $whyexp = preg_replace_callback(‘/[.!?].*?\w/’, create_function(‘$matches’, ‘return strtoupper($matches[0]);’),$whyexp); $whyexp = str_replace(” i “,” I “, $whyexp); […]

PHP Function to return readable mysql timestamps

Something almost every PHP app needs is a way to take Mysql timestamps and convert them to a readable format. So, I went and wrote a few functions to handle this. I used PHP’s date function and strtotime to make this happen. You can edit what it returns by understanding how PHP’s date function works. […]

Lim_Registry – PHP Lazy Registry Class

Lim_Registry is a PHP Registry class met ondersteuning voor “lazy loading”. In dat geval wordt er pas een instantie van een class aangemaakt, wanneer deze uit het register wordt opgehaald. Hetzelfde geldt eventueel voor een callback functie. Hoe werkt het? // set Registry::set(‘site_title’, ‘My Site Title’); Registry::setLazyClass(‘db’, ‘DBConnection’); Registry::setLazyCallback(‘avg’, ‘getAverage’); // get $value = Registry::get(‘site_title’); // is loaded (and not in lazy state) […]

How to combine two arrays into one and three arrays into one in PHP

I found a nice snippet for combining two arrays into one. I’d love to credit the original source, but unfortunately I can’t remember it and I can’t seem to find it in Google anymore. If you are the original author or know who they are, please let me know so I can credit accordingly. Here […]

Keyword parsing: separating words by capital letters in PHP

I was trying to create a simple routine for separating the keywords within a domain name based on user input of capitalized words. For example, the user might input: MyDomainName.com This should be parsed into the term “my domain name” based on the capital letters signifying the first letters of each word. As usual, I […]

Mac OS X How to Clean Desktop – Clear Desktop Icons

OK, this post is unrelated to php, but I figured I’d blog it anyway for the possible benefit of other Mac OS X users. If you’re like me, your desktop will accumulate clutter very fast. At the end of a workday, it looks messy, uses up memory and things become difficult to find. An easy […]

ServerHub Launches High Availability Web Hosting Plans

ServerHub, has announced today that it has successfully launched it’s new line of High Availability Web Hosting products. Beginning today ServerHub has entered into the market of Shared Web Hosting by launching three new high availability, RAID protected Web Hosting offerings. Starting at just $14.99 for an Essentials Plan customers receive 7GB of RAID10 protected […]

Offers Low Cost Web Hosting Plus Free SEO

gophpbb.com, provider of low-cost web hosting, domain registration and maintenance services, announced today the launch of its brand new website. Cheap domains start at £3.49 per year. The new site features a fully integrated client area with 24-hour support, where customers can log in and manage all the Raid Host products and services to which they […]

How to choose a CPU for your dedicated server

If you want to purchase a new dedicated server for your web site, you need to know how to choose a CPU for your dedicated server upfront. There are many alternatives of CPU, RAM and Operating System for dedicated servers. In this article We are going to help you choosing a CPU for your dedicated server. Processors Mostly there are two brands […]

WHMCS (Web Host Manager Complete Solution)

What is WHMCS? WHMCS (Web Host Manager Complete Solution) is a PHP script which offers all-in-one solution to web hosting companies. Client management, billing and support tasks are fully automated with this script. So if you want to start a web hosting business from scratch or if you want to fully automate all crucial tasks, WHMCS seems to be the […]

How to upload a video with dailymotion data api using php

Dailymotion is one of the popular video sharing web sites. Users can share and watch videos from this website. There is an opportunity for users to share and earn revenue from their videos like YouTube. Users can upload videos either using the website and with the dailymotion php api. Uploading videos from the website is […]