• Hello,
    I want to make a mirror of a website using wordpress. Withour wordpress I just use

    $homepage = file_get_contents(‘www.domain.com’.$_SERVER[‘REQUEST_URI’]);
    echo $hompage;

    and I have a fully working mirror.

    On wordpress I use:

    $url = ‘http://www.domain.com’;
    $request = new WP_Http;
    $result = $request->request( $url );
    $json = $result[‘body’];
    echo $json;

    I can take a new domain and make the mirror availalbe under it

    which works fine. But:

    after file_get_contens I am able to use newdomain.com/subpage to go to a subpage. In WP that does not work.

    Has anyone help? I hope I mde my problem clrar :/

    Thanks!

The topic ‘copy page with HTTP request’ is closed to new replies.