Thanks guys :)

Now another problem...I use a test domain ( say ) 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!

( I have actually pointed the test domain to my server via hosts file on
the server )

So I wanted to browse the website via a PHP script, same as if I use a
browser on the server.

Hope you get me! :)

Is there any way to achieve this via PHP?

What I wanted to

On Fri, Mar 2, 2012 at 9:37 PM, Jim Lucas <> wrote:

> On 03/02/2012 06:26 AM, Nibin V M wrote:
>> Hello,
>> I am trying to display the website content through a php code ( my own
>> websites; doesn't cause copy right issues ).
>> I use curl to display the page via the following simple code.
>> <?php
>> $curl = curl_init();
>> curl_setopt ($curl, CURLOPT_URL, "";);
>> curl_exec ($curl);
>> curl_close ($curl);
>> ?>
>> But on some of my servers, curl isn't enabled! Is there any equivalent
>> code
>> to  achieve the same?
>> Thank you,
> As long as you do not need to perform posts to the other website via the
> PHP request, you could include, file_get_contents, fopen + fread, etc...
> All you need to make sure is that allow_url_fopen is enabled.
> --
> Jim Lucas



Reply via email to