DOCUMENTAZIONE API SMS STAR
Di seguito vediamo un esempio di script PERL per eseguire le seguenti funzioni:
INVIO SMS
RICEVERE
STATO DEL SMS INVIATO
RICEVERE
COSTO DEL SMS
INVIATO
RICEVERE
IL SALDO DEI CREDITI A DISPOSIZIONE
Prima di visualizzare l'esempio di script riportato qui di seguito leggi le impostazioni da effettuare nel tuo pannello di controllo. Trovi tali indicazioni nella pagina: http://www.smsstar.it/api.htm
ESEMPIO SCRIPT in PERL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/usr/bin/perluse LWP::UserAgent; my $ua = new LWP::UserAgent;my $login = '';my $password = '';my $send_sms = '<?xml version="1.0" encoding="UTF-8"?> <SMS> <operations> <operation>SEND</operation> </operations> <authentification> <username>'.$login.'</username> <password>'.$password.'</password> </authentification> <message> <sender>SMS</sender> <text>Test message [UTF-8]</text> </message> <numbers> <number messageID="msg11">380972920000</number> </numbers> </SMS>'; my $response = $ua->post('http://www.smsstar.it/account/xml.php',{ XML => $send_sms});print $response->content; |
RICEVERE STATO DEL SMS INVIATO
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #!/usr/bin/perluse LWP::UserAgent; my $ua = new LWP::UserAgent;my $login = '';my $password = '';my $get_sms_status = '<?xml version="1.0" encoding="UTF-8"?> <SMS> <operations> <operation>SEND</operation> </operations> <authentification> <username>'.$login.'</username> <password>'.$password.'</password> </authentification> <statistics> <messageid>msg11</messageid> </statistics> </SMS>'; my $response = $ua->post('http://www.smsstar.it/account/xml.php',{ XML => $get_sms_status});print $response->content; |
RICEVERE COSTO SMS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/usr/bin/perluse LWP::UserAgent; my $ua = new LWP::UserAgent;my $login = '';my $password = '';my $get_send_price = '<?xml version="1.0" encoding="UTF-8"?> <SMS> <operations> <operation>GETPRICE</operation> </operations> <authentification> <username>'.$login.'</username> <password>'.$password.'</password> </authentification> <message> <sender>SMS</sender> <text>Test message [UTF-8]</text> </message> <numbers> <number messageID="msg11">380972920000</number> </numbers> </SMS>'; my $response = $ua->post('http://www.smsstar.it/account/xml.php',{ XML => $get_send_price});print $response->content; |
RICEVERE IL SALDO DEI CREDITI A DISPOSIZIONE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #!/usr/bin/perluse LWP::UserAgent; my $ua = new LWP::UserAgent;my $login = '';my $password = '';my $get_balance = '<?xml version="1.0" encoding="UTF-8"?> <SMS> <operations> <operation>BALANCE</operation> </operations> <authentification> <username>'.$login.'</username> <password>'.$password.'</password> </authentification> </SMS>'; my $response = $ua->post('http://www.smsstar.it/account/xml.php',{ XML => $get_balance});print $response->content; |
ESEMPI DI SCRIPT PER INVIARE SMS TRAMITE IL GATEWAY DI SMSSTAR
Script in PHP per Inviare SMS
Script in C# per Inviare SMS
Script in Java per Inviare SMS
Script in Perl per Inviare SMS
Script in Python per Inviare SMS
English
Deutsch
Espanol
Francais
Russian
Ukrainian
Portuguese
Italiano
Turkish
Polish






