diff -ur src/gtk2/gui/guiDownloads.ml src/gtk2/gui/guiDownloads.ml
--- src/gtk2/gui/guiDownloads.ml	2005-11-22 18:49:06.567430672 +0100
+++ src/gtk2/gui/guiDownloads.ml	2005-11-22 18:39:28.175359632 +0100
@@ -35,6 +35,7 @@
 module G = GuiGlobal
 module A = GuiArt
 module U = GuiUtf8
+module H = GuiHtml
 
 let (!!) = Options.(!!)
 let (=:=) = Options.(=:=)
@@ -63,7 +64,7 @@
 
 let downloaders_timerID = ref (GMain.Timeout.add ~ms:2000 ~callback:(fun _ -> true))
 let (view_context : GPango.context option ref) = ref None
-let (razorback_boxes : (GPack.box * GPack.box * GMisc.label * GRange.progress_bar) option ref) = ref None
+let (stat_boxes : (GPack.box * GPack.box * GMisc.label * GRange.progress_bar) option ref) = ref None
 let interested_in_sources = ref false
 let expanded_rows = ref 0
 
@@ -985,53 +986,124 @@
     GuiCom.send (GetFile_info f.g_file_num)
   ) files
 
-let show_razorback_stats file (hbox_stats : GPack.box) (hbox_progress : GPack.box) =
-  match file.g_file_razorback_stats with
-    None ->
-      begin
-        List.iter (fun w -> w#destroy ()) hbox_stats#children;
-        List.iter (fun w -> w#misc#hide ()) hbox_progress#children;
-      end
-  | Some stats ->
+let add_razorback_stats stat (png_box : GPack.box) (table : GPack.table) pos =
+  try
+    let filename = stat.stats_file_history in
+    let pixb = GdkPixbuf.from_file filename in
+    let razorback_history =
+      GMisc.image ~pixbuf:pixb ~packing:(png_box#pack ~expand:false ~fill:true) ()
+    in
+    let label_razorback =
+      GMisc.label ~xalign:0. ~yalign:0.
+      ~markup:(GuiTools.create_default_bold_markup "http://stats.razorback2.com/ed2khistory") ()
+    in
+    let label_rate =
+      GMisc.label ~xalign:0. ~yalign:0.
+      ~markup:!M.dT_lb_stats_rate ()
+    in
+    let label_available =
+      GMisc.label ~xalign:0. ~yalign:0.
+      ~markup:!M.dT_lb_stats_available ()
+    in
+    let label_complete =
+      GMisc.label ~xalign:0. ~yalign:0.
+      ~markup:!M.dT_lb_stats_complete ()
+    in
+    let label_rating =
+      GMisc.label ~xalign:1. ~yalign:0. ~line_wrap:true
+      ~markup:(U.utf8_of stat.stats_file_rating) ()
+    in
+    let label_availability =
+      GMisc.label ~xalign:1. ~yalign:0.
+      ~markup:(Printf.sprintf "%d" stat.stats_file_availability) ()
+    in
+    let label_completed =
+      GMisc.label ~xalign:1. ~yalign:0.
+      ~markup:(Printf.sprintf "%d" stat.stats_file_completed) ()
+    in
+    List.iter (fun (w, left, right, top, expand) ->
+      table#attach
+        ~left ~top
+        ~xpadding:0 ~ypadding:0
+        ~right ~bottom:(top + 1)
+        ~expand ~fill:`X
+        w;
+    ) [
+       label_razorback#coerce   , 0, 2, !pos + 0, `NONE;
+       label_rate#coerce        , 0, 1, !pos + 1, `NONE;
+       label_rating#coerce      , 1, 2, !pos + 1, `NONE;
+       label_available#coerce   , 0, 1, !pos + 2, `NONE;
+       label_availability#coerce, 1, 2, !pos + 2, `NONE;
+       label_complete#coerce    , 0, 1, !pos + 3, `NONE;
+       label_completed#coerce   , 1, 2, !pos + 3, `NONE;
+      ];
+    pos := !pos + 6
+  with _ -> ()
+
+let add_filedonkey_stats stat (table : GPack.table) pos =
+  try
+    let label_filedonkey =
+      GMisc.label ~xalign:0. ~yalign:0.
+      ~markup:(GuiTools.create_default_bold_markup "http://www.filedonkey.com/") ()
+    in
+    let label_available =
+      GMisc.label ~xalign:0. ~yalign:0.
+      ~markup:!M.dT_lb_stats_available ()
+    in
+    let label_complete =
+      GMisc.label ~xalign:0. ~yalign:0.
+      ~markup:!M.dT_lb_stats_complete ()
+    in
+    let label_availability =
+      GMisc.label ~xalign:1. ~yalign:0.
+      ~markup:(Printf.sprintf "%d" stat.stats_file_availability) ()
+    in
+    let label_completed =
+      GMisc.label ~xalign:1. ~yalign:0.
+      ~markup:(Printf.sprintf "%d" stat.stats_file_completed) ()
+    in
+    List.iter (fun (w, left, right, top, expand) ->
+      table#attach
+        ~left ~top
+        ~xpadding:0 ~ypadding:0
+        ~right ~bottom:(top + 1)
+        ~expand ~fill:`X
+        w
+    ) [
+       label_filedonkey#coerce  , 0, 2, !pos + 0, `NONE;
+       label_available#coerce   , 0, 1, !pos + 1, `NONE;
+       label_availability#coerce, 1, 2, !pos + 1, `NONE;
+       label_complete#coerce    , 0, 1, !pos + 2, `NONE;
+       label_completed#coerce   , 1, 2, !pos + 2, `NONE;
+      ];
+    pos := !pos + 5
+  with _ -> ()
+
+let show_stats file (hbox_stats : GPack.box) (hbox_progress : GPack.box) =
+  List.iter (fun w -> w#destroy ()) hbox_stats#children;
+  List.iter (fun w -> w#misc#hide ()) hbox_progress#children;
+  match file.g_file_stats with
+    [] -> ()
+  | _ ->
       begin
-        try
-          List.iter (fun w -> w#destroy ()) hbox_stats#children;
-          List.iter (fun w -> w#misc#hide ()) hbox_progress#children;
-          let filename = stats.razorback_file_history in
-          let pixb = GdkPixbuf.from_file filename in
-          let razorback_history =
-            GMisc.image ~packing:(hbox_stats#pack ~expand:false ~fill:true) ()
-          in
-          let vbox_razorback_stats =
-            GPack.vbox ~homogeneous:false ~border_width:6 ~spacing:12
-            ~packing:(hbox_stats#pack ~expand:false ~fill:true) ()
-          in
-          let label_rating =
-            GMisc.label ~xalign:0. ~yalign:0.
-            ~packing:(vbox_razorback_stats#pack ~expand:false ~fill:true) ()
-          in
-          let label_availability =
-            GMisc.label ~xalign:0. ~yalign:0.
-            ~packing:(vbox_razorback_stats#pack ~expand:false ~fill:true) ()
-          in
-          let label_completed =
-            GMisc.label ~xalign:0. ~yalign:0.
-            ~packing:(vbox_razorback_stats#pack ~expand:false ~fill:true) ()
-          in
-          let rating = U.utf8_of (
-            Printf.sprintf "%s %s"
-            !M.dT_lb_razorback2_stats_rate stats.razorback_file_rating) in
-          let availability = U.utf8_of (
-            Printf.sprintf "%s %d"
-            !M.dT_lb_razorback2_stats_available stats.razorback_file_avalaibility) in
-          let completed = U.utf8_of (
-            Printf.sprintf "%s %d"
-            !M.dT_lb_razorback2_stats_complete stats.razorback_file_completed) in
-          razorback_history#set_pixbuf pixb;
-          label_rating#set_label rating;
-          label_availability#set_label availability;
-          label_completed#set_label completed
-        with _ -> ()
+        let pos = ref 0 in
+        let table_stats =
+          GPack.table ~columns:2 ~homogeneous:false
+          ~row_spacings:3 ~col_spacings:48 ~border_width:6 ()
+        in
+        begin
+          try
+            let stat = H.get_stat file RazorBack in
+            add_razorback_stats stat hbox_stats table_stats pos
+          with _ -> ()
+        end;
+        begin
+          try
+            let stat = H.get_stat file FileDonkey in
+            add_filedonkey_stats stat table_stats pos
+          with _ -> ()
+        end;
+        hbox_stats#add table_stats#coerce
       end
 
 let razorback2_stats k () =
@@ -1041,23 +1113,27 @@
       match !current_selection with
         key :: _ when key = k ->
           begin
-            match !razorback_boxes with
+            match !stat_boxes with
               Some (hbox_stats, hbox_progress, label, pbar) ->
                 begin
-                  match file.g_file_razorback_stats with
-                    Some stats ->
-                      begin
-                        if Sys.file_exists stats.razorback_file_history
-                          then begin
-                            show_razorback_stats file hbox_stats hbox_progress 
-                          end
-                      end
-                  | None -> ()
+                  show_stats file hbox_stats hbox_progress
                 end
             | None -> ()
           end
       | _ -> ()
     in
+    let on_not_found md4 =
+      H.remove_stat file RazorBack;
+      match !stat_boxes with
+        Some (hbox_stats, hbox_progress, label, pbar) ->
+          begin
+            show_stats file hbox_stats hbox_progress;
+            let s = Printf.sprintf "Sorry, the file ed2k::%s was not found on http://stats.razorback2.com" md4 in
+            label#set_label s;
+            label#misc#show ()
+          end
+      | _ -> ()
+    in
     let t1 = ref 0. in
     let t2 = ref 0. in
     let progress t md4 desc n m =
@@ -1072,7 +1148,7 @@
       let v = int_of_float (p *. 100.) in
       let percent = U.simple_utf8_of (Printf.sprintf "%d%%" v) in
       (if !!verbose then lprintf' "%s: %s\n" s percent);
-      match !razorback_boxes with
+      match !stat_boxes with
         Some (hbox_stats, hbox_progress, label, pbar) ->
           begin
             label#set_label s;
@@ -1083,9 +1159,63 @@
           end
       | _ -> ()
     in
-    GuiHtml.get_razorback2_stats file (progress t1) on_completed (progress t2)
+    H.get_razorback2_stats file on_completed on_not_found (progress t1) (progress t2)
   with _ -> ()
 
+let filedonkey_stats k () =
+  try
+    let file = file_of_key k in
+    let on_completed () =
+      match !current_selection with
+        key :: _ when key = k ->
+          begin
+            match !stat_boxes with
+              Some (hbox_stats, hbox_progress, label, pbar) ->
+                begin
+                  show_stats file hbox_stats hbox_progress
+                end
+            | None -> ()
+          end
+      | _ -> ()
+    in
+    let on_not_found md4 =
+      H.remove_stat file FileDonkey;
+      match !stat_boxes with
+        Some (hbox_stats, hbox_progress, label, pbar) ->
+          begin
+            show_stats file hbox_stats hbox_progress;
+            let s = Printf.sprintf "Sorry, the file ed2k::%s was not found on http://www.filedonkey.com/" md4 in
+            label#set_label s;
+            label#misc#show ()
+          end
+      | _ -> ()
+    in
+    let t = ref 0. in
+    let progress md4 desc n m =
+      let s = U.utf8_of (Printf.sprintf "%s %s:" desc md4) in
+      let tt = !t in
+      t := !t +. float_of_int n;
+      let p =
+        if m > 0
+          then min 1. (!t /. float_of_int m)
+          else if !t > 0. then tt /. !t else 0.
+      in
+      let v = int_of_float (p *. 100.) in
+      let percent = U.simple_utf8_of (Printf.sprintf "%d%%" v) in
+      (if !!verbose then lprintf' "%s: %s\n" s percent);
+      match !stat_boxes with
+        Some (hbox_stats, hbox_progress, label, pbar) ->
+          begin
+            label#set_label s;
+            pbar#set_fraction p;
+            pbar#set_text percent;
+            label#misc#show ();
+            pbar#misc#show ();
+          end
+      | _ -> ()
+    in
+    H.get_filedonkey_stats file on_completed on_not_found progress
+  with _ -> ()
 
 (*************************************************************************)
 (*                                                                       *)
@@ -1102,7 +1232,9 @@
                [
                 `I ((!M.dT_me_show_file_details), show_details k) ;
                 `I ((!M.dT_me_preview), preview k) ;
+                `S ;
                 `I ((!M.dT_me_razorback2_stats), razorback2_stats k);
+                `I ((!M.dT_me_filedonkey_stats), filedonkey_stats k);
                 `S ;
                ]
              else  [])
@@ -1443,7 +1575,7 @@
   ignore (vbox#connect#destroy ~callback:
     (fun _ ->
        view_context := None;
-       razorback_boxes := None;
+       stat_boxes := None;
        current_selection := [];
        expanded_rows := 0;
        Timeout.remove (!downloaders_timerID)
@@ -1483,7 +1615,7 @@
     GRange.progress_bar ~pulse_step:0.01 ~show:false
       ~packing:(hbox_razorback_progress#pack ~expand:false ~fill:true) ()
   in
-  razorback_boxes := Some (hbox_razorback_stats, hbox_razorback_progress,
+  stat_boxes := Some (hbox_razorback_stats, hbox_razorback_progress,
                            label_razorback_progress, pbar_razorback_progress);
   let on_select_files keys =
     current_selection := keys;
@@ -1492,7 +1624,7 @@
         begin
           try
             let file = file_of_key k in
-            show_razorback_stats file hbox_razorback_stats hbox_razorback_progress
+            show_stats file hbox_razorback_stats hbox_razorback_progress
           with _ -> ()
         end
     | _ -> ()
diff -ur src/gtk2/gui/guiGlobal.ml src/gtk2/gui/guiGlobal.ml
--- src/gtk2/gui/guiGlobal.ml	2005-11-22 18:49:06.587427632 +0100
+++ src/gtk2/gui/guiGlobal.ml	2005-11-22 18:54:45.647882608 +0100
@@ -120,7 +120,6 @@
 
 let console_message = ref (fun s -> lprintf_nl "CONSOLE: %s" s)
 
-
 let gtk_handler timer =
   while Glib.Main.pending () do
     ignore (Glib.Main.iteration false)
diff -ur src/gtk2/gui/guiHtml.ml src/gtk2/gui/guiHtml.ml
--- src/gtk2/gui/guiHtml.ml	2005-11-22 18:49:06.651417904 +0100
+++ src/gtk2/gui/guiHtml.ml	2005-11-22 18:43:56.262604176 +0100
@@ -56,11 +56,12 @@
   in
   let r = {
       H.basic_request with
-      H.req_url = Url.of_string url;
-      H.req_proxy = proxy;
+      H.req_url        = Url.of_string url;
+      H.req_proxy      = proxy;
       H.req_user_agent = user_agent;
-      H.req_referer = None;
-      H.req_request = H.GET;
+      H.req_referer    = None;
+      H.req_request    = H.GET;
+      H.req_max_retry  = 1;                (* max 1 redirection for filedonkey.com *)
     } in
   r
 
@@ -77,15 +78,92 @@
     Filename.concat cache_dir file
   with _ -> ""
 
+(*************************************************************************)
+(*                                                                       *)
+(*                         uids_to_md4                                   *)
+(*                                                                       *)
+(*************************************************************************)
+
+let uids_to_md4 uids =
+  let s = ref "" in
+  begin
+    try
+      List.iter (fun uid ->
+        match (Uid.to_uid uid) with
+          Ed2k md4 -> (s := Md4.to_string md4; raise Exit)
+        | _ -> ()
+      ) uids
+    with _ -> ()
+  end;
+  if !s <> ""
+    then !s
+    else raise Not_found
+
+(*************************************************************************)
+(*                                                                       *)
+(*                         create_stat                                   *)
+(*                                                                       *)
+(*************************************************************************)
+
+let create_stat file stat =
+  let rec iter l =
+    match l with
+      [] ->
+        begin
+          let s = {
+            stats_file_type         = stat;
+            stats_file_history      = "";
+            stats_file_rating       = "";
+            stats_file_availability = 0;
+            stats_file_completed    = 0;
+          } in
+          file.g_file_stats <- s :: file.g_file_stats;
+          s
+        end
+    | s :: tail ->
+        if s.stats_file_type = stat then s else iter tail
+  in
+  iter file.g_file_stats
+
+(*************************************************************************)
+(*                                                                       *)
+(*                         get_stat                                      *)
+(*                                                                       *)
+(*************************************************************************)
+
+let get_stat file stat =
+  let rec iter l =
+    match l with
+      [] -> raise Not_found
+    | s :: tail ->
+        if s.stats_file_type = stat then s else iter tail
+  in
+  iter file.g_file_stats
+
+(*************************************************************************)
+(*                                                                       *)
+(*                         remove_stat                                   *)
+(*                                                                       *)
+(*************************************************************************)
+
+let remove_stat file stat =
+  let l = List.filter (fun s -> s.stats_file_type <> stat) file.g_file_stats in
+  file.g_file_stats <- l
+
+(*************************************************************************)
+(*                                                                       *)
+(*                         get                                           *)
+(*                                                                       *)
+(*************************************************************************)
+
 let get url_name f progress =
-  let progress_desc = Printf.sprintf "http://stats.razorback2.com :: %s" !M.dT_lb_razorback2_stats_get_main_page in
   let r = make_request url_name in
   let module H = Http_client in
   let filename = file_from_url (Url.to_string r.H.req_url) in
   H.wget_string r (fun _s ->
     begin
       try
-        (try Sys.remove filename with _ -> lprintf_nl2 "cannot remove file %s" filename);
+        (try Sys.remove filename with _ -> ());
         File.from_string filename _s;
       with _ -> (lprintf_nl2 "failed in H.wget_string")
     end;
@@ -96,26 +174,18 @@
                ~return_comments:true lexb
     in
     f dl;
-    close_in in_chan) (fun n m -> progress progress_desc n m)
+    close_in in_chan) (fun n m -> progress n m)
 
 
-let uids_to_md4 uids =
-  let s = ref "" in
-  begin
-    try
-      List.iter (fun uid ->
-        match (Uid.to_uid uid) with
-            Ed2k md4 -> (s := Md4.to_string md4; raise Exit)
-          | _ -> ()
-      ) uids
-    with _ -> ()
-  end;
-  if !s <> ""
-    then !s
-    else raise Not_found
-
-let parse_razorback_stats stats md4 referer on_png_completed progress dl =
-  let progress_desc = Printf.sprintf "http://stats.razorback2.com :: %s" !M.dT_lb_razorback2_stats_get_image in
+(*************************************************************************)
+(*                                                                       *)
+(*                         parse_razorback_stats                         *)
+(*                                                                       *)
+(*************************************************************************)
+
+let parse_razorback_stats stats md4 referer on_png_completed on_not_found progress dl =
+  let not_found = Printf.sprintf "Sorry, the file ed2k::%s was not found on our database" md4 in
+  let progress_desc = Printf.sprintf "http://stats.razorback2.com :: %s" !M.dT_lb_stats_get_image in
   let rec iter _dl =
     List.iter (fun d ->
       match d with
@@ -131,9 +201,9 @@
                     let module H = Http_client in
                     H.wget_string r (fun ___s ->
                       try
-                        (try Sys.remove filename with _ -> lprintf_nl2 "cannot remove file %s" filename);
+                        (try Sys.remove filename with _ -> ());
                         File.from_string filename ___s;
-                        stats.razorback_file_history <- filename;
+                        stats.stats_file_history <- filename;
                         on_png_completed ();
                       with _ -> (lprintf_nl2 "failed in H.wget_string")) (fun n m -> progress progress_desc n m)
                   end
@@ -152,7 +222,7 @@
                           List.iter (fun (__s, ___s) ->
                             if __s = "title"
                               then begin
-                                stats.razorback_file_rating <- (GuiUtf8.utf8_of ___s)
+                                stats.stats_file_rating <- (GuiUtf8.utf8_of ___s)
                               end
                           ) _sl;
                           _iter ____dl pos
@@ -171,12 +241,12 @@
                         if !pos = 5
                           then begin
                             try
-                              stats.razorback_file_completed <- int_of_string _s
+                              stats.stats_file_completed <- int_of_string _s
                             with _ -> ()
                           end else if !pos = 6
                           then begin
                             try
-                              stats.razorback_file_avalaibility <- int_of_string _s
+                              stats.stats_file_availability <- int_of_string _s
                             with _ -> ()
                           end
 
@@ -189,36 +259,31 @@
         | Element (s, sl, __dl) ->
             iter __dl
 
-        | _ -> ()
+        | Data s ->
+            begin
+              if String2.contains s not_found
+                then on_not_found md4
+            end
 
     ) _dl
   in
   iter dl
 
-let get_razorback2_stats file progress_html on_png_completed progress_png =
-  try
-    let md4 = uids_to_md4 file.g_file_uids in
-    let stats =
-       match file.g_file_razorback_stats with
-         None ->
-           begin
-             let s ={
-               razorback_file_history      = "";
-               razorback_file_rating       = "";
-               razorback_file_avalaibility = 0;
-               razorback_file_completed    = 0;
-             } in
-             file.g_file_razorback_stats <- Some s;
-             s
-           end
-      | Some s -> s
-    in
-    let referer = "http://stats.razorback2.com/" in
-    let url = Printf.sprintf "%sed2khistory?ed2k=%s" referer md4 in
-    get url (parse_razorback_stats stats md4 referer on_png_completed (progress_html md4)) (progress_png md4)
-  with _ -> ()
+(*************************************************************************)
+(*                                                                       *)
+(*                         get_razorback2_stats                          *)
+(*                                                                       *)
+(*************************************************************************)
 
-(*
+(* **********************************
+
+    Element: body
+        Data: 
+Sorry, the file ed2k:: was not found on our database
+
+        Element: br
+
+  ***********************************
 Element: !
   contents DOCTYPE html public "-//W3C//DTD HTML 4.01 Transitional//EN"
 Element: html
@@ -244,45 +309,9 @@
 
         Element: title
             Data: ed2kHistory of file ed2k::8B16AC1A76E4D1D750547931E8ADD3F7
-        Data: 
-
-        Element: script
-          type text/javascript
-          src /sorttable3.js
-            Data: 
-        Data: 
-
-    Data: 
-
-    Element: body
-        Data: 
+        Data:
 
-        Element: script
-          type text/javascript
-            Data: <!-- 
-google_ad_client = "pub-4061973295205334"; 
-google_ad_width = 800; 
-google_ad_height = 90; 
-google_ad_format = "728x90_as"; 
-google_ad_channel ="5618134257"; 
-google_color_border = "A8DDA0"; 
-google_color_bg = "EBFFED"; 
-google_color_link = "0000CC"; 
-google_color_url = "008000"; 
-google_color_text = "6F6F6F"; 
-//-->
-        Data:  
-
-        Element: center
-            Element: script
-              type text/javascript
-              src http://pagead2.googlesyndication.com/pagead/show_ads.js
-                Data:  
-
-        Data: 
-
-        Element: br
-        Data: 
+..........
 
         Element: center
             Element: img
@@ -290,78 +319,8 @@
               width 800
               height 288
               alt history graph for file ed2k::8B16AC1A76E4D1D750547931E8ADD3F7
-        Data: 
-
-        Element: br
-        Element: form
-          action /ed2khistory
-          method get
-            Data: 
-File Hash : 
-            Element: input
-              name ed2k
-              type text
-              maxlength 200
-              size 43
-            Data: &nbsp;
-            Element: input
-              type submit
-              value Submit
-        Data: 
-16063744 files in ed2khistory database
-        Element: br
-        Data: 
-
-        Element: br
-        Element: table
-          border 1
-          width 100%
-          bgcolor #D8D8D8
-          cellspacing 0
-          id t1
-          class sortable
-            Data: 
-
-            Element: colgroup
-              align right
-                Data: 
-
-            Element: colgroup
-              align right
-                Data: 
-
-            Element: colgroup
-              align right
-                Data: 
-
-            Element: colgroup
-              align center
-                Data: 
-
-            Element: colgroup
-              align right
-                Data: 
-
-            Element: colgroup
-              align right
-                Data: 
 
-            Element: thead
-                Element: tr
-                  bgcolor #B0B0B0
-                    Data:  
-                    Element: th
-                        Data: Server
-                    Element: th
-                        Data: File Name
-                    Element: th
-                        Data: Size
-                    Element: th
-                        Data: Rating
-                    Element: th
-                        Data: Complete
-                    Element: th
-                        Data: Avail
+..........
 
             Element: tfoot
               align right
@@ -391,656 +350,113 @@
                             Data: 9864
                         Data: 
 
-            Element: tbody
-              align right
-                Data: 
-
-                Element: tr
-                    Element: td
-                      title &lt;&lt;&lt; Saugcenter &gt;&gt;&gt;
-                        Data: 80.190.233.144:6565
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 653
-                    Element: td
-                        Data: 655
-
-                Element: tr
-                    Element: td
-                      title Breizh Punisher's
-                        Data: 213.251.133.129:6567
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 184
-                    Element: td
-                        Data: 186
-
-                Element: tr
-                    Element: td
-                      title !-= www.FreeSexBay.com =-!
-                        Data: 83.149.102.1:4242
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 119
-                    Element: td
-                        Data: 120
-
-                Element: tr
-                    Element: td
-                      title eD2k Infinity
-                        Data: 213.251.161.152:4661
-                    Element: td
-                        Data: emule0.46c-installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 37
-                    Element: td
-                        Data: 37
-
-                Element: tr
-                    Element: td
-                      title Breizh Digitalus
-                        Data: 213.186.47.84:4661
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                      align center
-                        Element: img
-                          src /gifs/FileRating5.gif
-                          alt Excellent
-                          title Excellent for 0% of clients
-                    Element: td
-                        Data: 500
-                    Element: td
-                        Data: 504
-
-                Element: tr
-                    Element: td
-                      title Em Server No.1
-                        Data: 193.138.230.251:4242
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 144
-                    Element: td
-                        Data: 146
-
-                Element: tr
-                    Element: td
-                      title BiG BanG 9
-                        Data: 80.239.200.108:3000
-                    Element: td
-                        Data: eMule0.46c_Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 400
-                    Element: td
-                        Data: 400
-
-                Element: tr
-                    Element: td
-                      title !-= www.FreeOsex.com =-!
-                        Data: 83.149.123.189:4321
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 100
-                    Element: td
-                        Data: 100
-
-                Element: tr
-                    Element: td
-                      title &lt;&lt;&lt; Trafficservice24.de  &gt;&gt;&gt;
-                        Data: 81.169.143.167:7777
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 93
-                    Element: td
-                        Data: 94
-
-                Element: tr
-                    Element: td
-                      title !!!****ifreeex.net &gt;&gt;Hardcore XXX Movies !!!***
-                        Data: 194.30.160.81:4661
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 96
-                    Element: td
-                        Data: 96
-
-                Element: tr
-                    Element: td
-                      title Rackbox 2
-                        Data: 213.251.161.69:4661
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 73
-                    Element: td
-                        Data: 73
-
-                Element: tr
-                    Element: td
-                      title &#65403;FPRO&#65387;
-                        Data: 213.251.161.103:4661
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 153
-                    Element: td
-                        Data: 154
-
-                Element: tr
-                    Element: td
-                      title Asyrix 2.1
-                        Data: 80.190.251.50:4321
-                    Element: td
-                        Data: eMule0.46c-Installer.[content.emule-project.net].exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 536
-                    Element: td
-                        Data: 536
-
-                Element: tr
-                  bgcolor #D0B0B0
-                    Element: td
-                      title Razorback 2.1
-                        Data: 195.245.244.244:3000
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 645
-                    Element: td
-                        Data: 646
-
-                Element: tr
-                    Element: td
-                      title ### DOINGDO ###
-                        Data: 212.112.238.82:4661
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 155
-                    Element: td
-                        Data: 156
-
-                Element: tr
-                    Element: td
-                      title BiG BanG 8
-                        Data: 80.239.200.107:3000
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 159
-                    Element: td
-                        Data: 160
-
-                Element: tr
-                    Element: td
-                      title BiG BanG 10
-                        Data: 80.239.200.109:3000
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 123
-                    Element: td
-                        Data: 123
-
-                Element: tr
-                    Element: td
-                      title !-= www.FreeOsex.com =-!
-                        Data: 83.149.123.188:4321
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 85
-                    Element: td
-                        Data: 85
-
-                Element: tr
-                    Element: td
-                      title BiG BanG 6
-                        Data: 80.239.200.105:3000
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 30
-                    Element: td
-                        Data: 31
-
-                Element: tr
-                    Element: td
-                      title ChezToff 2 (Serveur Fr)
-                        Data: 213.251.136.83:4661
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 92
-                    Element: td
-                        Data: 93
-
-                Element: tr
-                    Element: td
-                      title BiG BanG 11
-                        Data: 80.239.200.110:3000
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 197
-                    Element: td
-                        Data: 197
-
-                Element: tr
-                    Element: td
-                      title Asyrix 2.2
-                        Data: 217.20.127.165:4321
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 15
-                    Element: td
-                        Data: 16
-
-                Element: tr
-                    Element: td
-                      title Byte Devils
-                        Data: 194.213.0.20:3306
-                    Element: td
-                        Data: eMule0.46c [par Ratiatum.com].exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 63
-                    Element: td
-                        Data: 64
-
-                Element: tr
-                    Element: td
-                      title www.UseNeXT.to
-                        Data: 212.112.243.146:4661
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 53
-                    Element: td
-                        Data: 53
-
-                Element: tr
-                    Element: td
-                      title ChezToff (Serveur Fr)
-                        Data: 213.186.60.106:4661
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 1275
-                    Element: td
-                        Data: 1278
-
-                Element: tr
-                    Element: td
-                      title !!!****ifreeex.net &gt;&gt;Hardcore XXX Movies !!!***
-                        Data: 194.30.160.41:4661
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 225
-                    Element: td
-                        Data: 228
-
-                Element: tr
-                    Element: td
-                      title BiG BanG 4
-                        Data: 80.239.200.103:3000
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 143
-                    Element: td
-                        Data: 146
-
-                Element: tr
-                    Element: td
-                      title Jibsworld (www.jd2k.com)
-                        Data: 213.186.45.91:4661
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 51
-                    Element: td
-                        Data: 51
-
-                Element: tr
-                    Element: td
-                      title Jibsworld2 (www.jd2k.com)
-                        Data: 213.251.162.35:4661
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 86
-                    Element: td
-                        Data: 86
-
-                Element: tr
-                    Element: td
-                      title ChezToff 3 (Serveur Fr)
-                        Data: 213.251.134.191:4661
-                    Element: td
-                        Data: Emule0.46C-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 217
-                    Element: td
-                        Data: 217
-
-                Element: tr
-                    Element: td
-                      title Byte Devils
-                        Data: 194.213.0.10:3306
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 10
-                    Element: td
-                        Data: 10
-
-                Element: tr
-                    Element: td
-                      title DonkeyServer No1
-                        Data: 62.241.53.2:4242
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 2585
-                    Element: td
-                        Data: 2597
-
-                Element: tr
-                    Element: td
-                      title &lt;&lt;&lt; Saugcenter &gt;&gt;&gt;
-                        Data: 212.112.241.158:6565
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 101
-                    Element: td
-                        Data: 102
-
-                Element: tr
-                    Element: td
-                      title BiG BanG 2
-                        Data: 80.239.200.101:3000
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 132
-                    Element: td
-                        Data: 132
-
-                Element: tr
-                    Element: td
-                      title Byte Devils
-                        Data: 194.213.0.30:3306
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 66
-                    Element: td
-                        Data: 66
-
-                Element: tr
-                    Element: td
-                      title BiG BanG 3
-                        Data: 80.239.200.102:3000
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 106
-                    Element: td
-                        Data: 106
-
-                Element: tr
-                    Element: td
-                      title BiG BanG 5
-                        Data: 80.239.200.104:3000
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 114
-                    Element: td
-                        Data: 114
-
-                Element: tr
-                    Element: td
-                      title maxx1462
-                        Data: 84.150.43.187:9955
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 1
-                    Element: td
-                        Data: 1
+*)
 
-                Element: tr
-                    Element: td
-                      title ADSL Group
-                        Data: 217.91.58.88:7000
-                    Element: td
-                        Data: eMule0.46c-Installer.exe
-                    Element: td
-                        Data: 4577316
-                    Element: td
-                        Data: &nbsp;
-                    Element: td
-                        Data: 5
-                    Element: td
-                        Data: 5
+let get_razorback2_stats file on_png_completed on_not_found progress_html progress_png =
+  let md4 = uids_to_md4 file.g_file_uids in
+  let stat = create_stat file RazorBack in
+  let referer = "http://stats.razorback2.com/" in
+  let url = Printf.sprintf "%sed2khistory?ed2k=%s" referer md4 in
+  let progress_desc = Printf.sprintf "http://stats.razorback2.com :: %s" !M.dT_lb_stats_get_main_page in
+  get url (parse_razorback_stats stat md4 referer on_png_completed on_not_found (progress_html md4)) (progress_png md4 progress_desc)
+
+(*************************************************************************)
+(*                                                                       *)
+(*                         parse_filedonkey_stats                        *)
+(*                                                                       *)
+(*************************************************************************)
+
+let parse_filedonkey_stats stat md4 on_completed on_not_found dl =
+  let pos = ref 0 in
+  let search_succeeded = ref true in
+  let rec iter _dl =
+    List.iter (fun d ->
+      match d with
+        Element (s, sl, __dl) ->
+          begin
+            iter __dl
+          end
+      | Data s ->
+          if String2.contains s "your search has failed"
+          then (search_succeeded := false; on_not_found md4)
+          else if String2.contains s "Availability"
+            then pos := 1
+            else if String2.contains s "Complete Sources"
+              then pos := 2
+              else if !pos = 1
+                then begin
+                  try
+                    stat.stats_file_availability <- int_of_string s;
+                    pos := 0
+                  with _ -> pos := 0
+                end else if !pos = 2
+                  then begin
+                    try
+                      stat.stats_file_completed <- int_of_string s;
+                      pos := 0
+                    with _ -> pos := 0
+                  end
+    ) _dl
+  in
+  iter dl;
+  if !search_succeeded then on_completed ()
 
-        Data: 
+(*************************************************************************)
+(*                                                                       *)
+(*                         get_filedonkey_stats                          *)
+(*                                                                       *)
+(*************************************************************************)
 
-        Element: p
-            Data: Legend :
-        Element: ul
-        Element: p
-Element: li
-    Data: Avail : The number of clients connected to the server sharing this file
-    Element: p
-Element: li
-    Data: Complete : The number of clients connected to the server sharing this file and that have the complete file
-    Element: p
-Element: li
-    Data: asked/h : The number of requests per hour received by razorback asking for sources. That gives an indication on the number of clients that are downloading this file
-    Element: p
-Element: li
-    Data: File rating is a score given by a client to a file, between 1 (Very bad) to 5 (Excellent). Servers then give you the average of those scores.
-    Element: br
-    Element: ul
-        Element: li
-            Element: img
-              src /gifs/FileRating1.gif
-              alt Very bad
-              title Invalid / Corrupt / Fake
-            Data:  : Means majority of clients said the file was a fake, or corrupt, or invalid
-            Element: br
-        Element: li
-            Element: img
-              src /gifs/FileRating2.gif
-              alt Poor
-              title Poor
-            Data:  : Means majority of clients said the file was of poor quality
-            Element: br
-        Element: li
-            Element: img
-              src /gifs/FileRating3.gif
-              alt Fair
-              title Fair
-            Data:  : Fair quality
-            Element: br
-        Element: li
-            Element: img
-              src /gifs/FileRating4.gif
-              alt Good
-              title Good
-            Data:  : Good
-            Element: br
-        Element: li
-            Element: img
-              src /gifs/FileRating5.gif
-              alt Excellent
-              title Excellent
-            Data:  : Excellent
-            Element: br
-    Data: 
+(*
+http://www.filehash.com/url/F3BC3066A1C6993C32714E0AB4152CDB
+Element: html
+  xmlns http://www.w3.org/1999/xhtml
+    Data:   
+    Element: head
+        Element: title
+            Data: ed2k URL for file "mldonkey-scripts.tgz"
 
-    Data: 
+.........
 
+                            Element: p
+                                Data: ed2k: 
+                                Element: a
+                                  href ed2k://|file|mldonkey-scripts [found via www.FileDonkey.com].tgz|1500|91DF9F63F18218CDE012714D59BC8A50|/
+                                    Data:  mldonkey-scripts.tgz
+                            Element: p
+                            Element: p
+                                Data: Availability: 
+                                Element: b
+                                    Data: 06
+                            Element: p
+                                Data: Size: 
+                                Element: b
+                                    Data: 1500
+                            Element: p
+                                Data: Complete Sources: 
+                                Element: b
+                                    Data: 2
+                            Element: p
+                                Data:  
+                            Element: p
+                            Element: p
+                            Element: p
+                                Data: Also Known As:
+                            Element: p
+                                Data:  
+                                Element: b
+                                    Data: mldonkey-scripts.tar.gz
+                            Element: p
+                                Data:  
+                            Element: p
+                            Element: p
+                                Data: 
 *)
+
+let get_filedonkey_stats file on_completed on_not_found progress_html =
+  let md4 = uids_to_md4 file.g_file_uids in
+  let stat = create_stat file FileDonkey in
+  let referer = "http://www.filedonkey.com/" in
+  let url = Printf.sprintf "%surl/%s" referer md4 in
+  let progress_desc = Printf.sprintf "http://www.filedonkey.com/ :: %s" !M.dT_lb_stats_get_main_page in
+  get url (parse_filedonkey_stats stat md4 on_completed on_not_found) (progress_html md4 progress_desc)
diff -ur src/gtk2/gui/guiMessages.ml src/gtk2/gui/guiMessages.ml
--- src/gtk2/gui/guiMessages.ml	2005-11-16 07:17:37.000000000 +0100
+++ src/gtk2/gui/guiMessages.ml	2005-11-22 16:29:20.000000000 +0100
@@ -236,15 +236,16 @@
 let dT_me_browse_files  = ref ""
 let dT_me_add_to_friends  = ref ""
 let dT_me_razorback2_stats = ref ""
+let dT_me_filedonkey_stats = ref ""
 let dT_lb_link  = ref ""
 let dT_me_show_file_details  = ref ""
 let dT_me_show_source_details  = ref ""
 let dT_wt_show_source_details  = ref ""
-let dT_lb_razorback2_stats_get_main_page  = ref ""
-let dT_lb_razorback2_stats_get_image  = ref ""
-let dT_lb_razorback2_stats_rate  = ref ""
-let dT_lb_razorback2_stats_available  = ref ""
-let dT_lb_razorback2_stats_complete  = ref ""
+let dT_lb_stats_get_main_page  = ref ""
+let dT_lb_stats_get_image  = ref ""
+let dT_lb_stats_rate  = ref ""
+let dT_lb_stats_available  = ref ""
+let dT_lb_stats_complete  = ref ""
 
 (* Friends Tab *)
 
@@ -708,11 +709,12 @@
   dT_me_show_source_details  :=  _s "Show source details";
   dT_wt_show_source_details  :=  _s "Source details";
   dT_me_razorback2_stats := _s "Get/Refresh Razorback Stats";
-  dT_lb_razorback2_stats_get_main_page := _s "Getting main page for file";
-  dT_lb_razorback2_stats_get_image := _s "Getting graph image for file";
-  dT_lb_razorback2_stats_rate := _s_ "Rate";
-  dT_lb_razorback2_stats_available := _s_ "Availability";
-  dT_lb_razorback2_stats_complete := _s_ "Complete";
+  dT_me_filedonkey_stats := _s "Get/Refresh FileDonkey Stats";
+  dT_lb_stats_get_main_page := _s "Getting main page for file";
+  dT_lb_stats_get_image := _s "Getting graph image for file";
+  dT_lb_stats_rate := _s_ "Rate";
+  dT_lb_stats_available := _s_ "Availability";
+  dT_lb_stats_complete := _s_ "Complete";
 
 (* Friends Tab *)
 
diff -ur src/gtk2/gui/guiMisc.ml src/gtk2/gui/guiMisc.ml
--- src/gtk2/gui/guiMisc.ml	2005-11-16 07:17:37.000000000 +0100
+++ src/gtk2/gui/guiMisc.ml	2005-11-20 20:07:43.000000000 +0100
@@ -1353,5 +1353,5 @@
     g_file_priority        = f.file_priority;
     g_file_uids            = f.file_uids;
 
-    g_file_razorback_stats = None;
+    g_file_stats           = [];
   }
diff -ur src/gtk2/gui/guiTypes2.ml src/gtk2/gui/guiTypes2.ml
--- src/gtk2/gui/guiTypes2.ml	2005-11-16 07:17:37.000000000 +0100
+++ src/gtk2/gui/guiTypes2.ml	2005-11-22 15:27:33.000000000 +0100
@@ -212,16 +212,22 @@
     mutable source_files_requested : int list;             (* file_num *)
   }
 
-type razorback_stats =
+type stat_type =
+  RazorBack
+| FileDonkey
+
+type stat =
   {
-   mutable razorback_file_history      : string;
-   mutable razorback_file_rating       : string;
-   mutable razorback_file_avalaibility : int;
-   mutable razorback_file_completed    : int;
+   stats_file_type         : stat_type;
+
+   mutable stats_file_history      : string;
+   mutable stats_file_rating       : string;
+   mutable stats_file_availability : int;
+   mutable stats_file_completed    : int;
   }
 
 type g_file_info = {
-    g_file_num : int;
+    g_file_num     : int;
     g_file_network : int;
 
     mutable g_file_comment        : string;
@@ -243,7 +249,7 @@
     mutable g_file_priority       : int;
     mutable g_file_uids           : Uid.t list;
 
-    mutable g_file_razorback_stats : razorback_stats option;
+    mutable g_file_stats          : stat list;
   }
 
 type item_info =
