The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I have devised a small php include conditional to display a custom page if a remote file is not avilailable. I am running it in a "hook global start"
Overall it does work but I noticed that it puts a great strain on my entire forums because the condition is run contineously. Is there a way to get the same results but only when this particular page or area is viewed? Code:
$includefile="http://mysite2.com/on.php";
$handle = fopen($includefile, "r", 1);
if ($handle) {
fclose($handle);
ob_start();
require("http://mysite2.com/on.php");
$myfile = ob_get_contents();
ob_end_clean();
} else {
ob_start();
require("/home/server/public/off.php");
$myfile = ob_get_contents();
ob_end_clean();
}
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|