I want to read the calender from the /Microsoft-Server-ActiveSync Url with a
simple php script and publish this on my website. I want to use the normal
Windows Exchange 2007 server incombination with a remote server with PHP
support on it.
There are some samples on your website (sending client to server and
responding codes). On the page:
http://wiki.openchange.org/index.php/ActiveSync_Protocol

Can anybody help me to create this option (so that i can read the calendar
option with php)?

I create the following script in combination with mail2web.com (exchange
support)
######################
<?php

$cookie_jar = tempnam('tmp/','cookie');

$url = "https://ex7.mail2web.com/Microsoft-Server-ActiveSync";;
$POSTFIELDS = "[email protected]
&DeviceId=DTJBTQBMB&DeviceType=PocketPC&Cmd=FolderSync";
$cookie_file_path = "tmp/";

$ch = curl_init();
$username = '[email protected]';
$password = 'PASSWORD';

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$POSTFIELDS);
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
#curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST' );


curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Accept-Language: en-us",
"MS-ASProtocolVersion: 14.0",
"X-MS-PolicyKey: 2034202722",
"Content-Type: application/vnd.ms-sync.wbxml",
"User-Agent: Microsoft-PocketPC/3.0",
"Host: VMWIN2003",
"Connection: Keep-Alive",
"Cache-Control: no-cache",
"Accept: application/vnd.ms-sync.wbxml"));
curl_setopt($ch, CURLOPT_HEADER, true);

#curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
#curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
#curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
#curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

$result = curl_exec($ch);

echo $result;
?>
###################


When i use this script i get the following error:
HTTP/1.1 501 Not Implemented Date: Tue, 29 Dec 2009 15:34:03 GMT Server:
Microsoft-IIS/6.0 X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727
Cache-Control: private Content-Length: 0
_______________________________________________
devel mailing list
[email protected]
http://mailman.openchange.org/listinfo/devel

Reply via email to