Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Fetching data from another site

Posted on 2014-01-29
8
Medium Priority
?
340 Views
Last Modified: 2014-01-30
Hi,

Would it be possible to check futbol24 and pull "todays" matches from it... then check to see with a team has scored (1-0 or 0-1) and display the text Done next the the team??

Been searching the web for this and not sure what to do... this is also for personal need not financial.
0
Comment
Question by:runnerjp2005
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 34

Accepted Solution

by:
Big Monty earned 2000 total points
ID: 39817895
Generally I would advocate against something like this, as it's not your "content" to just take and use on your own site. However, if this truly is for just personal reasons, I will trust your intentions :)

What you want to look into is what's called screen scraping. There are several products out there that already are built to do this, most of them cost $$. There are also tutorials out there to help you make your own.

This one from 4GuysFromRolla has a tutorial for both classic asp as well as .NET. It's just a matter of creating a web client object, setting the url, and pulling in the data

<%@ Import Namespace="System.Net" %>
<script language="VB" runat="server">
  Sub Page_Load(sender as Object, e as EventArgs)
    'STEP 1: Create a WebClient instance
    Dim objWebClient as New WebClient()


    'STEP 2 and 3
    Const strURL as String = "http://www.aspmessageboard.com/"
    Dim objUTF8 as New UTF8Encoding()
    lblHTMLOutput.Text = objUTF8.GetString(objWebClient.DownloadData(strURL))
  End Sub
</script>

<html>
<body>
  <h1>Screen Scrape of www.aspmessageboard.com</h1>
  <p>
  <asp:label id="lblHTMLOutput" runat="server" />
</body>
</html>

Open in new window


from there it gets tricky as you will then have to parse out all of the data to get the actual results you want.
0
 

Author Comment

by:runnerjp2005
ID: 39818140
I just want to make it easy for me to gather all info in one page rather then trolling through lots of sites... then use it to put together stats for my own use (gambling lol)...


I will give this ago over next few days and come back with result and mark comment if its a result :D
0
 
LVL 34

Expert Comment

by:Big Monty
ID: 39818410
sounds good, let me know if you have any specific questions
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

Author Comment

by:runnerjp2005
ID: 39820310
Hi bm,

I tried the below code
Imports System.Net 
Imports System.IO 


Partial Class football_home
    Inherits System.Web.UI.Page

	
	Sub Page_Load(sender as Object, e as EventArgs)
    'STEP 1: Create a WebClient instance
    Dim objWebClient as New WebClient()


    'STEP 2 and 3
		Const strURL as String = "http://www.livefutbol24.com/Football/Live"
    Dim objUTF8 as New UTF8Encoding()
    lblHTMLOutput.Text = objUTF8.GetString(objWebClient.DownloadData(strURL))
  End Sub
	
	
	
End Class

Open in new window


But the output i get is nothing! - am i doing something wrong?>
0
 

Author Comment

by:runnerjp2005
ID: 39820314
Front page is
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="home.aspx.vb" Inherits="football_home" %>

<!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></title>
</head>
<body>
    <form id="form1" runat="server">
<h1>Screen Scrape </h1>
  <p>
  <asp:label id="lblHTMLOutput" runat="server" />
    </form>
</body>
</html>

Open in new window

0
 
LVL 34

Expert Comment

by:Big Monty
ID: 39820701
Did you get this working? I only ask because you accepted my answer
0
 

Author Comment

by:runnerjp2005
ID: 39820758
Sorry forgot to post ... yes i did thanks so much for your help
0
 
LVL 34

Expert Comment

by:Big Monty
ID: 39820771
ok great, just wanted to make sure you were all set
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question