This is an old revision of the document!
PHP
Sample Code
Parsing an array, checking if variable is empty or not numerical (both not needed)
<?php header("Content-Type: text/plain"); $mystr = "My BusinessHours_5_1_60"; $myvar = (explode("_",$mystr)); //echo $myvar; print_r (explode("_",$mystr)); //print_r $myvar; echo "\n".$myvar[0]; echo "\n".$myvar[1]; echo "\n".$myvar[2]; echo "\n".$myvar[3]; echo "\n".$myvar[4]; //if empty($myMinAgentCount){$myMinAgentCount = '0';} else {$myMinAgentCount = $myvar[2];} $myProactiveChatTimer = $myvar[1]; $myMinAgentCount = $myvar[2]; $myMaxQueueDepth = $myvar[3]; $myMaxWaitTime = $myvar[4]; if ((empty($myProactiveChatTimer))||(!is_numeric($myProactiveChatTimer))) {$myProactiveChatTimer = '0';} if ((empty($myMinAgentCount))|| (!is_numeric($myMinAgentCount))) {$myMinAgentCount = '0';} if ((empty($myMaxWaitTime))|| (!is_numeric($myMaxWaitTime))) {$myMaxWaitTime = '0';} if ((empty($myMaxQueueDepth))||(!is_numeric($myMaxQueueDepth))) {$myMaxQueueDepth = '0';} echo "\nmyProactiveChatTimer: ".$myProactiveChatTimer; echo "\nmyMinAgentCount: ".$myMinAgentCount; echo "\nmyMaxQueueDepth: ".$myMaxQueueDepth; echo "\nmyMaxWaitTime: ".$myMaxWaitTime; ?>
Retreiving variables from HTTP url
<?php echo 'Hello ' . htmlspecialchars($_GET["name"]) . '!'; $myname = htmlspecialchars($_GET["name"]); echo "myname variable is: " . $myname; ?>