REMOTE_PORT socket issue :)

i again have an interesting issue :slight_smile:

i am trying to fetch a webpage with curl.
if i do this from my pc (i have wamp server installed on my pc) i get REMOTE_PORT value something around 2000 to 4000.
But when i fetch the same webpage from my server, i get REMOTE_PORT something between 40000 to 50000
how can i change my servers REMOTE_PORT from 40000 to 2000?

i tried to use fsockopen, but it uses the same socket numbers with curl, so nothing changed :slight_smile:

(REMOTE_PORT value can be examined by $_SERVER array.)

seems like there are two different settings in local and in server
i think Curl uses the same port as remote
there is ope parameter for port in curl

–local-port <num>[-num]

Set a preferred number or range of local port numbers to use for the connection(s). Note that port numbers by nature are a scarce resource that will be busy at times so setting this range to something too narrow might cause unnecessary connection setup failures. (Added in 7.15.2)

have you tested it