The Triggers method
The triggers method gets the custom triggers that the user has set up.
Basic usage
It can be used as follows:
<?php
$PHPingFM = new PHPingFM($developer_key, $user_app_key);
$triggers = $PHPingFM->triggers();
// The $triggers variable contains an array of the user's custom triggers.
?>
Example usage
An example use would be to create a select list of triggers, so the user can decide which one to post to. I have done that here:The code behind that
This list was generated with the following code:
<?php
$output = '<select>';
$PHPingFM = new PHPingFM($developer_key, $user_app_key);
$triggers = $PHPingFM->triggers();
foreach ($triggers as $key => $trigger) {
$output .= '<option value="'. $key .'">'. $key .'</option>';
}
$output .= '</select>';
?>