1I suppose you want to get the content generated by PHP, if so use:
2
3$Vdata = file_get_contents('http://YOUR_HOST/YOUR/FILE.php');
4
5Otherwise if you want to get the source code of the PHP file, its the same as
6a .txt file:
7
8$Vdata = file_get_contents('path/to/YOUR/FILE.php');
1ob_start();
2
3include "yourfile.php";
4
5$myvar = ob_get_clean();
6
7reference :
8https://stackoverflow.com/questions/1272228/how-do-i-load-a-php-file-into-a-variable
9https://secure.php.net/manual/en/function.ob-get-clean.php