well... You could just create the text file as a PHP file, and include it... That would be the easiest solution, although there is a function in php that would take a string, and execute it as php code... don't really remember which function it was though, was trying to find it... but couldn't. At any rate, try my first suggestion, probably would work better.