A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::open($save_path, $name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 132

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 292

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::read($session_id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 166

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::write($session_id, $session_data) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 235

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::destroy($session_id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 315

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 356

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 282

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_cookie_params(): Session cookie parameters cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 294

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 304

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 314

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 315

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 316

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 317

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 375

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 110

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Session cannot be started after headers have already been sent

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/controllers/Welcome.php
Line: 9
Function: __construct

File: /home/pedrorui/code.pedroruizhidalgo.es/api/v5/index.php
Line: 315
Function: require_once


Warning: "boolean" will be interpreted as a class name. Did you mean "bool"? Write "\boolean" to suppress this warning in /home/pedrorui/code.pedroruizhidalgo.es/api/v5/apprQZ2LZ/libraries/App.php on line 131
Api v5 Documentation

API Doc

Welcome to Api/v5/

Summary

Understanding Url's

Render Mode

Activate

Check IBAN

Currencies

ISO 4217

Exchange

Geolocation

Spanish NIF

Spanish CIF

To reset your APIKEY

Users

Access counter for free users

Script pdf server

Credit card validation

Barcodes

Qrcodes

Understanding the URL's

Any service call has https://code.pedroruizhidalgo.es/api/v5 as API root. Let's call it in this manual [apiroot]

For every service call you need to provide your own [apikey]. This can be obtained in https://pedroruizhidalgo.es/createapiaccount.

The [apikey] consists in a string of 32 character length.

The general url format is [apiroot]/[service]/[renderway]/[apikey].

For example: To get your user data visit [apiroot]/user/json/[apikey]

go to summary
Render mode

There are three ways to render the results:

  • json
  • xml
  • html

Ex: If you want to get your geolocation data in json format, call it like. [apiroot]/users/json/[apikey].

go to summary
Activate

A successfull process will display this screen:

After create your account you will receive an email like :

Of course, activation service has the three render ways. Nevertheless, if you follow the email's link, shall render in html, unless you type manually the url. Like this:

[apiroot]/activation/[rendermode]/[apikey]

go to summary
Check Iban

Access mode [apiroot]/checkiban/[rendermode]/[iban]/[apikey]

(This example was obtained when searching in google "example iban".)

{
    "account": "0532013000",
    "bank": "37040044",
    "bban": "370400440532013000",
    "branch": "",
    "checksum": "89",
    "country": "DE",
    "country_central": "Deutsche Bundesbank",
    "country_central_url": "http://www.bundesbank.de/",
    "human_format": "DE89 3704 0044 0532 0130 00",
    "nationalchecksum": ""
}
      

As you can see, we provide the iban decomposed format, human readable format, the sum of control and the national bank of this country, among others.

If iban is not valid we provide:

{
    "iban": "DE89370400440532013014",
    "validate": "false"
}      
      
go to summary
Currencies exchanges

Access mode: [apiroot]/currencies/[rendermode]/[apikey]

Bellow are shown not real exchanges. We present random data.

{
  "datetime": "2024-04-26 01:53:56",
  "currency": "EUR",
  "AED": 9.043293320594,
  "AFN": 8.7150969252526,
  "ALL": 9.8156194592899,
  "AMD": 5.5567693731546,
  "ANG": 9.1535089878149,
  "AOA": 4.6021500400278,
  "ARS": 3.5891662275368,
  "AUD": 9.9929442522083,
  "AWG": 8.0721974722446,
  "AZN": 7.4109481509826,
  "BAM": 8.5178739230697,
  "BBD": 4.856217562154,
  "BDT": 6.8474942384509,
  "BGN": 10.208079137936,
  "BHD": 8.6785517263592,
  "BIF": 5.3673099285771,
  "BMD": 7.8988417880139,
  "BND": 11.407070949398,
  "BOB": 6.6379189652567,
  "BRL": 7.7031202356811,
  "BSD": 4.3759541075565,
  "BTC": 7.9746103891985,
  "BTN": 9.1321790004765,
  "BWP": 6.2427504529444,
  "BYN": 3.7463633943099,
  "BYR": 5.5053085724382,
  "BZD": 3.8139118593251,
  "CAD": 10.535884528205,
  "CDF": 7.8262977133628,
  "CHF": 5.517278430293,
  "CLF": 9.0139520885488,
  "CLP": 5.1044031628894,
  "CNY": 9.0733488151214,
  "COP": 13.49018581281,
  "CRC": 10.489692821861,
  "CUC": 5.6260716964612,
  "CUP": 5.1643517204394,
  "CVE": 8.0813096794678,
  "CZK": 11.856784868919,
  "DJF": 9.4072396431152,
  "DKK": 7.337893655681,
  "DOP": 12.440703842528,
  "DZD": 8.165264646134,
  "EGP": 5.6790881639715,
  "ERN": 3.5195855761504,
  "ETB": 10.58749845046,
  "EUR": 1,
  "FJD": 3.8584944935788,
  "FKP": 6.795328151805,
  "GBP": 9.1304814080384,
  "GEL": 10.656114320576,
  "GGP": 9.072541952167,
  "GHS": 9.8745688665074,
  "GIP": 7.5856612392634,
  "GMD": 5.1385712070105,
  "GNF": 8.5378784116068,
  "GTQ": 5.3729156839535,
  "GYD": 9.1947689788392,
  "HKD": 7.2528343327589,
  "HNL": 7.9398784679081,
  "HRK": 5.2636284205428,
  "HTG": 3.2227705867136,
  "HUF": 7.1053854623369,
  "IDR": 8.9439636240452,
  "ILS": 8.9180553187235,
  "IMP": 9.5973784018296,
  "INR": 4.3556821045259,
  "IQD": 9.7493694861184,
  "IRR": 8.2931487231018,
  "ISK": 4.7097852233377,
  "JEP": 7.1530180313406,
  "JMD": 8.000005536247,
  "JOD": 9.9184162099466,
  "JPY": 5.4623759907961,
  "KES": 8.8964837593476,
  "KGS": 10.404928830175,
  "KHR": 8.4716316193676,
  "KMF": 6.0799555476196,
  "KPW": 5.3036697340681,
  "KRW": 4.1186428201006,
  "KWD": 4.4994262682737,
  "KYD": 6.4295684119824,
  "KZT": 4.4590661900393,
  "LAK": 9.5745153010704,
  "LBP": 8.3730600654953,
  "LKR": 9.2564063846396,
  "LRD": 12.708499682931,
  "LSL": 6.7130496994187,
  "LTL": 3.2498605001019,
  "LVL": 8.3035928184649,
  "LYD": 4.7417823834074,
  "MAD": 11.346110859116,
  "MDL": 7.3136458961822,
  "MGA": 5.0883858879508,
  "MKD": 7.943907924436,
  "MMK": 7.5108126427563,
  "MNT": 4.0187509856274,
  "MOP": 4.7367654148195,
  "MRO": 7.6655755353466,
  "MUR": 9.5887619813852,
  "MVR": 3.983772575382,
  "MWK": 10.826927537949,
  "MXN": 10.224396402586,
  "MYR": 7.6222866678714,
  "MZN": 13.939592992859,
  "NAD": 4.1638148823584,
  "NGN": 11.485395743272,
  "NIO": 5.0740352790216,
  "NOK": 5.4007383679975,
  "NPR": 6.8657856163875,
  "NZD": 5.0944491825506,
  "OMR": 12.214934603877,
  "PAB": 6.2032372756876,
  "PEN": 10.192700826653,
  "PGK": 4.7591871599477,
  "PHP": 6.5008327553518,
  "PKR": 4.3122685213165,
  "PLN": 6.8115245638469,
  "PYG": 9.6514729967581,
  "QAR": 8.8065170006857,
  "RON": 11.750997363474,
  "RSD": 7.4077636908776,
  "RUB": 10.190867329105,
  "RWF": 10.284669379836,
  "SAR": 6.9446193156506,
  "SBD": 7.8165796668346,
  "SCR": 4.2805819889906,
  "SDG": 9.5611204908048,
  "SEK": 8.0849502557353,
  "SGD": 5.6051778200107,
  "SHP": 5.8616139743764,
  "SLL": 6.6641287946441,
  "SOS": 6.8096104780257,
  "SRD": 8.6455074551727,
  "STD": 8.5588209952967,
  "SVC": 8.6468868519398,
  "SYP": 5.9583938657112,
  "SZL": 3.544914525256,
  "THB": 4.6230261859591,
  "TJS": 6.7970827840255,
  "TMT": 7.9284292608166,
  "TND": 4.7019336641309,
  "TOP": 7.6912523818627,
  "TRY": 3.1017353390817,
  "TTD": 6.2552581384104,
  "TWD": 9.7240474418383,
  "TZS": 3.2716912130228,
  "UAH": 7.9900293019554,
  "UGX": 8.6040845078435,
  "USD": 10.382868279881,
  "UYU": 6.9547247132076,
  "UZS": 10.909176836679,
  "VEF": 8.4038632015716,
  "VND": 9.3229632579363,
  "VUV": 8.8700678957953,
  "WST": 4.3723220659291,
  "XAF": 4.6853027309688,
  "XAG": 8.4079327180087,
  "XAU": 6.4137618189742,
  "XCD": 7.2087672186125,
  "XDR": 8.4169949625698,
  "XOF": 8.3976579640981,
  "XPF": 8.1604141942972,
  "YER": 4.2949402487348,
  "ZAR": 5.1785806311195,
  "ZMK": 3.1479089568127,
  "ZMW": 6.4973374011448,
  "ZWL": 11.535048140462
}
go to summary
ISO 4217 Currency Codes

The ISO 4217 code list is used in banking and business globally.

Access mode: [apiroot]/currencies/[coin_names]/[render]/[apikey]
{
    "AED": "United Arab Emirates Dirham",
    "AFN": "Afghanistan Afghani",
    "ALL": "Albania Lek",
    "AMD": "Armenia Dram",
    "ANG": "Netherlands Antilles Guilder",
    "AOA": "Angola Kwanza",
    "ARS": "Argentina Peso",
    "AUD": "Australia Dollar",
    "AWG": "Aruba Guilder",
    "AZN": "Azerbaijan Manat",
    "BAM": "Bosnia and Herzegovina Convertible Marka",
    "BBD": "Barbados Dollar",
    "BDT": "Bangladesh Taka",
    "BGN": "Bulgaria Lev",
    "BHD": "Bahrain Dinar",
    "BIF": "Burundi Franc",
    "BMD": "Bermuda Dollar",
...
    "VEF": "Venezuela Bolívar",
    "VND": "Viet Nam Dong",
    "VUV": "Vanuatu Vatu",
    "WST": "Samoa Tala",
    "XAF": "Communauté Financière Africaine (BEAC) CFA Franc BEAC",
    "XCD": "East Caribbean Dollar",
    "XDR": "International Monetary Fund (IMF) Special Drawing Rights",
    "XOF": "Communauté Financière Africaine (BCEAO) Franc",
    "XPF": "Comptoirs Français du Pacifique (CFP) Franc",
    "YER": "Yemen Rial",
    "ZAR": "South Africa Rand",
    "ZMW": "Zambia Kwacha",
    "ZWD": "Zimbabwe Dollar"
}          
      
go to summary
Exchange service

Alias of currency service

go to summary
Geolocation

Access mode: [apiroot]/geolocation/[rendermode]/[apikey]/[optional IP address]

Call geolocation service whith out the optional IP address for get your own IP. In other words, if you do not provide an IP address, the service will proccess your current IP address.

{
    "area_code": "",
    "city": "",
    "continent": "North America",
    "continent_code": "NA",
    "country_code": "US",
    "country_name": "United States",
    "currency": "USD",
    "currency_simbol": "$",
    "currency_utf8": "$",
    "current_time": "2018-10-25 21:22:50",
    "in_eu": "no",
    "IP": "70.110.40.10",
    "latitude": "37.751",
    "longitude": "-97.822",
    "region": "",
    "region_code": "",
    "region_name": "",
    "tax_percent": false,
    "time_zone": "",
    "usdollar_to_usd": "1"
}    
  

An egyptian example.

{
    "area_code": "",
    "city": "Cairo",
    "continent": "Africa",
    "continent_code": "AF",
    "country_code": "EG",
    "country_name": "Egypt",
    "currency": "EGP",
    "currency_simbol": "£",
    "currency_utf8": "£",
    "current_time": "2018-10-25 21:24:34",
    "in_eu": "no",
    "IP": "45.100.28.10",
    "latitude": "30.0771",
    "longitude": "31.2859",
    "region": "Cairo Governorate",
    "region_code": "C",
    "region_name": "Cairo Governorate",
    "tax_percent": false,
    "time_zone": "Africa/Cairo",
    "usdollar_to_egp": "17.953"
}      
  

Another european example:

{
    "area_code": "",
    "city": "",
    "continent": "Europe",
    "continent_code": "EU",
    "country_code": "IT",
    "country_name": "Italy",
    "currency": "EUR",
    "currency_simbol": "€",
    "currency_utf8": "€",
    "current_time": "2018-10-25 21:26:12",
    "in_eu": "yes",
    "IP": "94.80.188.102",
    "latitude": "43.1479",
    "longitude": "12.1097",
    "region": "",
    "region_code": "",
    "region_name": "",
    "tax_percent": 22,
    "time_zone": "Europe/Rome",
    "usdollar_to_eur": "0.8765"
}
  

As you can observe, we convert the currency from us dollar to local.

go to summary
Spanish NIF / NIE

There are two identification documents for people in Spain. NIF (means Fiscal Identification Number), and NIE (means Foreign Identification Number).

The NIF, has eight numbers and a leter as checksum. And NIE consists in first letter (X,Y or Z), seven digits an identical letter as checksum.

This software is provided as is. We have no responsibility for the use for the end user.

Access mode: [apiroot]/spanishdni/[rendermode]/[NIF or NIE]/[apikey]

Ex: https://code.pedroruizhidalgo.es/api/v5/spanishcif/json/12378978V/[apikey]

{
    "literal": "Z",
    "numeral": "12345678",
    "raw_literal": "V",
    "validate": "false"
}
    

But I can amend it like;

https://code.pedroruizhidalgo.es/api/v5/spanishcif/json/12345678Z/[apikey], to get:

{
    "literal": "Z",
    "numeral": "12345678",
    "raw_literal": "Z",
    "validate": "true"
}
    

Let's try now with a NIE.

{
    "literal": "L",
    "numeral": "1234567",
    "raw_literal": "P",
    "validate": "false"
}
    

And now with the correct letter...

{
    "literal": "L",
    "numeral": "1234567",
    "raw_literal": "L",
    "validate": "true"
}
    

I'm sure you understand the advantages...

go to summary
Spanish CIF

Each company in Spain has a code associated with tax purposes. This code is called CIF.

The CIF code determines the type of company and the province to which it belongs. We decompose the code and present the extracted data.

Access mode: [apiroot]/spanishcif/A12345678/json/[apikey] will show...

{
  "abbreviation": "SA, SAL, SAU, SAE",
  "check_sum": 0,
  "checksum_type": "Number",
  "province": "Castellón",
  "province_code": "12",
  "raw_number": "34567",
  "raw_type": "A",
  "type": "Sociedad Anónima",
  "validate": "false"
}
   

If we correct the checsum... [apiroot]/spanishcif/A12345670/json/[apikey]

{
  "abbreviation": "SA, SAL, SAU, SAE",
  "check_sum": 0,
  "checksum_type": "Number",
  "province": "Castellón",
  "province_code": "12",
  "raw_number": "34567",
  "raw_type": "A",
  "type": "Sociedad Anónima",
  "validate": "true"
}
  

You dig it?...

go to summary
Reset APIKEY

Navigate to https://pedroruizhidalgo.es/resetapikey and follow instructions.

Enter your registered email if you are non free user, and follow instructions... Finallly, we will email you a new APIKEY.

go to summary
Users

Access way: [apiroot]/users/[rendermode]/[apikey]

Enter your registered email, and go on... We will email you a new APIKEY.

{
    "activation_code": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "active": "1",
    "can_activate": "1",
    "company": "",
    "date_creation": "2018-10-22 18:08:44",
    "date_modification": "2018-10-26 09:35:30",
    "email": "your@email.com",
    "first_name": "Free",
    "forgotten_password_code": "",
    "forgotten_password_time": "0",
    "lang": "en",
    "last_login": "2018-10-26 11:35:30",
    "last_name": "User",
    "phone": "",
    "remember_code": "",
    "username": "freeuser"
}
go to summary
Access counter for free users

Access mode: [apiroot]/getconnectioncounter/[rendermode]/[apikey]

It does not make sense for users who are not free.

{
    "count": 9,
    "user": "freeuser"
}
   

If you are not a free user will obtain that:

{
  "count": "Your plan is not countable",
  "user": "nonfreeuser"
}
   
go to summary
Pdf file server

Access mode: [apiroot]/servepdf/[rendermode]/[apikey]

The post format content is divided in sections. Each section name must be enclosed in square brackets. These are:

  • [header]
  • [armor]
  • [loop]
  • [afterloop]
  • [footer]
  • [pagename]
  • [filename]
  • [utf8]

We use the FPDF syntax. Every single line content is separated by comma, and its structure is very simple. The first item must be the PFDF, function name (see manual) and it follows, allways separated by comma, the rest of params. Send the script using http POST as raw text.

[armor] is a end part of [head].

[afterloop] is executed immediately after [loop] section.

[filename] only needs one only row, where you describe the final name of your document.

If you declare [utf8] (as void section) your final document will be utf8 encoded.

[header]
image,assets/img/logo.png,65,13,15,15
SetFont,Arial,B,13
cell,30
cell,120,10,API SERVICES V5,0,0,C
ln,5
setfont,arial,,8
cell,30
cell,120,8,@pedroruizhidalg,0,1,C
cell,30
SetFont,times,i,10
settextcolor,180,180,180
cell,120,3,"Coding the world since 1983!",0,1,C
ln,10
SetFont,Arial,B,8
settextcolor,0,0,0

[armor]
cell,10,4.5,Num,1,0,C
cell,50,4.5,Name,1,0,C
cell,50,4.5,Address,1,0,C
cell,20,4.5,Phone,1,0,C
cell,50,4.5,Email,1,1,C
SetFont,Arial,,8

[loop]
1,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com
2,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com
3,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com
4,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com
5,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com
6,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com
7,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com
8,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com
9,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com
10,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com

...

95,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com
96,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com
97,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com
98,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com
99,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com
100,Lorem ipsum dolor sit amet,Praesent varius tellus id urna ida,Integer ut,quam@pellentesque.com

[afterloop]
ln,10
setx,30
cell,30,4.5,This text goes after loop.,0,1,L
setx,30
cell,30,4.5,Try it and enjoy!,0,1,L
[footer]
sety,-15
setfont,arial,i,8


[footer]
sety,-15
setfont,arial,i,8

[pagename]
Spanish accent Página

[filename]
prueba.pdf

[response]
download




   

See the sample generated by code above.

go to summary
Credit card validation

Access mode: [apiroot]/creditcardvalidate/[rendermode]/[card name]/[card number]/[apikey]

Card name can be one of this values:

  • [visaelectron], as Visa Electron.
  • [forbrugsforeningen] as Forbrugsforeningen.
  • [dankort] as Dankort.
  • [visa] as Visa.
  • [mastercard] as Master Card.
  • [amex] as American Express.
  • [dinersclub] as Diner's Club.
  • [Discover] as Discover.
  • [unionpay] as Union Pay.
  • [jcb] as JCB.

By example: https://code.pedroruizhidalgo.es/api/v5/creditcardvalidate/json/amex/378282246310005/[apikey]

Responses as:

{
    "cardnum": "378282246310005",
    "cardtype": "amex",
    "human_format": "3782 8224 6310 005",
    "message": "your 'amex' credit card is valid",
    "validation": "true"
}
or
{
    "cardnum": "23423423",
    "cardtype": "amex",
    "human_format": "null",
    "message": "sorry, your 'amex' credit card is not valid",
    "validation": "false"
}
go to summary
Barcodes

Access mode: [apiroot]/barcodes/

All input data must be provided in json format as HTTP POST request method as is below shown:

{
	"data_to_code" : "data to encode",
	"apikey" : "youruserapikey",
	"type_result" : "type_result",
	"codification" : "BAR_CODE_TYPE"
}

Type Results:

  • jpg
  • png
  • svg
  • html

BAR_CODE_TYPE, one of:

  • TYPE_CODE_39
  • TYPE_CODE_39_CHECKSUM
  • TYPE_CODE_39E
  • TYPE_CODE_39E_CHECKSUM
  • TYPE_CODE_93
  • TYPE_STANDARD_2_5
  • TYPE_STANDARD_2_5_CHECKSUM
  • TYPE_INTERLEAVED_2_5
  • TYPE_INTERLEAVED_2_5_CHECKSUM
  • TYPE_CODE_128
  • TYPE_CODE_128_A
  • TYPE_CODE_128_B
  • TYPE_CODE_128_C
  • TYPE_EAN_2
  • TYPE_EAN_5
  • TYPE_EAN_8
  • TYPE_EAN_13
  • TYPE_UPC_A
  • TYPE_UPC_E
  • TYPE_MSI
  • TYPE_MSI_CHECKSUM
  • TYPE_POSTNET
  • TYPE_PLANET
  • TYPE_RMS4CC
  • TYPE_KIX
  • TYPE_IMB
  • TYPE_CODABAR
  • TYPE_CODE_11
  • TYPE_PHARMA_CODE
  • TYPE_PHARMA_CODE_TWO_TRACKS

Keep in mind not all type of barcode, by its own definition, can produce alphanumerical data.

Type Alphanumerical
TYPE_CODE_39 yes
TYPE_CODE_39_CHECKSUM yes
TYPE_CODE_39E yes
TYPE_CODE_39E_CHECKSUM yes
TYPE_CODE_93 yes
TYPE_STANDARD_2_5 no
TYPE_STANDARD_2_5_CHECKSUM no
TYPE_INTERLEAVED_2_5 no
TYPE_INTERLEAVED_2_5_CHECKSUM no
TYPE_CODE_128 no
TYPE_CODE_128_A no
TYPE_CODE_128_B no
TYPE_CODE_128_C no
TYPE_EAN_2 no
TYPE_EAN_5 no
TYPE_EAN_8 no
TYPE_EAN_13 no
TYPE_UPC_A yes
TYPE_UPC_E yes
TYPE_MSI no
TYPE_MSI_CHECKSUM no
TYPE_POSTNET no
TYPE_PLANET no
TYPE_RMS4CC no
TYPE_KIX no
TYPE_IMB no
TYPE_CODABAR no
TYPE_CODE_11 no
TYPE_PHARMA_CODE no
TYPE_PHARMA_CODE_TWO_TRACKS no

An example as response of:

{
	"data_to_code" : "test code bar",
	"apikey" : "verysecretapikey",
	"type_result" : "html",
	"codification" : "TYPE_CODE_39"
}

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

go to summary
Qrcodes

Access mode: [apiroot]/qrcodes/

All input data must be provided in json format as HTTP POST request method as is below shown:

{
	"data" : "this is the data to codify",
	"apikey" : "yourverysecretapikey",
	"level" : "M",
	"size" : 3,
	"black" : "255,255,255",
	"quality" : true,
	"white" : "0,0,255"
}

Free users can send data and apikey.

To convert the API request to an image, you can do something like that: (For convenience, we expose the code in PHP, but you can do it with you preferred language)

$post = json_encode( array(
          "data" => "your text to code",
          "apikey" => "yourapikey",
          "level" => "M",
          "size" => 4,
          "black" => "255,255,255",
          "quality" => true,
          "white" => "30,30,255"
        )
      );
      $ch = curl_init('https://code.pedroruizhidalgo.es/api/v5/qrcodes');
      curl_setopt( $ch , CURLOPT_CUSTOMREQUEST , "POST");    
      curl_setopt( $ch , CURLOPT_POSTFIELDS , $post );
      curl_setopt( $ch , CURLOPT_RETURNTRANSFER , true );
      curl_setopt( $ch , CURLOPT_HTTPHEADER , array (                                                                          
        'Content-Type: application/json',                                                                                
        'Content-Length: ' . strlen($post))                                                                       
      );
      $result = curl_exec(  $ch );
and finally...
      echo <img src="data:image/png;base64,' . base64_encode ( $result ) . '">';
This image is generated on the fly whith the current date: 2024-04-26 01:53:56, check it!

go to summary

As the limit of a function that never reaches the value, this manual, this API and their services, are under continue construction.


A PHP Error was encountered

Severity: Compile Warning

Message: "boolean" will be interpreted as a class name. Did you mean "bool"? Write "\boolean" to suppress this warning

Filename: libraries/App.php

Line Number: 131

Backtrace: