I have this
How can I modify the .sh script to catch the output of script.php?
You can capture it in a variable like so:
MY_VAR=$(curl -s http://example.com/script.php)
-s to prevent the progress from displaying in stdout. From here you can use
$MY_VAR to control the output.