server code for traffic analyser