Tue Jun 23, 2009 2:34 am
http://www.onemotoring.com.sg/publish/o ... _news.html
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Prac1.aspx.cs" Inherits="Prac1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
Displaying a web page on your own page using Screen Scraping
<br />
<asp:Button ID="btnDisplay" runat="server" onclick="btnDisplay_Click"
Text="Display webpage now" />
<br />
<br />
<asp:Label ID="lblWebpage" runat="server"></asp:Label>
</div>
</form>
</body>
</html>
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Net; //namespace for webclient
using System.Text;
public partial class Prac1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnDisplay_Click(object sender, EventArgs e)
{
WebClient webClient = new WebClient();
const string strUrl = "http://www.onemotoring.com.sg/publish/onemotoring/en/on_the_roads/traffic_news.html";
byte[] reqHTML;
reqHTML = webClient.DownloadData(strUrl);
UTF8Encoding objUTF8 = new UTF8Encoding();
lblWebpage.Text = objUTF8.GetString(reqHTML);
}
}
Sat Jun 27, 2009 8:25 am
Tue Jun 30, 2009 8:41 am
Sun Jul 19, 2009 6:15 pm
http://www.biterscripting.com
script SS_WebPageToCSV.txt page("http://www.onemotoring.com.sg/publish/onemotoring/en/on_the_roads/traffic_news.html") number(11)
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.