I have a token.php file that generates the token of my server in order to make a stream to work. What i want to do is to response from the server as a string i have tryed the code below but it's not working
$my_var = file_get_contents('example.com/token.php');
echo $my_var;
You are getting literal content from token.php Try:
$my_var = file_get_contents('http://example.com/token.php');
echo $my_var;