You can't store data like that because you're not going to be able to write to it that way. Try this: <?php require_once "path/to/license.php"; //////////////////////////////////////////////////// // BEGIN: ONE-TIME SETUP //////////////////////////////////////////////////// // Get license key from user and write to file file_put_contents("path/to/license_key.txt", $_POST['license_key']); // Initialize to fetch public key $server_url = "https://domain.com/path_to_blesta/plugin/license_man