Skip to content

sl0ki/site-mirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Site mirror

Make mirror of any site on your domain

How to use

add .htaccess

include("Proxy.php");

$proxy = new Proxy();

$proxy->render('http://stackoverflow.com/' . $_GET['url']);

Modify request or response

$proxy->setRequestHook(function(&$header, &$body) {
    // Modify some header or body before send request
    array_push($header, ['Origin' => $_SERVER["HTTP_HOST"]]);
    array_push($header, ['X-Requested-With' => 'XMLHttpRequest']);
});

$proxy->setResponseHook(function(&$header, &$body) {
    // Modify some header or body before render
});

About

Make mirror of any site

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors