|
- $MmscName = "http://mmsc.monternet.com";
- //MmscName为彩信服务器, 移动为"http://mmsc.monternet.com", 联通为"http://mmsc.myuni.com.cn"
- $headerBuffer = "POST http://" + $MmscName + " /HTTP /1.1\r\n";
- $headerBuffer += "Accept: image/png, image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\r\n";
- //网关地址, 目前移动联通都是 10.0.0.172:80
- $headerBuffer += "Host: 10.0.0.172:80\r\n";
- $headerBuffer += "X-Online-Host: " + $MmscName + "\r\n";
- $headerBuffer += "Pragma: no-cache\r\n";
- $headerBuffer += "Cache-Control: no-cache\r\n";
- $headerBuffer += "Connection: Keep-Alive\r\n";
- $headerBuffer += "Accept-Encoding: deflate, gzip\r\n";
- $headerBuffer += "User-Agent: SAMSUNG-SGH-E908/NetFront 3.2/WAP2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1\r\n";
- $headerBuffer += "Accept: application/vnd.wap.mms-message, image/vnd.wap.wbmp, image/png, image/jpeg, image/gif, text/x-iMelody, text/x-imelody, application/x-midi, audio/midi, audio/mid, audio/x-mid, image/bmp, audio/mp3, audio/x-midi, audio/amr, application/vnd.smaf, application/vnd.wap.mms-message x-wap-profile:http://wap.samsungmobile.com/uaprof/e908_10.xml\r\n";
- //s_length 为彩信包的长度
- $headerBuffer += "Content-Length:" + $s_length + "\r\n";
- $headerBuffer += "Content-Type:application/vnd.wap.mms-message\r\n\r\n";
- //在\r\n\r\n之后接的就是彩信包数据了
复制代码 |
|