PHP code example of neutrinoapi / neutrinoapi_php_sdk

1. Go to this page and download the library: Download neutrinoapi/neutrinoapi_php_sdk 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/ */

    

neutrinoapi / neutrinoapi_php_sdk example snippets


$userId = 'userId'; // Your user ID
$apiKey = 'apiKey'; // Your API key

$client = new NeutrinoAPILib\NeutrinoAPIClient($userId, $apiKey);

$imaging = $client->getImaging();

function imageResize(
        $imageUrl,
        $width,
        $height,
        $format = 'png')

$imageUrl = 'image-url';
$width = 19;
$height = 19;
$format = 'png';

$result = $imaging->imageResize($imageUrl, $width, $height, $format);


function qRCode(
        $content,
        $width = 256,
        $height = 256,
        $fgColor = '#000000',
        $bgColor = '#ffffff')

$content = 'content';
$width = 256;
$height = 256;
$fgColor = '#000000';
$bgColor = '#ffffff';

$result = $imaging->qRCode($content, $width, $height, $fgColor, $bgColor);


function imageWatermark(
        $imageUrl,
        $watermarkUrl,
        $opacity = 50,
        $format = 'png',
        $position = 'center',
        $width = null,
        $height = null)

$imageUrl = 'image-url';
$watermarkUrl = 'watermark-url';
$opacity = 50;
$format = 'png';
$position = 'center';
$width = 19;
$height = 19;

$result = $imaging->imageWatermark($imageUrl, $watermarkUrl, $opacity, $format, $position, $width, $height);


function hTML5Render(
        $content,
        $format = 'PDF',
        $pageSize = 'A4',
        $title = null,
        $margin = 0,
        $marginLeft = 0,
        $marginRight = 0,
        $marginTop = 0,
        $marginBottom = 0,
        $landscape = false,
        $zoom = 1,
        $grayscale = false,
        $mediaPrint = false,
        $mediaQueries = false,
        $forms = false,
        $css = null,
        $imageWidth = 1024,
        $imageHeight = null,
        $renderDelay = 0,
        $headerTextLeft = null,
        $headerTextCenter = null,
        $headerTextRight = null,
        $headerSize = 9,
        $headerFont = 'Courier',
        $headerFontSize = 11,
        $headerLine = false,
        $footerTextLeft = null,
        $footerTextCenter = null,
        $footerTextRight = null,
        $footerSize = 9,
        $footerFont = 'Courier',
        $footerFontSize = 11,
        $footerLine = false,
        $pageWidth = null,
        $pageHeight = null)

$content = 'content';
$format = 'PDF';
$pageSize = 'A4';
$title = 'title';
$margin = 0;
$marginLeft = 0;
$marginRight = 0;
$marginTop = 0;
$marginBottom = 0;
$landscape = false;
$zoom = 1;
$grayscale = false;
$mediaPrint = false;
$mediaQueries = false;
$forms = false;
$css = 'css';
$imageWidth = 1024;
$imageHeight = 110;
$renderDelay = 0;
$headerTextLeft = 'header-text-left';
$headerTextCenter = 'header-text-center';
$headerTextRight = 'header-text-right';
$headerSize = 9;
$headerFont = 'Courier';
$headerFontSize = 11;
$headerLine = false;
$footerTextLeft = 'footer-text-left';
$footerTextCenter = 'footer-text-center';
$footerTextRight = 'footer-text-right';
$footerSize = 9;
$footerFont = 'Courier';
$footerFontSize = 11;
$footerLine = false;
$pageWidth = 110;
$pageHeight = 110;

$result = $imaging->hTML5Render($content, $format, $pageSize, $title, $margin, $marginLeft, $marginRight, $marginTop, $marginBottom, $landscape, $zoom, $grayscale, $mediaPrint, $mediaQueries, $forms, $css, $imageWidth, $imageHeight, $renderDelay, $headerTextLeft, $headerTextCenter, $headerTextRight, $headerSize, $headerFont, $headerFontSize, $headerLine, $footerTextLeft, $footerTextCenter, $footerTextRight, $footerSize, $footerFont, $footerFontSize, $footerLine, $pageWidth, $pageHeight);


$telephony = $client->getTelephony();

function verifySecurityCode($securityCode)

$securityCode = 'security-code';

$result = $telephony->verifySecurityCode($securityCode);


function hLRLookup(
        $number,
        $countryCode = null)

$number = 'number';
$countryCode = 'country-code';

$result = $telephony->hLRLookup($number, $countryCode);


function phonePlayback(
        $number,
        $audioUrl)

$number = 'number';
$audioUrl = 'audio-url';

$result = $telephony->phonePlayback($number, $audioUrl);


function sMSVerify(
        $number,
        $codeLength = 5,
        $securityCode = null,
        $countryCode = null,
        $languageCode = 'en')

