Quote:
Originally Posted by scotty You'd need to write a shim to the PHP API, like a REST or SOAP web service, or just a basic web page, then access that interface from your Zimlet via the Zimbra Proxy. Code: // call the web service to retrieve ABC
var service_url = 'http://....' + '?what=ABC';
var url = ZmZimletBase.PROXY + AjxStringUtil.urlComponentEncode(service_url);
AjxRpc.invoke(null, url, null, new AjxCallback(this, this._handler), true); Your PHP would look like: Code: <?php
require 'API';
$what = $_REQUEST['what'];
if (valid_what($what)) {
$resp = API_call($what);
echo what_to_html($resp);
} else {
...
} |
I got 403 forbidden error while passing my local url.
I am passing 'http://localhost/test.php?action=test'. Its give me 403 forbidden error in response.
so my url is look like "/service/proxy?target=http%3A%2F%2Flocalhost%2Ftest.php"
Can you please suggest where I am wrong.