Category: PHP

Add Ftp Users and Change Home Directory

To add a user account, use the following syntax, and follow the prompts to give the account a password and identifiable characteristics such as a full name, phone number, etc. sudo adduser username To delete a user account and its primary group, use the following syntax: sudo deluser username Deleting an account does not remove […]

Read more
PHP Functions

Easily Run PHP Script As A Cron Job Linux

I’ve nicely written PHP script that I’d like to run as a cron job. I’m using CentOS 4.5 as server with Apache web server. How do I setup a PHP script as a cron job? You need to setup execute permission on a php script. You need to use chmod command to change file access […]

Read more
PHP Functions

How to get Longitude and Latitude from an Address with PHP. So Easy

Read more
PHP Functions

PHP Cookies don’t work on Apple/Mac – Safari and Opera Browsers/iPhone, iPad, iPod Devices – FIXED

If you’re having problems with using PHP $_COOKIES with Safari, Opera, iPad, iPod, iPhone, ibla bla or any Apple product. Please put the gun down. Queue the Hallelujah Chorus… [wpaudio url=”http://www.hallelujah-chorus.com/audio/10277-m-001.mp3″ text=”I just fixed something” dl=”0″] Below will not work on all browsers setcookie(‘nertusername’, $nertusername, time()+60*60*24*365, ‘www.test.com’); setcookie(‘nertpassword’, md5($nertpassword), time()+60*60*24*365, ‘www.test.com’); This will work on […]

Read more
PHP Functions

Limit Characters in a String

Simple enough. echo substr($string, 0,15);

Read more

List Posts Only from Specific Category – WordPress

Read more

WordPress Shortcode to Display the Loop

Just paste this into your theme’s function file.

Read more
PHP Functions

Grammatically Correct PHP Title Capitalization Function

Sometimes a developer has to get their titles from crazy sources that aren’t always capitalized correctly. Nobody wants to change all these titles every time they show up to make the right words capitalized, so here’s a little PHP function that corrects them all for you: function ucTitle($title){ $title = ucwords($title); $title = str_replace(‘ A ‘, […]

Read more

All The Cheat Sheets That A Web Developer Needs

No matter how good  programmer you are, you can`t memorize everything. It often happens to spend more time searching for a particular library, tag or declaration, than implementing it on our code.  To ease your work I have gathered here some of the most important cheat sheets that you will ever need. Do you have any […]

Read more

Free CSS Layout made Easy

Want a simple CSS layout that you can customize into your very own website? BAM! Look Below. Copy the html into a file and name it index.html or index.php whichever you prefer. If you’re not really sure go with html. Do the same with the CSS code but label it style.css and save within the […]

Read more