get_code
get_code($wt_wait); - get activation code from SMS.
The function accepts parameters as input:
$wt_wait – wait *10 seconds.
After testing, the function returns the result of its work to the script :
true – the operation was performed successfullyfalse – the operation was not completed
The resulting code itself can be obtained from the cheapsms->codevariable. However, if your text message is not parsed correctly, use the cheapsms->answervariable for parsing.
The cheapsms->answer variable can be:
STATUS_OK:$code - code received (where $code is the activation code)
Possible error:
NO_ACTIVATION - activation id does not exist
ERROR_SQL - SQL server error
BAD_KEY - invalid API key
BAD_ACTION - Invalid action