How to encrypt password with PHP

We will see how to encrypt information in PHP in order to store and exchange it safely. But first, we’ll do a little reminder on symmetric cryptography. Encryption is an operation which is to alter the information to make it unreadable, but reversibly only to a specific person, who is able to decrypt that information by … Read more

Search favicons from any website using PHP

Search favicons from any website using PHP and download favicons file to your server. If you request a website URL to download favicons file like Write favicon.php file below code. <?php $userPath=$_GET[‘url’]; // you can use GET or POST method. require ‘FaviconDownloader.class.php’; $favicon = new FaviconDownloader($userPath); if($favicon->icoExists){ echo “Favicon found : “.$favicon->icoUrl.”\n”; // Saving … Read more

Leverage browser caching for .htaccess

How to do Leverage browser caching for .htaccess. Below code will tells browsers what to cache and how long to “remember” it a browser.  Top of your .htaccess file place below code. Leveraging browser caching can significantly improve the speed and performance of your website. Here’s how you can set up browser caching for your website’s .htaccess … Read more

How to Write Robots.txt for Your Website?

To exclude all robots from the entire server User-agent: * Disallow: / To allow all robots complete access User-agent: * Disallow: (or just create an empty “/robots.txt” file, or don’t use one at all) To exclude all robots from part of the server User-agent: * Disallow: /cgi-bin/ Disallow: /tmp/ Disallow: /junk/ To exclude a single … Read more

How to display links in a WordPress excerpt?

Allowing link in a excerpt very common issue for WordPress users. You can display excerpt link by adding this script to your theme “functions.php” file. remove_filter( ‘the_excerpt’, ‘wp_trim_excerpt’ ); function new_trim_excerpt($text) { global $post; if ( ” == $text ) { $text = get_the_content(”); $text = apply_filters(‘the_content’, $text); $text = str_replace(‘\]\]\>’, ‘]]>’, $text); $text = preg_replace(‘@<script[^>]*?>.*?</script>@si’, ”, $text); … Read more

How to remove index.php From Website URL?

Remove index.php from any Website URL to keep away from Google duplicate content penalty. It will increase your website home page visibility in all major search engine. RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]  

Unveiling the Secrets of AdSense Bad Content Filtering: Tips for Publishers

Transform your contention a visual masterpiec

Introduction Google AdSense, a renowned advertising platform, provides website publishers with an opportunity to monetize their content through targeted ads. However, to maintain the quality and integrity of their ad network, Google employs stringent content filtering mechanisms to ensure that ads appear on web pages that meet specific quality standards. In this article, we’ll delve … Read more

Redirect Non WWW to WWW Using .htaccess

Redirect non www to www using your domain name RewriteCond %{HTTP_HOST} ^$ RewriteRule (.*)$1 [R=301,L] Or use this for any domain: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] If you have ssl enabled then add this two line for http to https redirect RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Speed up WordPress CMS Menu Loading

Overview We can customize the WordPress navigation menus with writing few lines of codes. wp_nav_menu is the WordPress menu function to display custom menus created in>Appearance>Menus panel . It is a must use function but it’s not perfect for all website or projects. Default menu function OK for small websites but if your site is large and have more … Read more