One thing I thought about today regarding the newly broken out config.txt file. If you leave the file in the same directory as the sticker.php script your configuration will be viewable to anyone who wants to look at it on your site. The only thing in the config.txt that might be of concern to folks is the path to your data file. If you are using an absolute path you are advertising your directory structure to the world. I don't really see this as a big issue since the structure on most servers is fairly standard and easily guessed at anyway. And a lot of servers will present the full path in script error messages as well.
Regardless, if you are uncomfortable having your config.txt file available for viewing you can solve that problem by moving it outside of your document root. Here's how to do that:
Depending upon how your server is set up, your document root will usually be something like: /home/username/public_html or /home/username/httpdocs
If you are unsure of what your document root is you should contact your hosting servicej or ISP to find out.
1) Uplooad the config.txt file to a directory that is outside of the document root. For example, if your document root is
/home/username/public_html
put the config.txt file anywhere but the public_html directory _or_ any of it's subdirectories. You might create a subdirectory like /home/username/scripts and upload the config.txt to that location as an example.
NOTE: Nearly all hosting companies will allow you to create directories in your user directory outside of your document root but there is no guarantee that this will be the case with yours. Likewise if you use your ISP provided web pages it's likely that you will _not_ be able to create such directory. If you aren't sure contact your hosting service/ISP.
2) change the line in the sticker.php file that reads:
require "./config.txt";
so that it points to the new location for config.txt. If you uploaded your config.txt to /home/username/scripts you would set it to:
require "/home/username/scripts/config.txt";
3) upload the modified version of the sticker.php script to your server inside your document root just as you did before.
If you are unable to create a directory outside of your document root and you want to keep your config.txt from being viewable there is one other option you can use. Eliminate the config.txt file by placing the configuration back in the sticker.php file. To do this, replace the line in sticker.php that reads:
require "./config.txt";
with the contents of your config.txt file. Copy everything between the <? and ?> leaving those two lines out. Paste it over the require line.