title: VirusTotal Api Usage?
body: <p>So i got this</p>
  
  <pre><code>public class VirusTotal
  {
      public string APIKey;
      string scan = "https://www.virustotal.com/api/scan_file.json";
      string results = "https://www.virustotal.com/api/get_file_report.json";
  
      public VirusTotal(string apiKey)
      {
          ServicePointManager.Expect100Continue = false;
          APIKey = apiKey;
      }
  
      public string Scan(string file)
      {
          var v = new NameValueCollection();
          v.Add("key", APIKey);
          var c = new WebClient() { QueryString = v };
          c.Headers.Add("Content-type", "binary/octet-stream");
          byte[] b = c.UploadFile(scan, "POST", file);
          var r = ParseJSON(Encoding.Default.GetString(b));
          if (r.ContainsKey("scan_id"))
          {
              return r["scan_id"];
          }
          throw new Exception(r["result"]);
      }
  
      public string GetResults(string id)
      {
          Clipboard.SetText(id);
          var data = string.Format("resource={0}&amp;key={1}", id, APIKey);
          var c = new WebClient();
          string s = c.UploadString(results, "POST", data);
          var r = ParseJSON(s);
          foreach (string str in r.Values)
          {
              MessageBox.Show(str);
          }
          if (r["result"] != "1")
          {
              throw new Exception(r["result"]);
          }
          return s;
      }
  
      private Dictionary&lt;string, string&gt; ParseJSON(string json)
      {
          var d = new Dictionary&lt;string, string&gt;();
          json = json.Replace("\"", null).Replace("[", null).Replace("]", null);
          var r = json.Substring(1, json.Length - 2).Split(',');
          foreach (string s in r)
          {
              d.Add(s.Split(':')[0], s.Split(':')[1]);
          }
          return d;
      }
  }
  </code></pre>
  
  <p>But were do i input the url i would awsume its the scan, but how do i retrive the scans back and that and start the scan proccess</p>
  
  <p>sorry but im new in apis and i dont really get webclient thx for ur help</p>