I am somewhat new to php, but I do understand some of the key concepts of it, however nothing about STDIN, what it is and why I am getting this error.
I am developing with the eTrade API PHP SDK and the development community over there seems to be a ghost-town, and absolutely nothing here on stackoverflow.
Here is the result of the php script I am trying to run http://philiparudy.com/etrade/Samples/test_market.php
I guess I am confused about this simple sample script that they give you where the end of the php script looks like this:
function get_input($str)
{
echo "\nPlease enter * $str * : ";
return trim(fgets(STDIN));
}
function show_menu()
{
echo "\n\nChoose from following options..\n\n";
echo "1. Get Option Chain\n\n";
echo "2. Product Lookup\n\n";
echo "3. Get Expiry Dates\n";
echo "4. Get Quote\n";
echo "0. Exit\n";
echo "Enter your choice:";
$choice = trim(fgets(STDIN));
return $choice;
}
Above all of this is a switch function that is supposed to handle your input, but there is no place to put the input on the webpage?
I also tried copying and pasting this in the terminal to which I got an array of different errors. Am I missing the boat completely here?