//logit start
if(isset($_SERVER["HTTP_CF_CONNECTING_IP"])){
//If it does, assume that PHP app is behind Cloudflare.
$quip = $_SERVER["HTTP_CF_CONNECTING_IP"];
} else{
//Otherwise, use REMOTE_ADDR.
$quip = $_SERVER['REMOTE_ADDR'];
}
$file = './log/searchlog.txt';
//echo $file;
$content = date("Y-m-d H:i:s").' '.$quip.' '.$urladdress.'\n';
file_put_contents($file, $content, FILE_APPEND| LOCK_EX);
chmod($file, 0600);
//logitstop
Never mind just needed to
Use winscp set dir (log) to rwx for user apache [48] group apache [48]
if(isset($_SERVER["HTTP_CF_CONNECTING_IP"])){
//If it does, assume that PHP app is behind Cloudflare.
$quip = $_SERVER["HTTP_CF_CONNECTING_IP"];
} else{
//Otherwise, use REMOTE_ADDR.
$quip = $_SERVER['REMOTE_ADDR'];
}
$file = './log/searchlog.txt';
//echo $file;
$content = date("Y-m-d H:i:s").' '.$quip.' '.$urladdress.'\n';
file_put_contents($file, $content, FILE_APPEND| LOCK_EX);
chmod($file, 0600);
//logitstop
Never mind just needed to
Use winscp set dir (log) to rwx for user apache [48] group apache [48]
In PHP Engines
Share this post:
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »