update server code

Change log:
v 1.1:
-Added processing of GET/POST
-fixed replace("/"," ")
-Added an option to upload  files  with small size
-reorganized code