Ok i'm pretty comfortable with PHP but this is getting the better of me.
Aim: to create a web page that allows end-user to append a domain url (eg: example.com) to a dansguardian blocklist
I have a perl script that does it, and can suss how to pass data from a textbox in PHP, and know to useto open a file to append data to the end of it.Code:fopen("FILENAME", "a+")
However this isn't happening nor do i know the correct coding structure to achieve this..
Code:$myFile = "testFile.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); $stringData = "New Stuff 1\n"; fwrite($fh, $stringData); $stringData = "New Stuff 2\n"; fwrite($fh, $stringData); fclose($fh);
There are currently 1 users browsing this thread. (0 members and 1 guests)