I want to collect the content of a dynamically generated file, and place the content inside an email that will be sent but am unable to return the content.
/file/invoice/html/{id}
The file its self is a .htaccess
written file so it is not actually the location or the file its self, i want the content that the you see when viewing in the browser I want to be able to get the contents of it and insert it into an email as content.
The .htaccess
controls the type of file and format of the file.
the htaccess that i am using for the file is
RewriteRule ^file/([^/]+)?$ file.php?file=$1 [QSA]
RewriteRule ^file/([^/]+)/([^/]+)?$ file.php?file=$1&find=$2 [QSA]
RewriteRule ^file/([^/]+)/([^/]+)/([^/]+)?$ file.php?file=$1&type=$2&find=$3 [QSA]
I have tried
file_get_contents('http://domain.com/file/invoice/html/1')
file_get_contents('./file/invoice/html/1')
but this does not bring back the content that I can see. i have worked out that it is the "is user logged in check" that is stopping it but as u can guess i dont want to remove this from the file. is there a way to do this with it still there . this is the bit stopping it but i would prefer not to remove it
if (!isset($_SESSION['LOGGED_IN'])){
die(CLOSE_WINDOW);
}elseif(isset($_SESSION['LOGGED_IN']) && $_SESSION['LOGGED_IN'] != TRUE){
die(CLOSE_WINDOW);
}
What I am doing wrong and how can I solve it?