Archive for January, 2018

#KBA API for Germany based on #Kraftfahrt-Bundesamt data


We just launched this morning, which is an API that allows a lookup of the German KBA (“Kraftfahrt-Bundesamt”) data. Unlike other countries in the network, the German API accepts KBA numbers instead of number plates.

The data can be purchased as a CSV import for your own database here

A KBA number (“Kraftfahrt-Bundesamt”) is a unique number under which is registered with the Federal Motor Transport Authority. The KBA number can be found on the vehicle registration in boxes 2 and 3 or in the registration certificate Part 1 under 2.1.
and 2.2. This API is accessed via the /CheckGermany endpoint, where KBANumber is in the format HSN/TSN (Herstellerschlüsselnummer / Typschlüsselnummer), it returns the following data:
● Make & Model
● Engine Size in KW and HorsePower (PS)
● Engine Capacity
● Fuel type
● Representative image
Sample KBA Number:
Sample Json:
“Description”: “ALFA GIULIETTA Spider 1.3 [196101 – 196212] (59kW 80hp Otto AR 00508)”,
“CarMake”: {
“CurrentTextValue”: “alfa romeo”
“CarModel”: {
“CurrentTextValue”: “GIULIETTA SPIDER”
“MakeDescription”: {
“CurrentTextValue”: “alfa romeo”
“ModelDescription”: {
“CurrentTextValue”: “GIULIETTA SPIDER”
“PowerKW”: 59,
“PowerHP”: 80,
“EngineSize”: 1281,
“Fuel”: “Benzin”,

Categories: Uncategorized

#Jquery #Ajax progress indicator


If you are using JQuery Ajax to upload a file, or other large blob of data, you might want to show the user that something is happening, rather than just showing an animated gif.

Here’s a JQuery Plugin by Chad Engler which can extend the default $.ajax behavior to report progress updates as a percentage.

(function ($, window, undefined) {
//is onprogress supported by browser?
var hasOnProgress = (“onprogress” in $.ajaxSettings.xhr());

//If not supported, do nothing
if (!hasOnProgress) {

//patch ajax settings to call a progress callback
var oldXHR = $.ajaxSettings.xhr;
$.ajaxSettings.xhr = function () {
var xhr = oldXHR.apply(this, arguments);
if (xhr instanceof window.XMLHttpRequest) {
xhr.addEventListener(‘progress’, this.progress, false);

if (xhr.upload) {
xhr.upload.addEventListener(‘progress’, this.progress, false);

return xhr;
})(jQuery, window);

To use it, you would write code allong the lines of:

Upload: function(data,  callback, progressCallback)
var strUrl = “/Upload.aspx”;
method: ‘POST’,
url: strUrl,
dataType: ‘json’,
data: {
Data: data
success: function (result)
error: function () { },
progress: function (e) {
if (e.lengthComputable) {
progressCallback(Math.round(e.loaded / * 100));

I’ve just used this on the upload feature of

Categories: Uncategorized

Make an authenticated #Http Request with #Kotlin


Kotlin is a superscript of Java, and the next big thing in Android programming, so it’s worth taking a little dabble in the language, to do something basic.

Beyond Hello World, I always see if I can use it to call an API, which of course, my example below is of – a car registration API. You’ll need to get your own username and password at the website to try out the below code.

Create a file called Http.kt as below;

import java.util.Base64;

fun main(vararg args: String) {
val response = sendGet(“”,”**username**”,”**password**”);


private fun sendGet(url: String, username: String, password: String ) : String {
val connection = URL(url).openConnection() as HttpURLConnection
val auth = Base64.getEncoder().encode((username + “:” + password).toByteArray()).toString(Charsets.UTF_8)
connection.addRequestProperty(“Authorization”, “Basic $auth”)
val text = connection.inputStream.use { it.reader().use { reader -> reader.readText() } }
return text;

Compile the JAR using the code;

kotlinc http.kt -include-runtime -d http.jar

Then run it by using;

java -jar http.jar

and you should get the output

“ABICode”:”21057867″,”Description”:”2015 Honda Civic Type R Gt, 1996CC Petrol, 5DR, Manual”,”RegistrationYear”:”2015″,”CarMake”:{“CurrentTextValue”:”Honda”},”CarModel”:{“CurrentTextValue”:”Civic”},”EngineSize”:{“CurrentTextValue”:”1996CC”},”FuelType”:{“CurrentTextValue”:”Petrol”},”MakeDescription”:”Honda”,”ModelDescription”:”Civic”,”Immobiliser”:{“CurrentTextValue”:””},”NumberOfSeats”:{“CurrentTextValue”:4},”IndicativeValue”:{“CurrentTextValue”:””},”DriverSide”:{“CurrentTextValue”:”RHD”},”Transmission”:{“CurrentTextValue”:”Manual”},”NumberOfDoors”:{“CurrentTextValue”:”5″},”ImageUrl”:””,”VehicleInsuranceGroup”:”21″}

Categories: Uncategorized

#Backup #AWS #Route53 DNS Zones in C#


If you host your DNS on Amazon Route53, and it’s reasonably complex, it’s worthwhile taking a backup of it, so that future errors can be undone quickly. There are some tools to do it, however, you can also write a script yourself in C# to do it.

First off, get the NUGET package

Install-Package AWSSDK

Create an IAM user within AWS with programmatic access, and get it’s Access Key and Secret ID. – I’ve given it Administrator access, but you should limit the scope to the minimum.

Then I output all the zones to the console here;

var client = AWSClientFactory.CreateAmazonRoute53Client(“***”, “***”, RegionEndpoint.USEast1);

var strOutput = @”route53backup.json”;

var req = new ListHostedZonesRequest();
for (; ; )
var zones = client.ListHostedZones(req);
foreach (HostedZone zone in zones.HostedZones)


var recordSets = client.ListResourceRecordSets(new ListResourceRecordSetsRequest() { HostedZoneId = zone.Id });

foreach (var record in recordSets.ResourceRecordSets)
Console.WriteLine(“\t” + record.Name + ” (” + record.Type + “)”);

foreach (var resource in record.ResourceRecords)
Console.WriteLine(“\t\t” + resource.Value);

req.Marker = zones.NextMarker;
if (req.Marker == null)

Note that the ListHostedZones call only returns 100 domains at a time, you have to set the “marker” parameter to the value of the NextMarker property that was returned on the previous call to get all records.


Categories: Uncategorized

Free HTTPS image hosting – website revamp


If you need to host an image via HTTPS (SSL), because it is going to be embedded into a secure website, such as paypal, ebay, or an email footer. Then this website is a really easy and free way to upload a single image for hosting online via HTTPS.

The website just got revamped, with the new Responsive MaterializeCSS framework, and Stripe to handle the payments.

Over the next few days, there are going to be new features added, like bulk uploads, better logging, and more…


Categories: Uncategorized

Access an #Oracle 11g Database via an #iOS app.

This is a short video demoing the iOS App “”MsSQL,MySQL,Oracle & Postgre” available via… It shows how to add an Oracle Database server, view tables, and query them, all under 30 seconds!

Categories: Uncategorized
%d bloggers like this: