Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function IsTorExitPoint(){
- if (gethostbyname(ReverseIPOctets($_SERVER['REMOTE_ADDR']).".".$_SERVER['SERVER_PORT'].".".ReverseIPOctets($_SERVER['SERVER_ADDR']).".ip-port.exitlist.torproject.org")=="127.0.0.2") {
- return true;
- } else {
- return false;
- }
- }
- function ReverseIPOctets($inputip){
- $ipoc = explode(".",$inputip);
- return $ipoc[3].".".$ipoc[2].".".$ipoc[1].".".$ipoc[0];
- }
- if (IsTorExitPoint()) {
- echo 'You are using TOR!</br>';
- }else{
- echo 'You are NOT using TOR!</br>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment