0

I have never delt with proxies but now I have to. The program is a PHP parser that scraps several websites to retrieve need info. I just need to know how PHP programs work via proxies... how to make them work via proxies.

Thanks for any help!

3
  • These questions should be naturally banned from SO Commented Aug 15, 2010 at 9:29
  • These questions are technically alright ;) Commented Aug 15, 2010 at 14:20
  • Then you might want to search proxyfire.net for fresh proxies. Commented Aug 18, 2010 at 2:53

2 Answers 2

2

You can use curl with CURLOPT_PROXY Option.

http://www.php.net/manual/en/function.curl-setopt.php

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

Comments

1

http://php.net/stream_context_create

For example:

<?php
    $opts = array ( 'http' => array ( 'proxy' => 'tcp://proxy:8080', 'request_fulluri' => true ) ) ;
    $context = stream_context_create ( $opts ) ;
    $f = file_get_contents ( 'http://yoururl/', false, $context ) ;

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.