Server scripting: Difference between revisions

From SoftwareGuy
Jump to navigation Jump to search
Mark (talk | contribs)
Created page with "== php == simple php example of server side message (from camera) with argument(s) <?php $direction = $_GET['Message']; $fcontents = file_get_contents('php://input') . " - " . $direction; file_put_contents('php.log', $fcontents, FILE_APPEND); ?>"
 
Mark (talk | contribs)
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
simple php example of server side message (from camera) with argument(s)
simple php example of server side message (from camera) with argument(s)


<?php
<?php
$direction = $_GET['Message'];
$fcontents = file_get_contents('php://input') . " - " . $direction;
file_put_contents('php.log', $fcontents, FILE_APPEND);
?>


$direction = $_GET['Message'];
simple server side with image saving


$fcontents = file_get_contents('php://input') . " - " . $direction;
<?php
$direction = $_GET['direction'];
//$fcontents = file_get_contents('php://input') . " - " . $direction;
$fcontents = file_get_contents('php://input');
file_put_contents('php_image.log', $fcontents);
?>


file_put_contents('php.log', $fcontents, FILE_APPEND);
== bash ==


?>
for i in $(seq 1 1000); do echo $i >> numbers.txt; sleep 1; done
 
or
 
for i in $(seq 1 1000); do vcgencmd measure_temp >> numbers.txt; sleep 1; done

Latest revision as of 16:09, 12 June 2024

php[edit | edit source]

simple php example of server side message (from camera) with argument(s)

<?php
$direction = $_GET['Message'];
$fcontents = file_get_contents('php://input') . " - " . $direction;
file_put_contents('php.log', $fcontents, FILE_APPEND);
?>

simple server side with image saving

<?php
$direction = $_GET['direction'];

//$fcontents = file_get_contents('php://input') . " - " . $direction;
$fcontents = file_get_contents('php://input');
file_put_contents('php_image.log', $fcontents);

?>

bash[edit | edit source]

for i in $(seq 1 1000); do echo $i >> numbers.txt; sleep 1; done 

or

for i in $(seq 1 1000); do vcgencmd measure_temp >> numbers.txt; sleep 1; done