That is easy. I do this all the time when I create an installer for someone, so you should understand this pretty easily.
Here is the basics for it.
You will need to give permissions to the folder that would store all that created pages. I'm not sure what the permission thing would look like, but I'm sure you would/could figure it out.
Here is an example of such thing in action.
<?php
function create_page() {
// page name
$filename = "main/{$id}-{$name}.php";
// Creating the file (If doesn't exist...)
if($handle = fopen($filename, 'w+'))
{
// The contents that would be writtin to the file
$contents = "<?php
\$name = $name;
?>
<html>
<head>
<title>{$id} - {$name}</title>
</head>
<body>
User ID: {$id}
Name: {$name}
Other info: {$other}
</body>
</html>
";
// Writing the contents into the file and checking if it succeeded
if(file_put_contents($filename, $contents))
{
// The contents were successfully written into the file...
echo "Page created";
$this->finish;
} else {
// There was a problem writing the contents into the file
// Give the appropriate text and kill the script
die("<p>There was an error while creating the user file.</p>\n");
}
// Closing the file
fclose($handle);
}
}
?>
- <?php
- function create_page() {
- // page name
- $filename = "main/{$id}-{$name}.php";
- // Creating the file (If doesn't exist...)
- if($handle = fopen($filename, 'w+'))
- {
- // The contents that would be writtin to the file
- $contents = "<?php
- \$name = $name;
- ?>
- <html>
- <head>
- <title>{$id} - {$name}</title>
- </head>
- <body>
- User ID: {$id}
- Name: {$name}
- Other info: {$other}
- </body>
- </html>
- ";
- // Writing the contents into the file and checking if it succeeded
- if(file_put_contents($filename, $contents))
- {
- // The contents were successfully written into the file...
- echo "Page created";
- $this->finish;
- } else {
- // There was a problem writing the contents into the file
- // Give the appropriate text and kill the script
- die("<p>There was an error while creating the user file.</p>\n");
- }
- // Closing the file
- fclose($handle);
- }
- }
- ?>
I didn't test that piece of code, but I'm sure that it should work. All I did was copy this from a working example, changed the $contents variable and the results. I also changed the file name to be (or to seem to be) dynamic.
I think that code is pretty much self-explanatory. If you don't understand something ask and I will try to help

I put that php code in the example to show that you can do that. At least I do that to store values like in the example...
"Bring forth therefore fruits meet for repentance:" Matthew 3:8