fork download
  1. private string textin(int tg)
  2. {
  3. WebRequest text_request = WebRequest.Create(@"http://k...content-available-to-author-only...m.com/joke/article.php?cid=general&id="+tg);
  4. text_request.Method = "GET";
  5. WebResponse text_myResponse = text_request.GetResponse();
  6. StreamReader text_sr = new StreamReader(text_myResponse.GetResponseStream(),System.Text.Encoding.GetEncoding("big5"));
  7. string text_result = text_sr.ReadToEnd();
  8. string outStr;
  9. byte[] byt = System.Text.Encoding.GetEncoding("Big5").GetBytes(text_result);
  10. outStr = System.Text.Encoding.GetEncoding("Big5").GetString(byt);
  11. text_sr.Close();
  12. text_myResponse.Close();
  13. int first = outStr.IndexOf("art_content");
  14. int last = outStr.LastIndexOf("art_content");
  15. string final = outStr.Substring(first + 15, last - first - 20);
  16. return final;
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(1,8): error CS1525: Unexpected symbol `string', expecting `class', `delegate', `enum', `interface', `partial', or `struct'
prog.cs(6,36): error CS1530: Keyword `new' is not allowed on namespace elements
prog.cs(6,39): error CS1525: Unexpected symbol `StreamReader', expecting `class', `delegate', `enum', `interface', `partial', or `struct'
prog.cs(9,17): warning CS0658: `]' is invalid attribute target. All attributes in this attribute section will be ignored
prog.cs(17,9): error CS8025: Parsing error
Compilation failed: 4 error(s), 1 warnings
stdout
Standard output is empty