0

I am trying to write a program in PHP which I had already written in Java. I had used the following statements to setup proxy in Java

System.setProperty("http.proxyHost",proxyhost);
System.setProperty("http.proxyPort",proxyport);

How do I do the same for PHP?

1 Answer 1

3

I think you may need to use the cURL extension to carry out the transfer and pass the relevant proxy options to cURL.

cURL Extension

curl_setopt function to pass options to a cURL session

The proxy options you need are: CURL_PROXY and CURL_PROXYPORT.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.