Encode a Wap-Push using PHP

I’ve developed this PHP code back in 2004, to encode a Wap-Push into one SMS without using Kannel’s PPG (which at that time was a little hard to get it to work as expected).

Many people are still finding it useful, so I’m putting it here so it’s easier to find than on those clumsy mailing-list archives 🙂

To use it, you should fill both arrays ($fields and $kannel) with the relevant information and call send_wap_push(). You can define additional parameters on $fields and they’ll get passed on the sendsms request.

Here’s the code: send_wap_push

Comments (3)

Paulo McNallyJuly 2nd, 2010 at 8:56 PM

Hi.

Thank you!

Question:

This is the string result to text?

%1B%06%01%AE%02%05%6A%00%45%C6%0C%03%77%77%77%2E%6D%79%2D%66%75%6E%6E%79%2D%6C%69%6E%6B%2E%63%6F%6D%2F%6D%79%66%69%6C%65%2E%6D%69%64%00%01%03%48%69%2C%20%6C%6F%6F%6B%20%61%74%20%74%68%69%73%00%01%01

alexJuly 3rd, 2010 at 1:53 PM

You need to add the UDH also. The string content depends obviously on what you’re trying to send.

adalberto montaniaJune 16th, 2011 at 12:57 PM

Gracias Alex,ya puede enviar wap push gracias a tu php!! Saludos desde Asuncion – Paraguay