HTTP POST request through PROXY php

335

I want send data via Http Post through proxy using CURL on PHP I had try to do it but without result !! Please any help !

831

Answer

Solution:

Use cURL normally, but before you do use this function to set your proxy configuration:

curl_setopt — Set an option for a cURL transfer

bool curl_setopt ( resource $ch , int $option , mixed $value )

Use the following options to control the proxy for your curl commands:

CURLOPT_HTTPPROXYTUNNEL - TRUE to tunnel through a given HTTP proxy.

CURLOPT_PROXY - The HTTP proxy to tunnel requests through.

There are also various otherCURLOPT_* that lets you do things like set up authentication for your proxy, specify different ports etc...

People are also looking for solutions to the problem: Problem escaping php variable

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.