Sending a forward-lock message from PHP

Sending a forward-lock message from PHP SearchSearch
Author Message
Rob Morgan
Unregistered guest
Posted on Thursday, June 09, 2005 - 07:16 pm:   

Hi all,

I'm trying to send a forward-lock message from PHP using the following code:

header("Content-type: application/vnd.oma.drm.message; boundary=boundary-1");
print("--boundary-1\n");
print("Content-type: audio/midi\n");
print("Content-Transfer-Encoding: binary\n");
print("\n");
fpassthru(fopen("test.mid", "rb"));
print("\n--boundary-1--\n");

It works fine in the Openwave Phone Simulator, I can even play the midi file! However, on both a Nokia 6230 and a SonyEricsson K500i, both of which have forward locking support, I get a "file corrupted" error message.

Any idea what I'm doing wrong?

Thanks in advance,

Rob