I'm hitting a wall with this. It's difficult to find an answer because I'm not sure how to word the question, and I can't think of decent keywords either.
I'm writing a view object for use in an MVC framework I'm writing and it assembles pages by tying script outputs together. I'm stuck on the tie together part!
script1.php:
<?php
$variable = solution('/path/to/script2.php');
echo $variable;
?>
script2.php:
<?php
// generates a random md5 hash just for example
mt_srand(microtime(true)*100000 + memory_get_usage(true));
$randommd5 = md5(uniqid(mt_rand(), true));
echo $randommd5;
?>
How do I make both of these scripts return the same value every time I run script1.php?
Is there a PHP function for this purpose? If not, is there a simple and stable way of accomplishing this?