Why PHP Framework over CorePHP?

The 2018 World Cup is fast approaching, with national sides making their final preparations ahead of this summer’s tournament.

We now know the groups after December’s draw. England have been put together with Belgium, Tunisia and Panama in Group G.

Gareth Southgate’s side were not among the top seeds, meaning they featured in pot two during the proceedings.

And with England’s route now mapped out, Southgate will be able to ramp up preparations for the 2018 tournament. 2018 World cup, football News ,Gaming ,Betscore ,Casino …..Sports.vin

N ideas to increase performance of website – Part 2

To get the basic idea please go through Part – 1.

  • On Page
    1. Image Optimization
      As a general rule of thumb, larger files take longer to download than smaller files. Web page download time, also known as the Page Load Time depends on the total size of content assets being downloaded from hosting servers to the requesting browser.The following image optimization best-practices go a long way in reducing the negative impact of images on website speed:

      1. Proper Format Selection
      2. Proper Sizing and provide dimension on page
      3. Compression
      4. Fewer Images
    2. Optimize CSS Code and DeliveryOptimization isn’t all about minifying file size. The following best practices ensure a speed-optimized CSS delivery:
      1. Shorthand Coding
      2. Remove Browser Specific CSS Hacks
      3. Minify CSS
      4. Code Positioning
      5. Prioritize above-the-fold content
      6. CSS Delivery Best Practices
          1. Use only one external CSS style sheet.
          2. Do not use @import call.
          3. Remove unused CSS.
          4. Do not use CSS in HTML such as H1 and DIV tags.
          5. Use Inline small CSS or remove most inline css.
          6. Minify all CSS
          7. Minification – JavaScript, CSS, HTML


        Minification of CSS, JavaScript and HTML share common benefits: reduced network latency, fewer HTML requests, enhanced compression, faster browser downloading and execution, ultimately boosting page speed and yielding higher scores on website speed measuring tools.

    3. Minimize HTTP Requests : Web  page’s load time is spent downloading the different pieces-parts of the page: images, stylesheets, scripts, Flash, etc. An HTTP request is made for each one of these elements, so the more on-page components, the longer it takes for the page to render.
    4. Enable compression : Compression reduces the bandwidth of your pages, thereby reducing HTTP response. Most web servers can compress files in Gzip format before sending them for download, either by calling a third-party module or using built-in routines.
      To enable compression: 

      1. Apache: Use mod_deflate
        Add few lines of code in your.htaccess file to accomplish this:
        #Begin gzip and deflate
        <IfModule mod_deflate.c>
        AddOutputFilterByType DEFLATE text/html text/css application/x-javascript text/plain text/xml image/x-icon
      2. IIS: Use Configure HTTP Compression
      3. Nginx: Use HttpGzipModule
    5. Enable leverage browser caching: With browser caching, we’re explicitly instructing browsers to hang onto particular files for a specified period of time. When the file is needed again, the browser is to pull from its local cache instead of requesting it from the server again. 
    6. Enable Expire Headers :
      The ExpiresByType directive is used to tell browsers which files to cache and how long to hang onto them
      <IfModule mod_expires.c>
      ExpiresActive On
      ExpiresByType text/html M3600
      ExpiresByType text/css M3600
      ExpiresByType application/x-javascript M3600
      ExpiresByType image/bmp M3600
      ExpiresByType image/gif M3600
      ExpiresByType image/x-icon M3600
      ExpiresByType image/jpeg M3600
  • Off Page
    1. Use of CDN server : CDN is an extension of cache optimization designed to supercharge website performance aimed specifically at globally dispersed Web traffic. Following are some of popular CDN networks.
      1. Maxcdn
      2. Cloudflare
      3. Microsoft Azure CDN
      4. Amazon Cloudfront
      5. BootstrapCDN
      6. CDNetworks
    2. Use of Cache
      1. Use of caching & DB caching in PHP
        1. OpcacheOPcache improves PHP performance by storing precompiled script bytecode in shared memory, thereby removing the need for PHP to load and parse scripts on each request.To install Opcache please go through following link:http://php.net/manual/en/opcache.installation.php
        2. MemCacheMemcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.Please go through following link:http://memcached.org/
        3. phpFastCachephpFastCache is a high-performance, distributed object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. To know more how to use please use following link:http://www.phpfastcache.com/
    3. Use of proper hosting server : It is recommended to use proper hosting services to boost site speed. Dedicated hosting server is more preferable over shared hosting.

Reference links : 

N ideas to increase performance of website – Part 1

Website speed matters. Fast-loading sites perform better on all fronts: better user experience, higher conversions, more engagement, even higher search rankings. If you’re targeting mobile traffic, site speed becomes even more important. No one wants to download a 4MB website on their smartphone, but most sites are that way. Your website can be different.

How fast is fast enough??


While 1-second load time would be nice, if you manage to get a load time under 3 seconds, you’re doing fine. If it’s under 7 seconds, it’s okay too (but you have to try to improve it). Over 10 seconds and you’re losing money in noticeable quantities.

Is website performance impacts business success??

  • Performance Impacts Sales
  • Performance Impacts Conversion
  • Performance Impacts User Engagement
  • Performance Impacts Revenue
  • Performance Impacts Usability

Common Mistakes that Kill Website Performance

  • Ordinary Web Hosting Service
  • Giving Way to Bandwidth Thieves
  • Too Many Widgets or Plugins
  • Too Many Ads and Affiliate Code
  • Bloated Design Theme and Incompatible Multimedia
  • And a Bit More of that Code – Sign Up Forms and Analytics
  • Mobile Mistakes and Misguided Redirects

Website Speed Testing


What to Test?

  • Initial Page Speed
  • Full Page Load Time
  • Load Tolerance
  • Geographic Performance
  • Web Server CPU Load
  • Website Database Performance

