SHOW:
|
|
- or go back to the newest paste.
| 1 | <? | |
| 2 | ||
| 3 | $url = "http://www.smsapi.si/poslji-sms"; //url we are posting to (defined in sms api documentation) | |
| 4 | $data = array("un" => urlencode("uporabniško_ime"), //api username
| |
| 5 | "ps" => urlencode("api geslo"), //api pass
| |
| 6 | "from" => urlencode("041642810"), //don"t send as int
| |
| 7 | - | "to" => urlencode("041241796"), //don"t send as int
|
| 7 | + | "to" => urlencode("vaša_telefonska_številka"), //don"t send as int
|
| 8 | "m" => urlencode("Strežnik ja zagnan."), //msg
| |
| 9 | "cc" => urlencode("386") //don"t send as int
| |
| 10 | ); | |
| 11 | //send SMS via HTTP GET | |
| 12 | $url = $url . "?" . http_build_query($data); | |
| 13 | $response = file_get_contents($url); | |
| 14 | echo $response; | |
| 15 | ||
| 16 | ?> |