public function request_license() { $hostname = $_SERVER['HTTP_HOST']; PC::market("http://builderengine.com/builder_market_server/request_license?hostname=" . $hostname); $response_string = file_get_contents("http://builderengine.com/builder_market_server/request_license?hostname=" . $hostname); $response = json_decode($response_string); if ($response->status == "success") { $this->BuilderEngine->set_option('be_website_license', $response->license); } else { echo "error"; } return $response->license; }