|
-
Apr 2nd, 2001, 06:38 PM
#1
Thread Starter
Hyperactive Member
I have been asked to build a site for a sports handicapper and he claims there is a program that strips paragraphs from major sites like ESPN and automatically updates the html on his page. I am trying to understand how this is done and I've got a few ideas, please tell me if I'm on the right track and/or how I should make this happen.
Make a script that gathers the source code for ESPN.com. (I am assuming the paragraphs giving brief tidbits of sports information is always in the same part of the code) Grab the specific lines where the articles are written and add those to a database or some other type of dynamic data container (text file, etc.). The homepage I am building would then reference that file and write the articles.
Is that right? How would I grab the source code? How would I strip a specific article?
If you have heard of this program please tell me the name of it. Thanks.
If you think education is expensive, try ignorance.
-
Apr 3rd, 2001, 04:33 AM
#2
New Member
hai,
to get the particular data first you have to get the view source then you can collect it into one string and you can extract the particular data through search.to get the view source use winsock control or internet transfer control.
Public Function GetPage(URL As String, itc As Inet) As
Dim txt As String
Dim b() As Byte
On Error GoTo ErrorHandler
' This opens the file specified in the URL text box
b() = Inet.OpenURL(URL, 1)
txt = ""
For t = 0 To UBound(b) - 1
txt = txt + Chr(b(t))
Next
' This loads the opened file into the RichTextBox control
GetPage = txt
Exit Function
ErrorHandler:
MsgBox "The document you requested could not be found.", vbCritical
Exit Function
End Function
Private Sub cmdGet_Click()
Text1.Text = GetPage("www.espn.com", Inet)
End Sub
-
Apr 3rd, 2001, 09:07 AM
#3
Thread Starter
Hyperactive Member
That seems like the right track, but isn't that VB?
If you think education is expensive, try ignorance.
-
Apr 4th, 2001, 08:26 AM
#4
Lively Member
Yeah it is vb man,
the site that you have to update is it on the pc that that you pc will run from ?
if it is then vb does not make a difference.
But if it via another way i foresee some serious troubles.
Ask man, ask.
Have Fun ;-)
Maartin
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
if it ain't broke don't fix, rewrite it.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|