Re: curl equivalent in PHP
| From: | Daniel Brown | Date: | Fri, 02 Mar 2012 16:40:26 +0000 |
| Subject: | Re: curl equivalent in PHP | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316846@lists.php.net to get a copy of this message | ||
On Fri, Mar 2, 2012 at 11:29, Nibin V M <nibinvm@gmail.com> 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/