Redirect a php page to multiple random links in php

create go.php <?php $urls = array(‘/wordpress-hosting’,”vps-hosting”,”magento-hosting”); //specify array of possible URLs $rand = rand(0,count($urls)-1); //get random number between 0 and array length $location = $urls[$rand]; //get random item from array header (‘Location: ‘.$location); ?>   <?php $addresses = [ ‘http://www.google.com’, ‘http://www.facebook.com’, ‘http://www.youtube.com’ ]; $size = count($addresses); $randomIndex = rand(0, $size – 1); $randomUrl = $addresses[$randomIndex]; …

Redirect a php page to multiple random links in php Read More »

Install Varnish on Plesk server

Step 1. Change Apache/nginx port from 80 to any other ports from plesk’s configuration, here we are changing it to 8080. Step 2. For changing the port use the following command, mysql -uadmin -p$(cat /etc/psa/.psa.shadow) -D psa -e’replace into misc (param, val) values (“http_port”, 8080);’ /usr/local/psa/admin/bin/httpdmng –reconfigure-all Now the port is changed to 8080. Step …

Install Varnish on Plesk server Read More »

A Simple YouTube Video Downloader Script in PHP

YouTube is the most popular video sharing platform in the world. It helps users to upload, view, and share videos that keeps  community guidelines. Tons of people selected YouTube video making as full job, as they create and upload videos and getting revenue from YouTube Adsense( Google Adsense). But, YouTube lacks one important feature, direct download …

A Simple YouTube Video Downloader Script in PHP Read More »

How to create an HTML button that acts like a link?

HTML The plain HTML way is to put it in a <form> wherein you specify the desired target URL in the action attribute. If necessary, set CSS display: inline; on the form to keep it in the flow with the surrounding text. Instead of <input type=”submit”> in above example, you can also use <button type=”submit”>. The only difference is that the <button> element allows children. You’d …

How to create an HTML button that acts like a link? Read More »

convert .htaccess rewrite rules for nginx

Converting rewrite rules People who during their shared hosting life used to configure everything using only Apache’s .htaccess files, usually translate the following rules: RewriteCond %{HTTP_HOST} example.org RewriteRule (.*) http://www.example.org$1 to something like this: server { listen 80; server_name www.example.org example.org; if ($http_host = example.org) { rewrite (.*) http://www.example.org$1; } … } This is a wrong, cumbersome, and ineffective …

convert .htaccess rewrite rules for nginx Read More »

Open chat