473,395 Members | 1,677 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Determine Homepage content change

I want to write a code to determine the homepage content was change,
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?
if it is not related to c#
which newsgroup should i post to?

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
}
}
Aug 4 '07 #1
1 2083

"Macneed" <ma*****@yahoo.com.hkha scritto nel messaggio
news:46********@127.0.0.1...
>I want to write a code to determine the homepage content was change,
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?
if it is not related to c#
which newsgroup should i post to?
Hi Macneed,
if the remote page is dynamic you cannot get header "Last-Modified".
The unique way I'm finding now is to parse the page and find a specific
section to check if has changed (in contents or length).
I'm not sure it's a legal way..

Try to checkout
microsoft.public.dotnet.framework.aspnet
or
microsoft.public.dotnet.framework.remoting
Bob
Aug 4 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Joe Patrick | last post by:
I currently have a button on my page which allows IE users to add to favouites. It it possible to change it so that It doesnt ask for confirmation (as it already has the correct title and they have...
5
by: George Hester | last post by:
Say I have this in a web page: <center><a href="http://www.microsoft.com">www.microsoft.com</a></center> I can use CSS, the DOM and\or JavaScript to determine the width style.innerHTML.length...
13
by: long5120 | last post by:
I am trying to use webpage with javascript to check if a web server is responding. I was thinking of using 2 frames. Frame1 will have the site, and the Frame2 will be a status bar (not really...
4
by: Rex_chaos | last post by:
hi all, I am sorry for the post first for it's a very popular question here. However, I have seen thousand of post here but no one can tell me HOW TO MAKE A HOMEPAGE RESOLUTION-INDEPENDENT. I have...
7
by: Sabine Jollans | last post by:
Hi, I want to put some words on my homepage so that it is found by search engines. These words should not be visible when viewing the page. I have tried to make background and text the same...
4
by: Diarmaid | last post by:
Hi! I've built a dynamic navigation system which compares the filename in the document URL with the filename in the navigation link in order to determine which link to highlight as "active". ...
3
by: glevik | last post by:
Hello, Anyone that can think of a way to programmaticaly determine the word on an HTML page that the user clicked on will be my hero for life. Leo
3
by: Developer in California | last post by:
I am working on developing a generic Web framework using Master Pages in ASP.NET 2.0. What I have done is created a PageRenderer class which has a public method which will retrieve the path of the...
3
by: Torben Laursen | last post by:
Hi Is there a simple way to control the width of a homepage in asp.net. What I want is the content of the homepage to have a fixed width of e.g. 20 cm surrounded by a background. In that way I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.