Information Technology Articles :: SEO Tips :: WAP Articles :: Search Engine Marketing :: Internet Tips

Goedangilmu

Script Request SMS Gateway Kannel

Posted on November 2nd, 2007 in Programming, 1,172 views

Berikut ini merupakan contoh script request sms gateway with kannel :

<?php

$fields = array (from => ‘123′,to => ‘+6281xxxxx’,smsc => ‘xx’);

$kannel = array (host => ‘127.0.0.1′,port => 13013,user => ‘foo’,pass => ‘bar’);

$fields[text] = “isi sms”;

while(list($k,$v) = each($fields))

{

if ( $v != “” )

{

$string .= “&$k=$v”;

}

}

$request = ‘http://’.$kannel[host].’:’.$kannel[port].’/cgi-bin/sendsms’.'?user=’

.$kannel[user].’&password=’.$kannel[pass]. $string;

$result = @file($request);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $result);

curl_setopt($ch, CURLOPT_TIMEOUT, 10);

$getResult = curl_exec($ch);

if (curl_errno($ch))

{

print curl_error($ch);

}

else

{

echo “Berhasil”;

}

curl_close($ch);

?>

Related Posts :

Published by Adith

4 Comments

  1. hans on 09.05.2008 at 14:14 (Reply)

    itu gmana bos makenya? cuma copy paste aja? trus..itu datanya di send kemana?

    thx

    1. Adith on 09.05.2008 at 15:40 (Reply)

      ya gak copy paste donks, ada yg perlu kmu modifikasi terus di send ke kannel sms gateway nya

  2. ShlMuh on 19.08.2008 at 14:35 (Reply)

    Ada nggak contoh script sms gateway with VB 6.0

    1. Adith on 19.08.2008 at 18:38 (Reply)

      sory gak ada

Leave a comment