$number = 'number';
$codeLength = 5;
$securityCode = 110;
$countryCode = 'country-code';
$languageCode = 'en';

$result = $telephony->sMSVerify($number, $codeLength, $securityCode, $countryCode, $languageCode);


function sMSMessage(
        $number,
        $message,
        $countryCode = null)

$number = 'number';
$message = 'message';
$countryCode = 'country-code';

$result = $telephony->sMSMessage($number, $message, $countryCode);


function phoneVerify(
        $number,
        $codeLength = 6,
        $securityCode = null,
        $playbackDelay = 800,
        $countryCode = null,
        $languageCode = 'en')

$number = 'number';
$codeLength = 6;
$securityCode = 110;
$playbackDelay = 800;
$countryCode = 'country-code';
$languageCode = 'en';

$result = $telephony->phoneVerify($number, $codeLength, $securityCode, $playbackDelay, $countryCode, $languageCode);


$dataTools = $client->getDataTools();

function emailValidate(
        $email,
        $fixTypos = false)

$email = 'email';
$fixTypos = false;

$result = $dataTools->emailValidate($email, $fixTypos);


function userAgentInfo($userAgent)

$userAgent = 'user-agent';

$result = $dataTools->userAgentInfo($userAgent);


function badWordFilter(
        $content,
        $censorCharacter = null)

$content = 'content';
$censorCharacter = 'censor-character';

$result = $dataTools->badWordFilter($content, $censorCharacter);


function convert(
        $fromValue,
        $fromType,
        $toType)

$fromValue = 'from-value';
$fromType = 'from-type';
$toType = 'to-type';

$result = $dataTools->convert($fromValue, $fromType, $toType);


function phoneValidate(
        $number,
        $countryCode = null,
        $ip = null)

$number = 'number';
$countryCode = 'country-code';
$ip = 'ip';

$result = $dataTools->phoneValidate($number, $countryCode, $ip);


$securityAndNetworking = $client->getSecurityAndNetworking();

function iPProbe($ip)

$ip = 'ip';

$result = $securityAndNetworking->iPProbe($ip);


function emailVerify(
        $email,
        $fixTypos = false)

$email = 'email';
$fixTypos = false;

$result = $securityAndNetworking->emailVerify($email, $fixTypos);


function iPBlocklist($ip)

$ip = 'ip';

$result = $securityAndNetworking->iPBlocklist($ip);


function hostReputation(
        $host,
        $listRating = 3)

$host = 'host';
$listRating = 3;

$result = $securityAndNetworking->hostReputation($host, $listRating);


$geolocation = $client->getGeolocation();

function geocodeReverse(
        $latitude,
        $longitude,
        $languageCode = 'en',
        $zoom = 'address')

$latitude = 'latitude';
$longitude = 'longitude';
$languageCode = 'en';
$zoom = 'address';

$result = $geolocation->geocodeReverse($latitude, $longitude, $languageCode, $zoom);


function iPInfo(
        $ip,
        $reverseLookup = false)

$ip = 'ip';
$reverseLookup = false;

$result = $geolocation->iPInfo($ip, $reverseLookup);


function geocodeAddress(
        $address,
        $countryCode = null,
        $languageCode = 'en',
        $fuzzySearch = false)

$address = 'address';
$countryCode = 'country-code';
$languageCode = 'en';
$fuzzySearch = false;

$result = $geolocation->geocodeAddress($address, $countryCode, $languageCode, $fuzzySearch);


$eCommerce = $client->getECommerce();

function bINLookup(
        $binNumber,
        $customerIp = null)

$binNumber = 'bin-number';
$customerIp = 'customer-ip';

$result = $eCommerce->bINLookup($binNumber, $customerIp);


$wWW = $client->getWWW();

function uRLInfo(
        $url,
        $fetchContent = false,
        $ignoreCertificateErrors = false,
        $timeout = 20)

$url = 'url';
$fetchContent = false;
$ignoreCertificateErrors = false;
$timeout = 20;

$result = $wWW->uRLInfo($url, $fetchContent, $ignoreCertificateErrors, $timeout);


function hTMLClean(
        $content,
        $outputType)

$content = 'content';
$outputType = 'output-type';

$result = $wWW->hTMLClean($content, $outputType);


function browserBot(
        $url,
        $timeout = 30,
        $delay = 3,
        $selector = null,
        $exec = null,
        $userAgent = null,
        $ignoreCertificateErrors = false)

$url = 'url';
$timeout = 30;
$delay = 3;
$selector = 'selector';
$exec = array('exec');
$userAgent = 'user-agent';
$ignoreCertificateErrors = false;

$result = $wWW->browserBot($url, $timeout, $delay, $selector, $exec, $userAgent, $ignoreCertificateErrors);