Crossdomain file edit

Posted by Misiur on Stack Overflow See other posts from Stack Overflow or by Misiur
Published on 2010-04-24T10:30:06Z Indexed on 2010/04/24 10:33 UTC
Read the original article Hit count: 395

Filed under:
|
|
|

Hi there.

I need to know, where from is my script used (it's for sale, and i don't want any thiefs). I want to write on my server in file, IP of user, domain where from script has been runned, date, etc. I've tried fopen, fwrite, but is_file_writable returned that it isn't. File CHmods are 777, it parent catalog has too 777 chmods.

Now i'm trying something like that:

<?php
$file = 'http://www.misiur.com/security/seal.txt';

$data = date("Y-m-d H:i:s");
$ip = $_SERVER['REMOTE_ADDR'];
$svr = $_SERVER['SERVER_NAME'];
$str = "[$data] Loaded by $ip at $svr\r\n";

$current = file_get_contents($file);
$current .= $str;
file_put_contents($file, $current);
?>

However - nothing happens. What i've got to do?

© Stack Overflow or respective owner

Related posts about php

Related posts about file