SuiteCRM Data Export Tools allows you to export records from any CRM module to any FTP location or post records to any URL using HTTP Post.
HTTP POST Content
Post URL : Your domain URL/fileName.php
HTTP POST Request Data:-
array('user_name' => 'admin', 'password' => 'admin', 'upload' => array('name' => 'Opportunities.xlsx', 'type' => 'text/plain', 'tmp_name' => '/tmp/php48gQHC', 'error' => 0, 'size' => 677))
How to retrieve HTTP POST data on third-party application through Authentication using HTTP POST Method,
if(isset($_POST) && !empty($_POST)) {
$userName = isset($_POST['user_name'])?$_POST['user_name']:'';
$password = isset($_POST['password'])?$_POST['password']:'';
if($userName != '' && $password != '') {
if($userName == 'admin' && $password == 'admin') {
if($_FILES["upload"]["name"] != '') {
//code to be executed if condition is true;
//return json encoded array
//For example,
if(success) {
echo json_encode(array("code" => "1", "message" => "Exported File uploaded Successfully"));
} else {
echo json_encode(array("code" => "0", "message" => "There was a problem while uploading File."));
}
}
} else {
echo json_encode(array("code" => "0", "message" => "Authentication Failed"));
}//end of else
} else {
echo json_encode(array("code" => "0", "message" => "Authentication Failed"));
}//end of else
}
Saving Comment...