How to throw an HTTP request through a Proxy in PHP
I'm Nishimura from Development Department, and I'd like to summarize the result of my research on the requirement of throwing a request through Proxy server in PHP.
code
With the following code, you can get "https://www.ugtop.com/spill.shtml" through the proxy server located at "tcp://123.123.123.123:8080". That's easy!
memo
The default timeout for file_get_contents is 60 seconds, so be careful to specify an appropriate time depending on your requirements. If you expect it to take a long time to respond, you should set it longer, and if you are using it for life and death check, you should set it shorter.
- Explanation of how to create your own e-learning materials and points to consider when creating them
- Hash function, stretching salt
Comment ( 0 )
Trackbacks are closed.
No comments yet.