HighTechTalks DotNet Forums  

Determine Homepage content change

Dotnet Framework (Remoting) microsoft.public.dotnet.framework.remoting


Discuss Determine Homepage content change in the Dotnet Framework (Remoting) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Macneed
 
Posts: n/a

Default Determine Homepage content change - 08-04-2007 , 08:45 PM






I want to write a c# code to determine if the homepage content was change,
and further, i will write the code to show what is changed,
but if the homepage is write by asp or something else, (e.g. livescore.com
here)
i can't get the real homepage content by the following code,
what can i do?

i did post to c# newsgroup, they tell me some idea and introducing me to
post here

hidden direct/real homepage address is for security purpose or for clear or?

if it is not related to remoting
which newsgroup should i post to?

THANK YOU SO MUCH

using System;
using System.Net;
using System.IO;
using System.Collections.Generic;
using System.Text;

namespace Web
{
class Program
{
static void Main(string[] args)
{
string RateHTML = "";
string tempHTML = "";

for (int i = 0; i < 10; )
{

try
{
// Download the data to a buffer.
WebClient client = new WebClient();

Byte[] RateHP =
client.DownloadData("http://www.livescore.com/default.dll?page=home");
RateHTML = Encoding.ASCII.GetString(RateHP);

// Download the data to a file.
client.DownloadFile("http://www.livescore.com/default.dll?page=home",
"check.txt");
}
catch (WebException webEx)
{
Console.WriteLine(webEx.ToString());
if (webEx.Status == WebExceptionStatus.ConnectFailure)
{
Console.WriteLine("Are you behind a firewall? If
so, go through the proxy server.");
}
}

DateTime TimeNow = DateTime.Now;
if (tempHTML != RateHTML)
{
Console.WriteLine("Score change {0,1}:{1,2}{2,5}",
TimeNow.Minute % 10, TimeNow.Second, TimeNow.Millisecond);
tempHTML = RateHTML;
}
else
{
Console.WriteLine("Unchange {0,1}:{1,2}{2,5}",
TimeNow.Minute % 10, TimeNow.Second, TimeNow.Millisecond);
}

i++;
}
} // end Main
}
}




Reply With Quote
  #2  
Old   
ahhijxjdlk
 
Posts: n/a

Default Re: Determine Homepage content change - 11-22-2007 , 06:00 PM






Hello! Good Site! Thanks you! idwrwvmgxdbh

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.