PHP


Codeigniter Hacks and Tricks

I have been using codeigniter for building small and medium level projects for quite some years now. There are few tweaks and tricks I would love to share with codeigniter enthusiasts to make their work bit easier.   HTML Email Templates If you are building an newsletter system of email delivery method  for sending out different emails with html contents, this one is for you to get the job done seamlessly. Create a folder in your views directory for email templates e.g. emailtemplates Create email templates views and save them in the......

Continue Reading


Codeigniter’s Built-in Captcha with Form Validation

Why Use Codeigniter’s Built-in Captcha Captchas are the images you use on your forms to keep bots off the bay. Codeigniter gives you a built-in captcha helper which you can use to generate some captchas. Bit confusing part for newbies is using codeigniter’s form validation with built-in captcha. Following is the working example of captcha generation and captcha validation in codeigniter. Controller Test.php View myform.php Download the compressed source code from here (mirror).   You can reach Waqas Yousaf through twitter @wiqi....

Continue Reading


HTML parsing and web scraping using PHP

What is Web Scraping? According to Wikipedia, Web scraping means “Web scraping (web harvesting or web data extraction) is a computer software technique of extracting information from websites.” It simply means that you can copy data from other websites to show or store it on your website. Lets say you want to create a currency exchange calcular but you don’t want to input currency rates everyday on the website because its tedious work. You can purchase an API that can cost you around 500 USD or more or you can simply parse......

Continue Reading


PHP date and time functions refernce cheatsheet

Why Do I Need PHP Date And Time Refernce? Need for a PHP date and time reference arose when I was working on a blog and I had to check for the date and time functions every now and then. Let me admit something here. Nobody is a perfect programmer. We usually need references and cheatsheets to get out word done quickly. PHP like every other maintained programming language has like thousands if not millions of function names and parameters. I cannot remember all the functions and classes for a specific task.......

Continue Reading