Thursday, 2 November 2017

How to check your server IP address

If you try to use API for domain registration and payment gateway integration then you need your server IP address. If don't know your right server IP . Just create a page on your server and paste this code then open page you will see your right server IP address.




$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,'');

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$contents = curl_exec ($ch);

curl_close ($ch);

echo "Your Server's IP : ".$contents;




Friday, 7 July 2017

Redirect a web page to another web page

Here two method of redirection of web page

First method :

simple copy and paste this code :

<meta http-equiv="refresh" content="10; url=" /> 

in your web page. change with your target web page url. where you want redirect to page. content="10" here 10 is 10 sec you can change time as per your need.

Second method : jave script

simple copy and paste this code :

<p>You will be redirected home page in <span id="counter">10</span> second(s). If You not redirected <a href="">Click here for home page</a></a></p>
<script type="text/javascript">
function countdown() {
    var i = document.getElementById('counter');
    if (parseInt(i.innerHTML)<=0) {
        location.href = '';
    i.innerHTML = parseInt(i.innerHTML)-1;
setInterval(function(){ countdown(); },1000);


Wednesday, 8 March 2017

Automatic Images Slideshow

<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1">

.mySlides {display:none;}

<h2 class="w3-center">Automatic Slideshow</h2>

<div class="w3-content w3-section" style="max-width:500px">
  <img class="mySlides" src="image1.jpg" style="width:100%">
  <img class="mySlides" src="image2.jpg" style="width:100%">
  <img class="mySlides" src="image3.jpg" style="width:100%">

var myIndex = 0;

function carousel() {
    var i;
    var x = document.getElementsByClassName("mySlides");
    for (i = 0; i < x.length; i++) {
       x[i].style.display = "none";
    if (myIndex > x.length) {myIndex = 1}  
    x[myIndex-1].style.display = "block";
    setTimeout(carousel, 2000); // Change image every 2 seconds