Thursday, 18 May 2017

.htaccess multiple redirect in domain & Redirect multiple domains to one domain (with or without www before)

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain1.com
RewriteCond %{HTTP_HOST} ^mydomain2.com
RewriteCond %{HTTP_HOST} ^mydomain3.com
RewriteCond %{HTTP_HOST} ^mydomain4.com
RewriteCond %{HTTP_HOST} ^mydomain5.com

RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=permanent,L]

This will redirect all your 18 domains to your to your new single domain www.newdomain.com Otherwise you can use following code to redirect each domain if they are on separate hosting

RewriteCond %{HTTP_HOST} ^mydomain.com
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=permanent,L]







.htaccess multiple redirect in domain & Redirect multiple domains to one domain (with or without www before)

Monday, 15 May 2017

Godaddy cron job setup for running php script in linux server




log into your GoDaddy account

click to expand the "Web Hosting" section and find the server in question

click the "Manage" button (it used to be labeled "Launch")

on the "Hosting Details" page in "Tools" section, click "Cron Job Manager" button

on the "Cron Job Manager" page, click "Create Cron Job" button

enter the title you want and select the frequency (1 hour is the most frequent allowed EDIT: GoDaddy has added 15-minute increments to the frequency choices.)

enter the command below (with your info):

wget http://YOUR_DOMAIN/YOUR_PATH/YOUR_PHP_FILE.php > /dev/null 2>&1

in "YOUR_PHP_FILE.php" code all the actions you want to be performed and include a call to mail() (or whichever mail method you may want to use assuming you have configured that properly).

By using mail() the SMTP relay server will already be set properly in the "php.ini" file to: relay-hosting.secureserver.net -- which you can confirm using phpinfo().


Monday, 8 May 2017

css3 HTML button Flash blinking




HTML


<a class="button" href="#">Click me!</a>


CSS

body {
  background: black;
}
.button {
  background-color: #004A7F;
  -webkit-border-radius: 10px;
  border-radius: 10px;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  display: inline-block;
  font-family: Arial;
  font-size: 20px;
  padding: 5px 10px;
  text-align: center;
  text-decoration: none;
}
@-webkit-keyframes glowing {
  0% { background-color: #B20000; -webkit-box-shadow: 0 0 3px #B20000; }
  50% { background-color: #FF0000; -webkit-box-shadow: 0 0 40px #FF0000; }
  100% { background-color: #B20000; -webkit-box-shadow: 0 0 3px #B20000; }
}

@-moz-keyframes glowing {
  0% { background-color: #B20000; -moz-box-shadow: 0 0 3px #B20000; }
  50% { background-color: #FF0000; -moz-box-shadow: 0 0 40px #FF0000; }
  100% { background-color: #B20000; -moz-box-shadow: 0 0 3px #B20000; }
}

@-o-keyframes glowing {
  0% { background-color: #B20000; box-shadow: 0 0 3px #B20000; }
  50% { background-color: #FF0000; box-shadow: 0 0 40px #FF0000; }
  100% { background-color: #B20000; box-shadow: 0 0 3px #B20000; }
}

@keyframes glowing {
  0% { background-color: #B20000; box-shadow: 0 0 3px #B20000; }
  50% { background-color: #FF0000; box-shadow: 0 0 40px #FF0000; }
  100% { background-color: #B20000; box-shadow: 0 0 3px #B20000; }
}

.button {
  -webkit-animation: glowing 1500ms infinite;
  -moz-animation: glowing 1500ms infinite;
  -o-animation: glowing 1500ms infinite;
  animation: glowing 1500ms infinite;
}

Tuesday, 2 May 2017

how to decrypt md5 password in php




<?php 

$input = "Hemant Vishwakarma";

$encrypted = encryptIt( $input );
$decrypted = decryptIt( $encrypted );

echo $encrypted . '<br />' . $decrypted;

function encryptIt( $q ) {
    $cryptKey  = 'qJB0rGtIn5UB1xG03efyCp';
    $qEncoded      = base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), $q, MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ) );
    return( $qEncoded );
}

function decryptIt( $q ) {
    $cryptKey  = 'qJB0rGtIn5UB1xG03efyCp';
    $qDecoded  = rtrim( mcrypt_decrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), base64_decode( $q ), MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ), "\0");
    return( $qDecoded );
}
?>