KRUNAL DOSHI
KRUNAL DOSHI

Reputation: 81

$_SERVER['REMOTE_PORT'] not giving real port when i am using proxy

I am connected with wifi router and i setup proxy connection in firefox for checking REMOTE_PORT Giving which port

echo $_SERVER['REMOTE_PORT'];

I am using this for getting port of proxy which i am using.But its giving Random port. I am using ip : 123.134.167.208 Port : 6675 And above code returning 53603 Port which is not true.

Upvotes: 1

Views: 1504

Answers (1)

HamZa
HamZa

Reputation: 14921

That's because the proxy you're using is forwarding the data to another port, so that it would not use the same port for in/outbound connections

Computer(firefox) <--> proxy on port 6657 <-portforwarding-> proxy on random port 53603 <--> your server with PHP CODE

Upvotes: 1

Related Questions