PHP code example of ictinnovations / ictcore

1. Go to this page and download the library: Download ictinnovations/ictcore library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ictinnovations / ictcore example snippets


yum module disable php:7.2
yum install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm
yum module enable php:remi-7.4

yum install -y php php-fpm php-gd php-mysqlnd php-imap

yum install -y ImageMagick ImageMagick-devel  
pecl install imagick  
echo "extension=imagick.so" > /etc/php.d/imagick.ini  

yum install --enablerepo=epel php-devel php-pear libmcrypt libmcrypt-devel  

pecl install mcrypt  
echo 'extension=mcrypt.so' > /etc/php.d/mcrypt.ini 

setenforce 0
service httpd restart
service php-fpm restart

echo "ictcore" >> /etc/mail/trusted-users
echo "apache" >> /etc/mail/trusted-users

echo "FAX_DOMAIN.COM" >> /etc/mail/local-host-names

echo '@FAX_DOMAIN.COM ictcore' >> /etc/mail/virtusertable


    // prepare a program with fax document
    $faxProgram = new Sendfax();
    $faxProgram->file_name = '/some/pdf/file.pdf';
    $faxProgram->save();
    $faxProgram->compile();

    // create a transmission
    $contact_id = 12;
    $account_id = 1;
    $faxTransmission = $faxProgram->transmission_create($contact_id, $account_id);

    // schedule transmission 
    $faxTransmission->schedule(array('delay' => 3600)); // in seconds

    // or dispatch immediately
    $faxTransmission->send();