Page 1 of 1

hello i need a simple code to save url into file.txt

Posted: Sat Sep 01, 2012 1:24 pm
by tadmeer
helloi need to log referrer for visitors the links like: http://localhost/hello.php?session=aGVs ... bHBvaW50==


i want to log the url and the (decodded) base64 code: aGVsbG8gZGlnaXRhbHBvaW50== to file.txt or something


so the file.txt will have:


url: http://localhost/hello.php?session=aGVs ... bHBvaW50==
session: aGVsbG8gZGlnaXRhbHBvaW50==
decodded_session: hello digitalpoint


thanks for help me

Re: hello i need a simple code to save url into file.txt

Posted: Sat Sep 01, 2012 10:34 pm
by Christopher
The simplest function to write to a file is file_put_contents(). If you want to append to a file, use the FILE_APPEND flag. See the manual: http://us.php.net/manual/en/function.fi ... ntents.php