PHP 7 Script to Get Server IP Address and Display It in Browser Using Javascript

PHP 7 Script to Get Server IP Address and Display it in Browser Using Javascript

<?php
 
// PHP program to obtain IP address of
// the server
 
// Creating a variable to store the
// server address
$ip_server = $_SERVER['SERVER_ADDR'];
 
// Printing the stored address
echo "Server IP Address is: $ip_server";
 
?>

Share on:

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Comment