Download the PHP package neutrinoapi/neutrinoapi_php_sdk without Composer
On this page you can find all versions of the php package neutrinoapi/neutrinoapi_php_sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download neutrinoapi/neutrinoapi_php_sdk
More information about neutrinoapi/neutrinoapi_php_sdk
Files in neutrinoapi/neutrinoapi_php_sdk
Package neutrinoapi_php_sdk
Short Description The general-purpose API
License MIT
Homepage https://www.neutrinoapi.com/
Informations about the package neutrinoapi_php_sdk
Getting started
The general-purpose API
Initialization
Authentication
In order to setup authentication and initialization of the API client, you need the following information.
Parameter | Description |
---|---|
userId | Your user ID |
apiKey | Your API key |
API client can be initialized as following.
Class Reference
List of Controllers
- Imaging
- Telephony
- DataTools
- SecurityAndNetworking
- Geolocation
- ECommerce
- WWW
Imaging
Get singleton instance
The singleton instance of the class can be accessed from the API Client.
imageResize
Resize an image and output as either JPEG or PNG. See: https://www.neutrinoapi.com/api/image-resize/
Parameters
Parameter | Tags | Description |
---|---|---|
imageUrl | The URL to the source image | |
width | The width to resize to (in px) while preserving aspect ratio | |
height | The height to resize to (in px) while preserving aspect ratio | |
format | The output image format, can be either png or jpg |
Example Usage
qRCode
Generate a QR code as a PNG image. See: https://www.neutrinoapi.com/api/qr-code/
Parameters
Parameter | Tags | Description |
---|---|---|
content | The content to encode into the QR code (e.g. a URL or a phone number) | |
width | The width of the QR code (in px) | |
height | The height of the QR code (in px) | |
fgColor | The QR code foreground color | |
bgColor | The QR code background color |
Example Usage
imageWatermark
Watermark one image with another image. See: https://www.neutrinoapi.com/api/image-watermark/
Parameters
Parameter | Tags | Description |
---|---|---|
imageUrl | The URL to the source image | |
watermarkUrl | The URL to the watermark image | |
opacity | The opacity of the watermark (0 to 100) | |
format | The output image format, can be either png or jpg | |
position | The position of the watermark image, possible values are: center, top-left, top-center, top-right, bottom-left, bottom-center, bottom-right | |
width | If set resize the resulting image to this width (in px) while preserving aspect ratio | |
height | If set resize the resulting image to this height (in px) while preserving aspect ratio |
Example Usage
hTML5Render
Render HTML content to PDF, JPG or PNG. See: https://www.neutrinoapi.com/api/html5-render/
Parameters
Parameter | Tags | Description |
---|---|---|
content | The HTML content. This can be either a URL to load HTML from or an actual HTML content string | |
format | Which format to output, available options are: PDF, PNG, JPG | |
pageSize | Set the document page size, can be one of: A0 - A9, B0 - B10, Comm10E, DLE or Letter | |
title | The document title | |
margin | The document margin (in mm) | |
marginLeft | The document left margin (in mm) | |
marginRight | The document right margin (in mm) | |
marginTop | The document top margin (in mm) | |
marginBottom | The document bottom margin (in mm) | |
landscape | Set the document to lanscape orientation | |
zoom | Set the zoom factor when rendering the page (2.0 for double size, 0.5 for half size) | |
grayscale | Render the final document in grayscale | |
mediaPrint | Use @media print CSS styles to render the document | |
mediaQueries | Activate all @media queries before rendering. This can be useful if you wan't to render the mobile version of a responsive website | |
forms | Generate real (fillable) PDF forms from HTML forms | |
css | Inject custom CSS into the HTML. e.g. 'body { background-color: red;}' | |
imageWidth | If rendering to an image format (PNG or JPG) use this image width (in pixels) | |
imageHeight | If rendering to an image format (PNG or JPG) use this image height (in pixels). The default is automatic which dynamically sets the image height based on the content | |
renderDelay | Number of milliseconds to wait before rendering the page (can be useful for pages with animations etc) | |
headerTextLeft | Text to print to the left-hand side header of each page. e.g. 'My header - Page {page_number} of {total_pages}' | |
headerTextCenter | Text to print to the center header of each page | |
headerTextRight | Text to print to the right-hand side header of each page | |
headerSize | The height of your header (in mm) | |
headerFont | Set the header font. Fonts available: Times, Courier, Helvetica, Arial | |
headerFontSize | Set the header font size (in pt) | |
headerLine | Draw a full page width horizontal line under your header | |
footerTextLeft | Text to print to the left-hand side footer of each page. e.g. 'My footer - Page {page_number} of {total_pages}' | |
footerTextCenter | Text to print to the center header of each page | |
footerTextRight | Text to print to the right-hand side header of each page | |
footerSize | The height of your footer (in mm) | |
footerFont | Set the footer font. Fonts available: Times, Courier, Helvetica, Arial | |
footerFontSize | Set the footer font size (in pt) | |
footerLine | Draw a full page width horizontal line above your footer | |
pageWidth | Set the PDF page width explicitly (in mm) | |
pageHeight | Set the PDF page height explicitly (in mm) |
Example Usage
Back to List of Controllers
Telephony
Get singleton instance
The singleton instance of the class can be accessed from the API Client.
verifySecurityCode
Check if a security code from one of the verify APIs is valid. See: https://www.neutrinoapi.com/api/verify-security-code/
Parameters
Parameter | Tags | Description |
---|---|---|
securityCode | The security code to verify |
Example Usage
hLRLookup
Connect to the global mobile cellular network and retrieve the status of a mobile device. See: https://www.neutrinoapi.com/api/hlr-lookup/
Parameters
Parameter | Tags | Description |
---|---|---|
number | A phone number | |
countryCode | ISO 2-letter country code, assume numbers are based in this country. If not set numbers are assumed to be in international format (with or without the leading + sign) |
Example Usage
phonePlayback
Make an automated call to any valid phone number and playback an audio message. See: https://www.neutrinoapi.com/api/phone-playback/
Parameters
Parameter | Tags | Description |
---|---|---|
number | The phone number to call. Must be in valid international format | |
audioUrl | A URL to a valid audio file. Accepted audio formats are:
|
Example Usage
sMSVerify
Send a unique security code to any mobile device via SMS. See: https://www.neutrinoapi.com/api/sms-verify/
Parameters
Parameter | Tags | Description |
---|---|---|
number | The phone number to send a verification code to | |
codeLength | The number of digits to use in the security code (must be between 4 and 12) | |
securityCode | Pass in your own security code. This is useful if you have implemented TOTP or similar 2FA methods. If not set then we will generate a secure random code | |
countryCode | ISO 2-letter country code, assume numbers are based in this country. If not set numbers are assumed to be in international format (with or without the leading + sign) | |
languageCode | The language to send the verification code in, available languages are:
|
Example Usage
sMSMessage
Send a free-form message to any mobile device via SMS. See: https://www.neutrinoapi.com/api/sms-message/
Parameters
Parameter | Tags | Description |
---|---|---|
number | The phone number to send a message to | |
message | The SMS message to send. Messages are truncated to a maximum of 150 characters for ASCII content OR 70 characters for UTF content | |
countryCode | ISO 2-letter country code, assume numbers are based in this country. If not set numbers are assumed to be in international format (with or without the leading + sign) |
Example Usage
phoneVerify
Make an automated call to any valid phone number and playback a unique security code. See: https://www.neutrinoapi.com/api/phone-verify/
Parameters
Parameter | Tags | Description |
---|---|---|
number | The phone number to send the verification code to | |
codeLength | Optional DefaultValue |
The number of digits to use in the security code (between 4 and 12) |
securityCode | Optional |
Pass in your own security code. This is useful if you have implemented TOTP or similar 2FA methods. If not set then we will generate a secure random code |
playbackDelay | Optional DefaultValue |
The delay in milliseconds between the playback of each security code |
countryCode | Optional |
ISO 2-letter country code, assume numbers are based in this country. If not set numbers are assumed to be in international format (with or without the leading + sign) |
languageCode | Optional DefaultValue |
The language to playback the verification code in, available languages are:
|
Example Usage
Back to List of Controllers
DataTools
Get singleton instance
The singleton instance of the DataTools
class can be accessed from the API Client.
emailValidate
Parse, validate and clean an email address. See: https://www.neutrinoapi.com/api/email-validate/
Parameters
Parameter | Tags | Description |
---|---|---|
Required |
An email address | |
fixTypos | Optional DefaultValue |
Automatically attempt to fix typos in the address |
Example Usage
userAgentInfo
Parse, validate and get detailed user-agent information from a user agent string. See: https://www.neutrinoapi.com/api/user-agent-info/
Parameters
Parameter | Tags | Description |
---|---|---|
userAgent | Required |
A user agent string |
Example Usage
badWordFilter
Detect bad words, swear words and profanity in a given text. See: https://www.neutrinoapi.com/api/bad-word-filter/
Parameters
Parameter | Tags | Description |
---|---|---|
content | Required |
The content to scan. This can be either a URL to load content from or an actual content string |
censorCharacter | Optional |
The character to use to censor out the bad words found |
Example Usage
convert
A powerful unit conversion tool. See: https://www.neutrinoapi.com/api/convert/
Parameters
Parameter | Tags | Description |
---|---|---|
fromValue | Required |
The value to convert from (e.g. 10.95) |
fromType | Required |
The type of the value to convert from (e.g. USD) |
toType | Required |
The type to convert to (e.g. EUR) |
Example Usage
phoneValidate
Parse, validate and get location information about a phone number. See: https://www.neutrinoapi.com/api/phone-validate/
Parameters
Parameter | Tags | Description |
---|---|---|
number | Required |
A phone number. This can be in international format (E.164) or local format. If passing local format you should use the 'country-code' or 'ip' options as well |
countryCode | Optional |
ISO 2-letter country code, assume numbers are based in this country. If not set numbers are assumed to be in international format (with or without the leading + sign) |
ip | Optional |
Pass in a users IP address and we will assume numbers are based in the country of the IP address |
Example Usage
Back to List of Controllers
SecurityAndNetworking
Get singleton instance
The singleton instance of the SecurityAndNetworking
class can be accessed from the API Client.
iPProbe
Analyze and extract provider information for an IP address. See: https://www.neutrinoapi.com/api/ip-probe/
Parameters
Parameter | Tags | Description |
---|---|---|
ip | Required |
IPv4 or IPv6 address |
Example Usage
emailVerify
SMTP based email address verification. See: https://www.neutrinoapi.com/api/email-verify/
Parameters
Parameter | Tags | Description |
---|---|---|
Required |
An email address | |
fixTypos | Optional DefaultValue |
Automatically attempt to fix typos in the address |
Example Usage
iPBlocklist
The IP Blocklist API will detect potentially malicious or dangerous IP addresses. See: https://www.neutrinoapi.com/api/ip-blocklist/
Parameters
Parameter | Tags | Description |
---|---|---|
ip | Required |
An IPv4 or IPv6 address |
Example Usage
hostReputation
Check the reputation of an IP address, domain name, FQDN or URL against a comprehensive list of blacklists and blocklists. See: https://www.neutrinoapi.com/api/host-reputation/
Parameters
Parameter | Tags | Description |
---|---|---|
host | Required |
An IP address, domain name, FQDN or URL. If you supply a domain/URL it will be checked against the URI DNSBL lists |
listRating | Optional DefaultValue |
Only check lists with this rating or better |
Example Usage
Back to List of Controllers
Geolocation
Get singleton instance
The singleton instance of the Geolocation
class can be accessed from the API Client.
geocodeReverse
Convert a geographic coordinate (latitude and longitude) into a real world address. See: https://www.neutrinoapi.com/api/geocode-reverse/
Parameters
Parameter | Tags | Description |
---|---|---|
latitude | Required |
The location latitude in decimal degrees format |
longitude | Required |
The location longitude in decimal degrees format |
languageCode | Optional DefaultValue |
The language to display results in, available languages are:
|
zoom | Optional DefaultValue |
The zoom level to respond with:
|
Example Usage
iPInfo
Get location information about an IP address and do reverse DNS (PTR) lookups. See: https://www.neutrinoapi.com/api/ip-info/
Parameters
Parameter | Tags | Description |
---|---|---|
ip | Required |
IPv4 or IPv6 address |
reverseLookup | Optional DefaultValue |
Do a reverse DNS (PTR) lookup. This option can add extra delay to the request so only use it if you need it |
Example Usage
geocodeAddress
Geocode an address, partial address or just the name of a place. See: https://www.neutrinoapi.com/api/geocode-address/
Parameters
Parameter | Tags | Description |
---|---|---|
address | Required |
The address, partial address or name of a place to try and locate |
countryCode | Optional |
The ISO 2-letter country code to be biased towards (the default is no country bias) |
languageCode | Optional DefaultValue |
The language to display results in, available languages are:
|
fuzzySearch | Optional DefaultValue |
If no matches are found for the given address, start performing a recursive fuzzy search until a geolocation is found. This option is recommended for processing user input or implementing auto-complete. We use a combination of approximate string matching and data cleansing to find possible location matches |
Example Usage
Back to List of Controllers
ECommerce
Get singleton instance
The singleton instance of the ECommerce
class can be accessed from the API Client.
bINLookup
Perform a BIN (Bank Identification Number) or IIN (Issuer Identification Number) lookup. See: https://www.neutrinoapi.com/api/bin-lookup/
Parameters
Parameter | Tags | Description |
---|---|---|
binNumber | Required |
The BIN or IIN number (the first 6 digits of a credit card number) |
customerIp | Optional |
Pass in the customers IP address and we will return some extra information about them |
Example Usage
Back to List of Controllers
WWW
Get singleton instance
The singleton instance of the WWW
class can be accessed from the API Client.
uRLInfo
Parse, analyze and retrieve content from the supplied URL. See: https://www.neutrinoapi.com/api/url-info/
Parameters
Parameter | Tags | Description |
---|---|---|
url | Required |
The URL to probe |
fetchContent | Optional DefaultValue |
If this URL responds with html, text, json or xml then return the response. This option is useful if you want to perform further processing on the URL content (e.g. with the HTML Extract or HTML Clean APIs) |
ignoreCertificateErrors | Optional DefaultValue |
Ignore any TLS/SSL certificate errors and load the URL anyway |
timeout | Optional DefaultValue |
Timeout in seconds. Give up if still trying to load the URL after this number of seconds |
Example Usage
hTMLClean
Clean and sanitize untrusted HTML. See: https://www.neutrinoapi.com/api/html-clean/
Parameters
Parameter | Tags | Description |
---|---|---|
content | Required |
The HTML content. This can be either a URL to load HTML from or an actual HTML content string |
outputType | Required |
The level of sanitization, possible values are: plain-text: reduce the content to plain text only (no HTML tags at all) simple-text: allow only very basic text formatting tags like b, em, i, strong, u basic-html: allow advanced text formatting and hyper links basic-html-with-images: same as basic html but also allows image tags advanced-html: same as basic html with images but also allows many more common HTML tags like table, ul, dl, pre |
Example Usage
browserBot
Browser bot can extract content, interact with keyboard and mouse events, and execute JavaScript on a website. See: https://www.neutrinoapi.com/api/browser-bot/
Parameters
Parameter | Tags | Description |
---|---|---|
url | Required |
The URL to load |
timeout | Optional DefaultValue |
Timeout in seconds. Give up if still trying to load the page after this number of seconds |
delay | Optional DefaultValue |
Delay in seconds to wait before capturing any page data, executing selectors or JavaScript |
selector | Optional |
Extract content from the page DOM using this selector. Commonly known as a CSS selector, you can find a good reference here |
exec | Optional Collection |
Execute JavaScript on the page. Each array element should contain a valid JavaScript statement in string form. If a statement returns any kind of value it will be returned in the 'exec-results' response. For your convenience you can also use the following special shortcut functions: sleep(seconds); Just wait/sleep for the specified number of seconds. click('selector'); Click on the first element matching the given selector. focus('selector'); Focus on the first element matching the given selector. keys('characters'); Send the specified keyboard characters. Use click() or focus() first to send keys to a specific element. enter(); Send the Enter key. tab(); Send the Tab key. Example: [ "click('#button-id')", "sleep(1)", "click('.field-class')", "keys('1234')", "enter()" ] |
userAgent | Optional |
Override the browsers default user-agent string with this one |
ignoreCertificateErrors | Optional DefaultValue |
Ignore any TLS/SSL certificate errors and load the page anyway |
Example Usage
Back to List of Controllers
All versions of neutrinoapi_php_sdk with dependencies
ext-curl Version *
ext-json Version *
ext-mbstring Version *
mashape/unirest-php Version ~3.0.1
apimatic/jsonmapper Version ~1.3.0