I wanted to see if this is doable and something you guys consider good practice or bad.
This is oversimplified but the idea. A microprocessor sends out a string as needed to the dns to update the database like this:
string("main.php?OPCODE=1&PAR1=1, PAR2=2))
The main.php file would have a case statement:
Code: Select all
<html>
<body>
<?php
switch ($x)
{
case '$_REQUEST[OPCODE]' ":
$file=fopen("1.php","r");
break;
case '$_REQUEST[OPCODE]':
$file=fopen("2.php","r");
break;
case '$_REQUEST[OPCODE]':
$file=fopen("3.php","r");
break;
}
?>
</body>
</html> Code: Select all
$file=fopen("3.php('$_REQUEST[PAR1]&'$_REQUEST[PAR2]')","r");