How to detect bots in a server side script like PHP

Humans and bots will do similar things, but bots will do things that humans don’t. Let’s try to identify those things. Before we look at behavior, let’s accept RayQuang’s comment as being useful. If a visitor has a bot’s user-agent string, it’s probably a bot. I can’t image anybody going around with “Google Crawler” (or Read more about How to detect bots in a server side script like PHP[…]

Adding mssql support in php5 on Debian or Ubuntu

To add/install MSSQL support in PHP5 on Debian linux server, follow the below steps: Install FreeTDS and the PHP MS SQL extension sudo apt-get install freetds-common freetds-bin unixodbc php5-sybase Note: That is correct, the MS SQL extension is in the “php5-sybase” package. Restart Apache sudo /etc/init.d/apache2 restart If everything went fine then you will be Read more about Adding mssql support in php5 on Debian or Ubuntu[…]

Cakephp preventing ARO to check for user permissions

In cakephp most of us use ACL with Auth component to manage logins and access to various pages. When we need to implement this feature based on User Roles only. Sometimes the ARO checking gives error – that the User not exist for the foreign key. This is because if the role does not have Read more about Cakephp preventing ARO to check for user permissions[…]

Mobile device emulators to test web page display

Today, the usage of mobile is increasing day by day and most of the users are preferring mobile device over desktop. Therefore it is almost necessary to check how a web page looks on a mobile device and make adjustments using the mobile specific CSS. But it is not every time possible to have all different Read more about Mobile device emulators to test web page display[…]

WordPress plugins to help Administrators

While browsing thorough my emails today morning. I found a link to wordpress plugins for blog administrators. This is a well categorized list and have plugins listed for User interface improvement, security, collaboration, editing support etc. Let me know if you like it or not. Or which plugins do you use on every wordpress site Read more about WordPress plugins to help Administrators[…]

Reset password of Joomla 1.0.x Administrator

Recently I need to upgrade one Joomla 1.0.x installation to the new installation. If you are also dealing with Joomla 1.0 installation to upgrade or maintain and missed the password for admin user.  This can also be useful if you need to add new admin user, without disturbing the old user records. Then here are Read more about Reset password of Joomla 1.0.x Administrator[…]

Server side forced reload of a cached file in browser

With the advent of modern browsers, web pages are using more and more javascript and stylesheets to make applications work faster and look better. And this is achieved with caching the Javascript, images and CSS files in the browser cache in user’s machine. This is great for speeding up page load for end user, but Read more about Server side forced reload of a cached file in browser[…]

Working with Access-Control-Allow-Origin

When developing Ajax applications on local machine you may face this error on almost all browsers that cross referring a link from other domain is not allowed. This is mentioned as the “Access-Control-Allow-Origin” on Google Chrome. To work around this issue, temporarily – yes temporarily as this may make your system unsafe – you need Read more about Working with Access-Control-Allow-Origin[…]

Session issue in IIS with CakePHP

When working on PHP and MySql development we rarely get a chance to install the application on Windows IIS server. And today I was asked to do the same. The first issue was related with mod_rewrite which is easily solved by un-commenting the line – Configure::write(‘App.baseUrl’, env(‘SCRIPT_NAME’)); But the big issue came when I found Read more about Session issue in IIS with CakePHP[…]