DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Sun, 5 Aug 2007 09:45:07 +0800,    posted on: microsoft.public.dotnet.framework.remoting        back       

Thread Index
  1    Macneed


Determine Homepage content change   
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
    }
}
Date:Sun, 5 Aug 2007 09:45:07 +0800   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us