Well, there are many ways to accomplish that. You can use filesystem functions such as [man]fopen[/man], [man]fread[/man] to retrieve the content of that file.
Assuming the content of that file is "page 1 of 54", you can do the following:
<?php
$file="file.txt";
$fp=fopen($file,"r");
$content=fread($fp,filesize($file));
fclose($fp);
//$content contains the content of the file (obviously)
$exp=explode(" ",$content);
print_r($exp);
?>