Importers tweaks suggested by scrutinizer

Signed-off-by: emanuele <emanuele45@gmail.com>
Docs suggested by scrutinizer

Signed-off-by: emanuele <emanuele45@gmail.com>
Docs suggested by scrutinizer and use of mysqli_insert_id instead of mysql_insert_id

Signed-off-by: emanuele <emanuele45@gmail.com>
HttpResponse::$headers is an object, not an array

Signed-off-by: emanuele <emanuele45@gmail.com>
Some more random tweaks found by scrutinizer

Signed-off-by: emanuele <emanuele45@gmail.com>
Use globals is bad, though the counter was apparently broken and I eeded a quick way to fix it

Signed-off-by: emanuele <emanuele45@gmail.com>
Moar fixes suggested by scrutinizer

Signed-off-by: emanuele <emanuele45@gmail.com>