Hi 
   
  i want to do wap push project to send ringtone and pictuer to mobile 
   
  this is my kannel config 
   
  /////////////////////////////////////////////////
  group = core
  admin-port = 15000
  admin-password = ros123 
  admin-deny-ip = "*.*.*.*"
  admin-allow-ip = ""
  wapbox-port = 13002
  wdp-interface-name = "vas"
  log-file = "/var/log/kannel/bearerbox.log"
  box-deny-ip = "*.*.*.*"
  box-allow-ip = "127.0.0.1"
  group = wapbox
  bearerbox-host = localhost
  log-file = "/var/log/kannel/wapbox.log"
   
   
  group = ppg
  ppg-url = /wappush
  ppg-port = 8080
  concurrent-pushes = 50
  users = 52
  ppg-allow-ip =194.100.32.125;127.0.0.1
  trusted-pi = false
   
   
  group = wap-push-user
  wap-push-user = picom
  ppg-username = "vas"
  ppg-password = ros123
  allow-ip = 62.254.217.163
  /////////////////////////////////////////////
   
   
  and this is my code 
  ////////////////////////////////////////////////////////////
   
   
    $host = 'localhost';
  $port = '8080';
  $url = "http://$host:$port";;
  $wap_push_id = 1;
  
  $xx="http://ci/uploads/$name";;
  
  //$file= bin2hex($xx);
   
   
  $body = "--multipart-boundary\r\n".
  "Content-type: application/xml\r\n\r\n".
  '<?xml version="1.0"?>'."\r\n".
  '<!DOCTYPE pap PUBLIC "-//WAPFORUM//DTD PAP 1.0//EN"'."\r\n".
  '"http://www.wapforum.org/DTD/pap_1.0.dtd"; >'."\r\n".
  '<pap>'."\r\n".
  '<push-message push-id="'.$wap_push_id.'">'."\r\n".
  '<address 
  address-value="WAPPUSH='.$phone_no.'/TYPE=PLMN <at> ppg.nokia.com"/>'."\r\n".
  '<quality-of-service delivery-method="unconfirmed" network="GSM" 
  bearer="SMS"/>'.
  "</push-message>\r\n".
  "</pap>\r\n\r\n".
  "--multipart-boundary\r\n".
  "Content-type: text/vnd.wap.si\r\n\r\n".
  '<?xml version="1.0"?>'."\r\n".
  '<!DOCTYPE si PUBLIC "-//WAPFORUM//DTD SI 1.0//EN"'."\r\n".
  '"http://www.wapforum.org/DTD/si.dtd";>'."\r\n".
  "<si>\r\n".
  '<indication action="signal-high" si-id="'.$wap_push_id.'" 
  href="'.$push_url.'">'.$text.'</indication>'."\r\n".
  "</si>\r\n".
  "--multipart-boundary--\r\n";
  
  $post = "POST /wappush HTTP/1.1\r\n".
  "Host: $host:$port\r\n".
  "Authorization: Basic ".base64_encode("$ppg_user:$ppg_pass")."\r\n";
  "X-Kannel-SMSC: $smsc_id\r\n".
  'Content-Type: multipart/related; boundary=multipart-boundary; 
  type="application/xml"'."\r\n".
  "Content-Length: ".strlen($body)."\r\n"."\r\n".$body; 
  //echo $url;
  $ch = curl_init();
  curl_setopt ($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_HEADER, 1);
  curl_setopt($ch, CURLOPT_TIMEOUT, 15);
  curl_setopt ($ch,CURLOPT_CUSTOMREQUEST , $post);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  $reply = curl_exec($ch);
  curl_close ($ch);
  
  if (empty($reply))
  {
  print "Sorry, example.com are a bunch of poopy-heads.<p>";
  }
  else
  {
  print $reply;
  }
   
  ///////////////////////////////////////////////////////////////
   
  the problem is where and how i put the contant ( ringtone or pictuer .....  ) 
and i don't use sms gatway that effect on sending ( must i use it to send mms ).
  can any one help me and thanx.  


 between 0000-00-00 and 9999-99-99       <hr size=1> Yahoo! for Good helps you 
<a 
href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=51947/*http://uk.promotions.yahoo.com/forgood/";>make
 a difference</a>

Reply via email to