Bitrix24 Community

Support » Forum » Francisco Espasa
Select date in calendarSelect date in calendar

Pages: 1
REST API I can not run the rest.php example for a contact form in wp
Hi,

I am new in the use of php. I have tried to execute the example of contact form rest.php in my wordpress site through page template but does not work. Neither it works if I call directly the rest.php page in the browser, always obtain the same error first and then the form. Can anybody help and say me what am I doing wrong?

This is what i get:

$leadData['TITLE'], 'COMPANY_TITLE' => $leadData['COMPANY_TITLE'], 'NAME' => $leadData['NAME'], 'LAST_NAME' => $leadData['LAST_NAME'], 'COMMENTS' => $leadData['COMMENTS'], ); // append authorization data if (defined('CRM_AUTH')) { $postData['AUTH'] = CRM_AUTH; } else { $postData['LOGIN'] = CRM_LOGIN; $postData['PASSWORD'] = CRM_PASSWORD; } // open socket to CRM $fp = fsockopen("ssl://".CRM_HOST, CRM_PORT, $errno, $errstr, 30); if ($fp) { // prepare POST data $strPostData = ''; foreach ($postData as $key => $value) $strPostData .= ($strPostData == '' ? '' : '&').$key.'='.urlencode($value); // prepare POST headers $str = "POST ".CRM_PATH." HTTP/1.0\r\n"; $str .= "Host: ".CRM_HOST."\r\n"; $str .= "Content-Type: application/x-www-form-urlencoded\r\n"; $str .= "Content-Length: ".strlen($strPostData)."\r\n"; $str .= "Connection: close\r\n\r\n"; $str .= $strPostData; // send POST to CRM fwrite($fp, $str); // get CRM headers $result = ''; while (!feof($fp)) { $result .= fgets($fp, 128); } fclose($fp); // cut response headers $response = explode("\r\n\r\n", $result); $output = ''.print_r($response[1], 1).''; } else { echo 'Connection Failed! '.$errstr.' ('.$errno.')'; } } else { $output = ''; } // HTML form ?>Title*:
Company Name:
First Name:
Last Name:
Comments:

Thank in advance.
E-mail attachments folder in company drive have public access to all my e-mail attachments
Hi,

I have configured my user of bitrix24 as administrator and have linked my account of gmail to this user. In any moment warns that bitrix24 will download [U]all [/U]the attachments of my inbox ([U]older and newer[/U]) and saves them in the folder of e-mail attachments of the company accessible for any user that I have created later.

It is this correct or I have omitted some steps in the configuration?.

In any case I consider that if automatically all the attachments of a e-mail account are downloaded,  this would have to warn  somewhere on the e-mail account connection proccess, otherwise this will be a security problem.

Thank you.
Pages: 1
2,000,000+
organizations
are already using Bitrix24