i want to post a username to a PHP File. Then i want that the Username will be implemented in a PHP File which i will write in my script.
But its not working? And how do i implement the POST username in the string on $Line 5? And i want to write every line as single line, its putting all together i think. I Guess it would be easier to copy the file, and implement there the Post but i dont know how to do that.
Token Infos are not the real one ;)
$username = $_POST["username"];
//twilio tokenlines
$Line0 = "<?php";
$Line1 = "include '../Services/Twilio/Capability.php'";
$Line2 = "$accountSid = '3763876534876584'; ";
$Line3 = "$authToken = '4765784365874365'; ";
$Line4 = "$capability = new Services_Twilio_Capability($accountSid, $authToken); ";
$Line5 = "$capability->allowClientIncoming("HERE I WANT TO STAND MY POST"); ";
$Line6 = "$capability->allowClientOutgoing('746357846358764387564387'); ";
$Line7 = "$token = $capability->generateToken(); ";
$Line8 = "echo $token;";
$Line9 = "?>";
$tokenfile = fopen("${username}.php", 'w');
fwrite($tokenfile,$Line0);
fwrite($tokenfile,$Line1);
fwrite($tokenfile,$Line2);
fwrite($tokenfile,$Line3);
fwrite($tokenfile,$Line4);
fwrite($tokenfile,$Line5);
fwrite($tokenfile,$Line6);
fwrite($tokenfile,$Line7);
fwrite($tokenfile,$Line8);
fwrite($tokenfile,$Line9);