Am acest cod :
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$website = 'http://xnxx1.co';
$actual_link = $_SERVER['REQUEST_URI'];
echo $actual_link;
function curl($url){
$headers[] = "User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13";
$headers[] = "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
$headers[] = "Accept-Language:en-us,en;q=0.5";
$headers[] = "Accept-Encoding:gzip,deflate";
$headers[] = "Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.7";
$headers[] = "Keep-Alive:115";
$headers[] = "Connection:keep-alive";
$headers[] = "Cache-Control:max-age=0";
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_ENCODING, "gzip");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
$data = curl_exec($curl);
curl_close($curl);
return $data;
}
//grabber//
$continut = curl('https://projectfreetv.today'.$actual_link.'');
//replace//
$continut = str_replace('<link rel="stylesheet" href="/css/group_1/theme_8/style.min.css?v=0.8">', '<link rel="stylesheet" href="/css/green.css?v=0.8">', $continut);
$continut = str_replace('<script type="text/javascript" src="/js/group_1/app.min.js?v=1.1"></script>', '<script type="text/javascript" src="/js/app.min.js?v=1.1"></script>', $continut);
$continut = str_replace('<link rel="shortcut icon" href="/images/group_1/theme_8/favicon.png" type="image/x-icon"/>', '<link rel="shortcut icon" href="/images/favicon.png" type="image/x-icon"/></script>', $continut);
$continut = str_replace('/images/group_1/theme_8/logo.png', '/images/logo.png', $continut);
$continut = str_replace('https://projectfreetv.today/', $website, $continut);
//afiseaza continut//
echo $continut;
?>
Pe localhost merge perfect, insa cand l-am urcat pe host, prima pagina merge insa cand dai click pe linkuri nu merge, imi da 404 not found. Cum as putea rezolva problema aceasta ? prin .htaccess ?