How to Test

How to Improve Website Speed?

Online business owners and webmasters adapt their websites to maintain optimal results under the consistent impression of change by improvising, and optimizing key elements of website design that make or break page speed.

To improve we break our tasks in two things

  1. On Page
    • Image Optimization
      1. Proper Format Selection
      2. Proper Sizing and provide dimension on page
      3. Compression
      4. Fewer Images
    • Optimize CSS Code and Delivery
      1. Shorthand Coding
      2. Remove Browser Specific CSS Hacks
      3. Minify CSS
      4. Code Positioning
      5. Prioritize above-the-fold content
      6. CSS Delivery Best Practices
        1. Use only one external CSS style sheet.
        2. Do not use @import call.
        3. Remove unused CSS.
        4. Do not use CSS in HTML such as H1 and DIV tags.
        5. Use Inline small CSS or remove most inline css.
        6. Minify all CSS
        7. Minification – CSS, HTML
      7. Optimize JS Code and Delivery
        1. Minify JS
        2. Code Positioning(Load JS in footer before </body>)
        3. Prioritize above-the-fold JS
        4. JS Delivery Best Practices
          1. Use only external Javascript and try to combine all together.
          2. Load from the external domains for popular libraries.
          3. Remove unused JS.
          4. Minify all JS
          5. Remove conflicts
          6. Use of “defer” and “async” wherever possible
          7. Remove all JS error
    • Minimize HTTP Requests
      1. Use Of Sprite
      2. Combine CSS & JS
      3. Removal of redirects
      4. Removal of other Domains
    • Enable compression
    • Enable leverage browser caching
  2. Off Page
    • Use of CDN server
      1. Maxcdn
      2. Cloudflare
      3. Microsoft Azure CDN
      4. Amazon Cloudfront
      5. BootstrapCDN
      6. CDNetworks
    • Use of Cache
      • Use of caching in PHP Opcache
      • DB caching
    • Use of proper hosting server

To know in detail please go through the part – 2 which consist detailed information on each point.

Block directory browsing in PHP

It is very important part for any web application. At one side, when we are taking care a lot to prevent our code to be copied, why we forget to implement Directory Browsing. At least you can save your client side scripts and images. By implementing this mechanism your application will deny to display js, jquery, stylesheet, image directories or even any directory of application.

Best thing about this mechanism is it’s implementation, it is very easy. Just one line of code, need to be changed or written. It is worth to write.

As much as I know, there are 2 ways you can implement this.

  1. Update apache server configuration file i.e. httpd.conf
  2. Update application’s .htaccess file

Update httpd.conf file:


[sourcecode language=”plain”]Options Indexes FollowSymLinks[/sourcecode]


[sourcecode language=”plain”]Options FollowSymLinks[/sourcecode]

Update .htaccess file:

Add below line:

[sourcecode language=”plain”]Options -Indexes[/sourcecode]

That’s all, You are done :)

Transfer Blog from google to wordpress

Ohh, Welcome to my blog. Are you looking for the stuff which helps you to transfer your Google Blogspot posts to your own WP Blog Site? You are on right page.
I have recently completed this for our company blog site. Here, I am sharing my experience with you.
I have referred lots of stuff over internet. Eventually find one very good blog and done up with my task.

Follow below steps to import blog and to set redirection code:

A. Import Blog from Google

  1. Get one suitable domain name for your blog. If you have already domain name for your business, you can setup sub domain. E.g.
    Company Domain – http://www.trimantra.com
    Blog Domain – http://blog.trimantra.com
  2. Setup wordpress for this domain.
    To download – https://wordpress.org/download/
    To install – http://codex.wordpress.org/Installing_WordPress
  3. It’s time to import your blog post from Google Blogspot
    • Go to “Tools” -> “Import”
    • Click on “Blogger”
    • Click on “Install Now”, you will get below screen
    • Activate Plugin & Run Importer
    • Now you will be asked for authorization of blogger gmail account, login into gmail
    • Allow Access
    • Click on Import
    • Import
    • Let importer complete import. If you can’t see progress. Click again on “importing…” & “Continue..”.
      1. You will get “Set Authors” in place of “Import” button when you get done with import. Click on that button.
      2. Choose author you want to set for all blog post from available users. Admin user will be there selected by default.
      3. Click “Save Changes” Button and now you have done importing
        Set Authors
    • Once you done with this start setup of “301 Redirection”.

B. Setup 301 Redirection

Now, it is time to setup 301-redirection for new blog. 301 redirection which means a lot for any website transfer. You can read about 301-redirection here https://support.google.com/webmasters/answer/93633?hl=en

Generate Redirection Code,

  1. Install plugin Blogger To WordPress, For help on how to install plugins to your WordPress blog, check out our guide on How to manage plugins in WordPress.
  2. Installation and activation of plugin will create menu “Blogger to wordpress redirection”, Click on it. You can see menu in below screenshot.
  3. Click on “Set Configuration”
  4. Click on “Get Code”
  5. You will get “Generated Code”, copy it

Copy Code to Blogger.com Template,

  1. Go to your blogger dashboard
  2. Click on template and Edit HTML
    Edit HTML
  3. Paste code in place of template code and save template

C. Verify Redirection Code Setup

  1. Go back to WP “Get Code” screen and click on “Verify Configuration” button to verify if redirection Is working or not.

You are done. Any of your blogger link redirect user to your wordpress blog.
Have a happy blogging.

Blog Transfer Reference:
Article: https://rtcamp.com/blogger-to-wordpress/tutorials/blogger-to-wordpress-redirection-plugin/
Plugin: http://wordpress.org/plugins/blogger-to-wordpress-redirection/