tankcr

Untitled

Jun 14th, 2014
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Net;
  7. using System.IO;
  8.  
  9. namespace ROD_Deck_Builder
  10. {
  11. public class Pagedata
  12. {
  13. List<Pagedata> pageData;
  14.  
  15. public List<Pagedata> PageData
  16. {
  17. get { return pageData; }
  18. set { pageData = value; }
  19. }
  20.  
  21. public Pagedata()
  22. {
  23.  
  24. }
  25. }
  26. public class GetPage
  27. {
  28. public static Pagedata GetPageData(string url)
  29. {
  30. Pagedata pages = new Pagedata();
  31. WebRequest request = WebRequest.Create(url);
  32. WebResponse response = request.GetResponse();
  33. Stream data = response.GetResponseStream();
  34. using (StreamReader sr = new StreamReader(data))
  35. {
  36. string pagedata = sr.ReadToEnd();
  37. string[] splits =pagedata.Split('<');
  38. foreach(string split in splits)
  39. {
  40.  
  41. Pagedata item = new Pagedata();
  42.  
  43.  
  44. }
  45. }
  46. return pages;
  47. }
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment