hi...i want to make a php script that makes connection to another site...i want the php to have an option to be able to use proxy server so that vistior can access the site using the proxy server that either they specify or given by me.. now i don't want my php to be a proxy server itselft but uses other proxy servers...how do i do this? any functions availabe? i searched the net but only found out about making your own proxy server..this is not what i want to do..
thanks

    Found this on a [French] forum... you need curl...

    <?php
    $adresse='http://www.orange';
    $proxy='192.168.1.1:3128';
    
    $cUrl = curl_init();
    curl_setopt($cUrl, CURLOPT_URL, $adresse);
    curl_setopt($cUrl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($cUrl, CURLOPT_TIMEOUT, '30');
    curl_setopt($cUrl, CURLOPT_PROXY, $proxy);
    $pageContent = trim(curl_exec($cUrl));
    curl_close($cUrl);
    
    echo $pageContent;
    ?>
    

      thanks mate....i will try it...if anyone else has any ideas or other methods please post it...

        Write a Reply...