I'm trying to make a script as requested by a service provider of ours. A brief explanation follows as stated by the provider:
Now I have already created the form, the gathes the user information, validates it and then with curl, checks the headers. If I get a HTTP code of 200, then I execute the following code:In case of a successful registration, the server returns to the client
The generated key file as multipart MIME-message, in which there will be at least one text and at least one binary part with information about the product and the key file itself accordingly.
Code: Select all
case "200":
$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, $_SESSION['url'] );
curl_exec( $ch );
curl_close( $ch );
break;When I enter the url manually, all works well and I am presented with the above summary and a download file, but when I run my script, I get no file to dwonload and only jumbled code.--a87ab7e62 ... a4fc852ff89
Content-Type: text/plain; charset=UTF-8
USER RE-REQUESTED KEY
**********************
Period: ***************
User name: ***********
User email: ************
Computers: ************
Serial: ***************
OEM
--a87ab7e62fe .... 9a4fc852ff89
Content-Type: binary/octet-stream; name="*********.zip"
Content-Disposition: attachement; filename="********.zip"
Content-Transfer-Encoding: base64
UEsDBBQACAAIAAeQbTYAAAAALQUAAC0FAAALAAAAZHJ3ZWIzMi5rZXmFVNtu3EYMfV9gf6FV31p0
3XLuZAM9zNUx4hiLbGwHLfogewe2ir1Bq02bvy9lO0GDFqgECeRwyDk8JOdVk4bbeqdk81H/JOyP
zZv6qSn9ps5nr5q0b3b7sanrfvxuPptWvvn2P9/J+Bt7/j6f3bxr4cszn/nls6qE1WI+i+9aIRzL
xmmaz/IHVtEZrdSkrvJX6k0djv1+1/rNhgMdDpv+vht54dg+Y0a7eBJu4+WzcH59sVgdLlId3tYX
4cPy80rXb17vt3VxfVh3I5vvH+v6tKnDwu/GfnXotov3jzV043Jzeuh3DHWovG/dSgB3BvJM2OZ7
4...
...
...
AwAAAAA=
--a87ab7...52ff89--
Please forgive me if this is something simple, but i rather new to all this and would appreciate a pointer in the right direction.
Cheers,
P.