cPanel Automated Backup Script Using PHP, Cron Jobs and FTP

Backup is one of the most important things that has to be done in your environment. But doing manual backup every week is hard work. You have to log in to your cPanel, navigate to the backup page or backup wizard page, make your selection and click the button. Why can’t we automate this process? If you have standard cPanel (not a customised like Hostgator), you can set an automated backup with the help of cron job, PHP and FTP

Continue Reading

Rotating iOS Photo Correctly using CodeIgniter’s Image_lib

I have an issue with iOS Photo recently not being displayed properly after uploading. After googling around, I’ve managed to found a workaround for this issue. Imagine this scenario: You have a working website with file uploader and then strange phenomenon happens when you upload a photo from iPhone in portrait. The photo is uploaded properly, but the orientation is landscape. What is the problem with iOS Photo? The problem was that image rotation was added to the photo as EXIF

Continue Reading

PHP Scripts For Specific IP Address

There are some times when I need to check some variables or run a full error reporting but I don’t want to let anyone see what’s going on. So a quick solution is to allow my code to run what I want for specific IP Address (which is my IP Address) [crayon-662bf0b7dfc96739790197/] This PHP snippet is handy if you need to do print_r(), var_dump(), or even test a block of code. Don’t forget to change the IP address to your

Continue Reading

Sliding Sidebar