$arr=get3gstat();
if ($arr['connected']) {
print("Cellular data is currently connected\r\n");
} else {
print("Cellular data is NOT currently connected\r\n");
}
print_r($arr);
?>
Typical output for the above example (results vary depending on the status of the connection):
Cellular data is NOT currently connected
[$arr] = Array (
(int) [RX] => 0
(int) [TX] => 0
(int) [signal] => 0
(string) [snr] => < -113 dBm (Marginal)
(int) [enabled] => 1
(int) [connected] => 0
)
====See Also====
[[net_enable3g()]] - Enable 3G support for the dongle
[[net_disable3g()]] - Disable 3G support for the dongle
[[getethstat()]] - Get Ethernet connection status information