The problem is in the very first bytes, not in the URL, so I write it down again:
// I think the problem is in this block %01 // Transaction ID %06 // Push %04 // Lenght of headers %03 // Lenght of content-type %B0 // Content type is application/vnd.wap.slc %81 // Charset is %EA // UTF-8 // End of block
Thanks J
UDH will always be the same. Text needs to have the binary encoded data you mention above.
Here's an example, without the percent signs UDH: 0605040B8423F0 Text: 1B0601AE 02056A00 45C60C03736D732E6B6174617A6F2...17A6F2E000101
Some PHP:
$udh = '0605040B8423F0'; $text = '1B0601AE02056A0045C60C03' .hex_encode($url, '') .'000103'. hex_encode($title, ''). '000101';
function hex_encode( $text, $joiner='' ) { for ($l=0; $l<strlen($text); $l++) { $letter = substr($text, $l, 1); $ret .= sprintf("%s%02X", $joiner, ord($letter)); } return $ret; }
Make more sense? (yes, I know the hex_encode function could be written better)
Beckman
---------------------------------------------------------------------------
Peter Beckman Internet Guy
[EMAIL PROTECTED] http://www.purplecow.com/
---------------------------------------------------------------------------
