Example #1
0
<?php

global $logFilePath;
// error_reporting(~0); ini_set('display_errors', 1);
// $fileName = CLIENTINC_DIR.'remote.xml';
$fileName = "https://w2l.dk/pls/wopdprod/erstcrm_pck.contact_xml";
$response = getRequestFromUrl($fileName);
if ($response->xpath('/contacts/contact') && !empty($response->xpath('/contacts/contact')) && ($nodes = $response->xpath('/contacts/contact')) && count($nodes) > 0) {
    createTicketByWebService($response);
}
// logErrors("Yes, it is");
// echo $logFilePath;
// error_log("it is", 3, $logFilePath);
//     else
//     {
//        echo "can not create a ticket or no contents provided by the web service <br/>";
//        $fileName = CLIENTINC_DIR.'remote.xml';
//        $response = getRequestFromUrl($fileName);
//        createTicketByWebService($response);
//        echo "a test case has been generated <br/>";
//	    }
Example #2
0
function deleteContactsFromQueue($contactId)
{
    $url = "https://w2l.dk/pls/wopdprod/erstcrm_pck.contact_delete?id=" . $contactId;
    $xml = getRequestFromUrl($url);
    if (!empty($xml->xpath('/status')) && ($status = $xml->xpath('/status')) && count($status) > 0) {
        if (!empty($status->contact_deleted == $contactId)) {
            echo "contact with the id= " . $contactId . " has been deleted" . "<br/>";
        }
        if (!empty($status->contact_file_deleted)) {
            echo "file with the id= " . $status->contact_file_deleted . " has been deleted" . "<br/>";
        }
    } else {
        echo "can not delete the contact with its id=" . $contactId;
    }
}