Re: curl equivalent in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 2, 2012 at 11:29, Nibin V M <nibinvm@xxxxxxxxx> wrote:
> Thanks guys :)
>
> Now another problem...I use a test domain ( say blahblah.com ) for testing
> this, which isn't registered yet. So with the given code the index page is
> loading fine. But when I try to click on any links, it will redirect to the
> original domain which isn't exists!

<?php
echo str_replace('blahblah.com','localhost',file_get_contents('remote-domain.example.com'));
?>

    Modify it as needed, and if you want to surf the site using the
script as a proxy, add the logic to handle that.

-- 
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux