Cacomania: tag


RESTful API with Slim PHP and SQLite

Guido Krömer - 2060 days ago - Tags: , , ,

I needed a small RESTful API, primarily for playing around with AngularJS. The Slim Framework perfectly fits my needs. It is a PHP micro framework for writing a prototype or really small applications, without the overhead and the steep learning curve of a complete framework likes Yii, Symfony or Zend. At the same time, you get stuck at the Zend2 module configuration, you could have finished a working prototype with Slim.

I used SQLite as database for the API, because SQLite is configuration free it is perfect for prototyping. For keeping the focus, of this tutorial, at the Slim Framework itself, I skipped using any kind of ORM framework. Due the use of PDO any other SQL Database like MySQL could be used, too.

To gain some practical benefit from this tutorial the REST API going to be discussed in this tutorial manages bookmarks in a CRUD style. I hope this help me with my bookmark chaos among Linux, Windows, tablet and smart phone.

read more TEST

Comment [21]

FTP upload via cURL

Guido Krömer - 2319 days ago - Tags: , , ,

Uploading a file to a ftp server with cURL is really easy:

# curl -u user:pass -T my_file

Or with a little potion of bash for uploading multiple file:

# for file in ./*; do curl -u user:pass -T "$file"; done;


Updating DynDNS via Bash

Guido Krömer - 2327 days ago - Tags: , , ,

Because of my old wireless router was not able to update DynDNS, I spend a lot annoying time configuring the ddclient daemon on my home server. But the stability of this tool was really disappointing, after being blocked two times by dyndns, I decided writing my own script to update DynDNS frequently.

read more TEST

Comment [5]