How to implement OpenID in Yii to sign in with Google Account
After digging and digging around I came to a good article explaining how to integrate OpenID in Yii application to sign in using OpenID account like Google Account, Facebook or Yahoo.
The OpenID example...
How to use PHP Cli in command line
Php-cli is great to run PHP scripts using the command line. You can use php-cli for example to run some commands in PHP locally or remotely using SSH in your server and avoid using the browser.
Before...
Codeigniter, query strings and CSE Google Search
You can fix this problem by checking CodeIgniter’s forum, some people faced the same issue. Szpargalki posted a solution here. Basically he recommends to create a new MY_Router class and permit some...
Prototyping with Pencil Project
Pencil Project is a nice tool that you can use to create interface prototypes or prototyping for the web or desktop applications. Nowadays it can also be used for mobile prototyping or development as well....
Custom Order By in MySQL
If you want to order by custom field in MySQL, then you can use the FIELD operation like this:
ORDER BY FIELD(day, ‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’)
This will...
How to fix Images and CSS relative path in AlphaImageLoader
You should be aware that progid:dximagetransform.microsoft.alphaimageloader expressions uses a relative path to the page and not to the CSS folder, so it may lead in a relative image path problem. It was...
Google is showing IP instead of Domain Name in Search Results
After a couple of weeks, Google is showing my server IP instead of domain name in search results. This is clearly something we would like to avoid since the result may negatively affect SEO for the given...
Top Buttons for your e-commerce Store
Getlastic published a list of 107 Add to Cart Buttons for your online store. If you are running your e-commerce store, then you probably looked for the best buttons. This article published a collection...
Validating Usernames with PHP
Easy snippet to validate user names.
$username = "user_name12";
if (preg_match('/^[a-z\d_]{5,20}$/i', $username)) {
echo "Your username is ok.";
} else {
echo "Wrong username...
How to get the last element from a PHP array
It is easy to get the last element from a PHP Array, just need to invoke the following
$lastitem = array_pop($array);

Recent Comments