Quick Job: -Write a PHP code snippet to to get Visitor's IP Address || Golang Experience will help
$10-30 USD
Cerrado
Publicado hace más de 3 años
$10-30 USD
Pagado a la entrega
If you are an experienced PHP developer and have a good understanding of HTTP/Proxy, please continue.
We are trying to get the IP address from the visitors if they are using SOCKS5.
Say if the user is using a proxy from Japan (say 1.1.1.1), our PHP scripts need to get that example Proxy IP address (1.1.1.1).
But in PHP, $_SERVER[‘REMOTE_ADDR’] doesn’t return the correct value, also, that example IP (1.1.1.1) is not in the X-FORWARD-FOR, or CLIENT-IP headers.
Interesting enough, using the 3rd party service such as [login to view URL] will return the correct value.
A open source Go Implementation will get the correct value too. [login to view URL]
So we need a code snippet which has same logic of [login to view URL] to get the visitor’s IP address.
This is a pretty simple problem to solve and I can provide a code snippet in PHP to show you how the above project is getting this IP. Note, that this shouldn't be used for any kind of security, these headers can easily be spoofed by the client.