Browse Source

Outputs Client IP in JSON

getIP({"ip":"8.8.8.8"});
ke-mccormick 9 years ago
parent
commit
018992cd27
1 changed files with 4 additions and 0 deletions
  1. 4 0
      getIP.php

+ 4 - 0
getIP.php

@@ -0,0 +1,4 @@
+<?php
+$ip = $_SERVER['REMOTE_ADDR'];
+echo "getIP({\"ip\":\"$ip\"});";
+?>