Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from jpf/master
Updates to README
- Loading branch information
Showing
1 changed file
with
1 addition
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d9f4aac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning: Invalid argument supplied for foreach() in /home/***_/_/call/call_tracking/include/config.php on line 27
Not sure what needs to be in the ( ) after foreach I've had a twilio account for over a year now but I'd really like to get this working. I'm directly hitting the Index.php and the above error is what I'm getting. Any suggestion would be helpful Thanks. If i open the index in an editor it's totally different? I just need some specific instructions here. Thanks again.
LINE 21 thru 35: class Util {
public static function get_all_twilio_numbers() {
global $ApiVersion, $AccountSid, $AuthToken;
$twilio_numbers=array();
$client = new TwilioRestClient($AccountSid, $AuthToken);
$response = $client->request("/$ApiVersion/Accounts/$AccountSid/IncomingPhoneNumbers", "GET"); // Get all twilio phone numbers
foreach($response->ResponseXml->IncomingPhoneNumbers->IncomingPhoneNumber AS $number){
$twilio_numbers[format_phone($number->PhoneNumber)]=$number->FriendlyName;
}
return $twilio_numbers;
}
}
?>