. . .

PHP

November 28, 2012

Website Security Measures

I would like to share my personal observations and knowledge relating website security. You can add more by commenting this post. Password Hashing Passwords and other credentials must be stored hashed in Database. Use md5() or sha1() functions. Password Renew On password renew, don’t send password directly to user email […]
November 28, 2012

Verify HTTP URL with PHP

Developers often require verifying the URLs of external sites in various situations like for Affiliate Program, Link Building and many more. We can create a simple function named verifyURL()  which accepts the URL as string parameter and return Boolean if the URL is really an HTML page. function verifyURL($url) { […]
November 18, 2011

Protect Magento Product Images from getting Stolen

It is good that magneto offers watermarking for securing the catalog/product images but this security is not sufficient for advance internet users. Suppose, following is the link for your watermarked image http://www.yourwebsite.com/media/catalog/product/cache/1/image/de684549e4151748e56ee0dd7902c19f/m/y/my-first-image.jpg But if anyone removes the cache/1/image/de684549e4151748e56ee0dd7902c19f part of URL so that it becomes http://www.yourwebsite.com/media/catalog/product/m/y/my-first-image.jpg He can view the […]
September 24, 2011

Magento Admin URL Error 404 Fix

After moving Magento site to new server/location we often get "Error: 404 Not Found" while accessing the admin / back-end. The reason of this error is store_id and website_id should be set to "0" (zero). For some reason when you import the database the values get changed to other than […]
August 14, 2011

Magento Google Checkout 401 Failed to Get Basic Authentication Headers

If you are struggeling to integrate the google checkout with Magento and facing the following error in google checkout console  We encountered an error trying to access your server at https://yourdomain.com/googlecheckout/api -- the error we got is Send failed with code: 401. Response body was: Failed to Get Basic Authentication […]
May 12, 2011

Constructor Overloading in PHP

There is no simple method of overloading constructors in PHP. There are few workarounds to achieve this. I use the following technique. class UserIdentity extends CUserIdentity { public function __construct() { $arg_list = func_get_args(); switch(func_num_args()) { case 1: // calling from admin end.... $this->_user = $arg_list[0];; parent::__construct($this->_user->username,$this->_user->password); break; case 2: […]
April 26, 2011

Yii’s default validator Aliases

Below is the complete list of predefined validator aliases: boolean: alias of CBooleanValidator, ensuring the attribute has a value that is either CBooleanValidator::trueValue or CBooleanValidator::falseValue. captcha: alias of CCaptchaValidator, ensuring the attribute is equal to the verification code displayed in a CAPTCHA. compare: alias of CCompareValidator, ensuring the attribute is […]

  • Cost Efficient Solutions.
  • Minimal Timelines.
  • Effective Communication.
  • High Quality Standards.
  • Lifetime Support.
  • Transparent Execution.
  • 24/7 Availability.
  • Scalable Teams.

Join Our 200+ Happy Clients Across Globe


Free Consultation.

    Do you need tech help of your startup/business? Experts from our team will get in touch with you.

    Please do not post jobs/internships inquiries here.