473,788 Members | 2,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Collecti ons.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.Download Data("http://www.livescore.c om/default.dll?pag e=home");
RateHTML = Encoding.ASCII. GetString(RateH P);

// Download the data to a file.
client.Download File("http://www.livescore.c om/default.dll?pag e=home",
"check.txt" );
}
catch (WebException webEx)
{
Console.WriteLi ne(webEx.ToStri ng());
if (webEx.Status == WebExceptionSta tus.ConnectFail ure)
{
Console.WriteLi ne("Are you behind a firewall? If
so, go through the proxy server.");
}
}

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

i++;
}
} // end Main
}
}
Aug 4 '07 #1
1 2104

"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.publi c.dotnet.framew ork.aspnet
or
microsoft.publi c.dotnet.framew ork.remoting
Bob
Aug 4 '07 #2

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

Similar topics

1
1511
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 clicked). Similarly, is it possible to put a Make homepage link as well (dont care about the confirmation!) -- To reply direct, remove NOSPAM and replace with railwaysonline For the Latest News, Information and Photos check out...
5
1863
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 of the www.micosoft.com. But how can I tell in pixels how far it is from the left side of the client area using JavaScript? If the browser is resized and the text wraps the distance will change. So I need to determine it dynamically. Thanks. --...
13
14618
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 needed). This webpage will call the site's homepage and refresh in 10 seconds. If I can see the homepage then, the site is up, else site is down. I have an example of my code below. My question, is it possible to check the homepage in frame1 (after...
4
6402
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 ever visited some homepage which is resolution-independent but I don't know how the author make it.
7
31560
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 color, but then the text is visible when selected. Is it possible to change the color of selected text?
4
1710
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". The problem I have is that the URL returned by document.URL (and location.href) does not include the filename when I'm sitting on the homepage. This means that when I compare the nav link with the document URL, I don't get a match.
3
2613
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
11589
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 content I want to execute based on the name of the asp:Content control. As shown in the code snippet below, to get the content I want to display, I call the GetContentPagePath public method in PageRenderer passing a string duplicating the value...
3
1112
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 can make sure that the page looks good no matter the size of the users monitor. Thanks Torben
0
10373
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5403
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2897
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.