I plan to make this script in PHP.. I have a .ini file with some settings in it.
This could be amongst other lines, something that look like this:
This is a default file named server.ini, so I know in advance whats in there. So.. I plan to let the user on one page, use a form and fill in these, then when done, click Submit button.. and the PHP changed lets say.. mod.pkg to mod3.pkg and time from 60 to 120.
and let the users then download the modified server.ini.
Is this possible in PHP?
Could I use str_replace to replace the strings that the user requested?
# Assume $file is the contents of the file
$new_mod_name and $new_time should come out of the post data, $_POST['mod_name'] or whatever you named the fields, but I'm hoping you do some error checking on this data and assign it to a new variable.