Author |
|
rsantellan Newbie
Joined: 14 October 2015
Online Status: Offline Posts: 11
|
Posted: 30 October 2015 at 1:31pm | IP Logged
|
|
|
Hi it is possible to use this documentation page using curl.
I try:
something like this:
$ch = curl_init();
$data = sprintf('&Email=%s&Password=%s', $user->getUsername(), $user->getEmailPassword());
//
curl_setopt($ch, CURLOPT_URL,$url."/webmail/index.php?postlogin");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
// in real life you should use something like:
// curl_setopt($ch, CURLOPT_POSTFIELDS,
// http_build_query(array('postvar1' => 'value1')));
// receive server response ...
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($ch);
//var_dump($server_output);
curl_close ($ch);
// further processing ....
if ($server_output == "OK") { } else { }
My first problem was that the file: libraries/ProjectCore/Service.php on the line 160 $_SERVER['HTTP_USER_AGENT'] was undefined.
adding a isset didn't solve it.
Is there is a way to do it?
Regards
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 02 November 2015 at 3:19am | IP Logged
|
|
|
How exactly did you add the isset there? This one should do it:
Code:
if (isset($_SERVER['HTTP_USER_AGENT']) && !strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'firefox'))
{
@\header('Last-Modified: '.\gmdate('D, d M Y H:i:s').' GMT');
} |
|
|
Are you getting any errors with code modified that way?
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|