Minimal HTTP requests

This page lists different HTTP request templates. All templates contain the minimum number of required headers.

HTTP POST
POST /login.cgi HTTP/1.0
Host: 192.168.200.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 51

submit=Login&username=admin&password=Adm1n15trat0r

HTTP GET
GET /index.html HTTP/1.0
Host: 192.168.200.1

Tags: 

Protecting your website from spam in comments

This article shows how you can effectively protect your website against spam-submissions in comments.

In order to improve the interaction with the visitors of this website, I allowed anonymous users to post comments to all published stories. Since feedback is quite low, I enforced administrator approval of all comments to stay in full control.

However, shortly after enabling comments for anonymous users, I received more and more emails telling me that new comments were posted which needed my approval.

CAPTCHA to the rescue!

Tags: 

Time conversion using Bash

This article show how you can obtain the UNIX epoch time (number of seconds since 1970-01-01 00:00:00 UTC) using the Linux bash "date" command. It also shows how you can convert a UNIX epoch time to a human readable time.

Obtain UNIX epoch time using bash
Obtaining the UNIX epoch time using bash is easy. Use the build-in date command and instruct it to output the number of seconds since 1970-01-01 00:00:00 UTC. You can do this by passing a format string as parameter to the date command. The format string for UNIX epoch time is '%s'.

Tags: 

Pages

Subscribe to Vanstechelman.eu RSS