Jump to content

Recommended Posts

Hi everybody,

 

As an entrepreneur who started his own web business a couple of months ago I find myself having to write some basic PHP stuff which is giving me a bit of a tough time as I come from desktop programming. Therefore, I believe that most of my questions will be very easy for you to answer.

 

I've created a script now which I have successfully set up as a scheduled task on my own machine to be executed every couple of hours. However, I would like to execute this script through a proxy server. I know how to browse using a proxy server but I assume that setting up Firefox to use a proxy will not make the automated script execution of php go through the same proxy.

 

Therefore, my question is how do I change the script to connect to an external proxy server and then execute through that. Or do I have to configure my local apache server to connect to some proxy and that is it? Do you know of any good free proxies by any chance?

 

Thank you very much in advance!

 

All the best,

Jonas

Use CURL as you can set a proxy address i.e.

curl_setopt($ch, CURLOPT_PROXY, "ip:portnumber");
// if authenticaton is required
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "username:password");

 

http://uk.php.net/curl

 

As far as free proxies just search Google, you will find loads. However they are not always reliable and get abused. Better paying for private addresses.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.