Skip to content

Instantly share code, notes, and snippets.

@ShiponKarmakar
Created September 22, 2021 10:36
Show Gist options
  • Save ShiponKarmakar/766114e04863bde962c81578254dd0d6 to your computer and use it in GitHub Desktop.
Save ShiponKarmakar/766114e04863bde962c81578254dd0d6 to your computer and use it in GitHub Desktop.
login to your hosting package and go to the file manager and in the public_html create a file ipcheck.php and add the following code
<html>
<body>
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://api.ipify.org/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$contents = curl_exec ($ch);
curl_close ($ch);
echo "Your Server's outbound IP : ".$contents;
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment