i am very new to java i have found a piece off code

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin

// The referrer info is only printed out when you
// follow a link to the page with this script on it!

if (document.referrer) {
document.write("Thanks for visiting us from ");
document.write(document.referrer);
}
// End -->
</SCRIPT>

And would like to know how to change it so it writes the message down on a txt file and saves that on my ftp, i do not want the message appering

Member Avatar for rajarajan2017

you can use php to write the file:

<?php 

// set file to write
$file = '..\library/para.txt'; 
// open file 
$fh = fopen($file, 'w') or die('Could not open file!'); 
// write to file 
fwrite($fh, "Look, Ma, I wrote a file! ") or die('Could not write to file'); 
// close file 
fclose($fh); 
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.