This snippet helps you to detect TOR network connection in PHP
Credits : Johan Adriaans
<?php function Check() { $reverse_client_ip = implode('.', array_reverse(explode('.', $_SERVER['REMOTE_ADDR']))); $reverse_server_ip = implode('.', array_reverse(explode('.', $_SERVER['SERVER_ADDR']))); $hostname = $reverse_client_ip . "." . $_SERVER['SERVER_PORT'] . "." . $reverse_server_ip . ".ip-port.exitlist.torproject.org"; return gethostbyname($hostname) == "127.0.0.2"; } echo Check() ? "Yep" : "Nope"; ?>
Credits : Johan Adriaans
4 comments
not work
ReplyPHP
ReplyAN INTRODUCTION TO PHP
The Origins of PHP
What Makes PHP Better than Its Alternatives
Interfaces to External Systems
How PHP Works with the Web Server
Hardware and Software Requirements
Installation on Apache for UNIX
Installation on IIS for Windows NT
Editing Scripts
Algorithms
What a PHP Script Looks Like
Saving Data for Later
Receiving User Input
Choosing between Alternatives
Repeating Code
VARIABLES, OPERATORS, AND EXPRESSIONS
Identifiers
Data Types
Variable Creation and Scope
PHP Training in Chennai | PHP Training | PHP Training Institutes in Chennai | PHP Online Training | PHP Online Training India
Replyhttp://discuss.forumias.com/test-browser/ not working
ReplyPost a Comment
Note: Only a member of this blog may post a comment.