I have a file that is basically a hub for HTML code, which gets (using file_gets_contents) some .html files, and some .php files. No issue there, except theres a lot of this file_get_contents going around. It gets around 10 files in total and responds to the user, the issue is that only now its becoming an issue.
I have it doing this so spare time, kind of a super-global system, for example, all my css stylesheets that are used in all my common pages are put in a .html file and gotten using file_get_contents so I dont have to edit the same stuff in multiple pages.
Just its starting to hit the Entry Process limit (Currently 20) really easilly.
Is there something else I should be doing here instead of file_get_contents?
Example of what im doing:
<?php
//hid database stuff and the db functions
if(isset($_GET["hwid"]) && $_GET["hwid"] != "" && isset($_GET["n"]) && $_GET["n"] != "") {
$hwid = str_replace(" ", "+", urldecode($_GET["hwid"]));
$number = $_GET["n"];
$query = countrows("SELECT hwid FROM hwid WHERE `hwid`.`hwid` = :hwid AND `hwid`.`banned` = 0", "snipcbar_authorization", array(":hwid"=>$hwid));
if($query == $hwid) {
echo "<!-- ".md5(md5("something".$hwid."-n-".$number."thatihavetoremove"))." -->";
echo file_get_contents("MAIN.php");
} else {
echo file_get_contents("REDEEM.php");
}
} else {
echo file_get_contents("REDEEM.php");
}
?>
(The files im getting here, like main.php and redeem.php also have file_get_contents related lines).