curl / Mailing Lists / curl-library / Single Mail


Using A Different Socket For Requests

From: Isaiah Banks via curl-library <>
Date: Wed, 22 Aug 2018 07:00:15 -0400


I'm sure this question has been asked before, but in doing some online
research I have not found a good answer. What I'd like to do is create a
custom socket for all curl requests to go through within a web application.

I'm creating this socket within Python application but would like an app
written in PHP to send request through it. I've tried creating it, binding
it to a port, and then passing the port number to the cURL request using
CURLOPT_LOCALPORT, but it didn't seem to work. Is this the only way to do
it and still be able to monitor data packets? Or is there another
recommended way?

Thanks in advance!

Received on 2018-08-22