Idle curiosity

becomes a heavy load

Page 1 of 1

4 Replies - 708 Views - Last Post: 21 February 2008 - 09:57 PM

#1 Re@p3rM4n  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 42
  • Joined: 05-February 08

Idle curiosity

Post icon  Posted 21 February 2008 - 09:21 AM

just an idle curiosity, how would you write a program, maybe in jscript, maybe in another language, to access information from a site and format+display it on another.
-M
Is This A Good Question/Topic? 0
  • +

Replies To: Idle curiosity

#2 ap0c0lyps3  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 83
  • Joined: 19-June 07

Re: Idle curiosity

Posted 21 February 2008 - 11:43 AM

Well you could do an AJAX request except browsers block them from accessing any website but the one it came from. The other way of doing it is creating an invisible iframe with the src as the page with the information you want. Then all you do is read the information, do what you want with it and destroy the iframe.
Was This Post Helpful? 0
  • +
  • -

#3 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1875
  • View blog
  • Posts: 20,283
  • Joined: 17-March 01

Re: Idle curiosity

Posted 21 February 2008 - 11:48 AM

Google "page scraping" and the language you want to use.

There are various ways to do it, from simply finding a start and end point on the page and using a mid(start,end,string) type function to display just the part you want, to breaking down the pages DOM and pulling out the part you want.
Was This Post Helpful? 0
  • +
  • -

#4 Re@p3rM4n  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 42
  • Joined: 05-February 08

Re: Idle curiosity

Posted 21 February 2008 - 08:38 PM

View Postap0c0lyps3, on 21 Feb, 2008 - 11:43 AM, said:

Well you could do an AJAX request except browsers block them from accessing any website but the one it came from. The other way of doing it is creating an invisible iframe with the src as the page with the information you want. Then all you do is read the information, do what you want with it and destroy the iframe.


ok, i think i can work out how to do that, second part of question, how would you format say numbers picked from a site into a table? as simple as storing in vars? not as?
-R
Was This Post Helpful? 0
  • +
  • -

#5 Mike007  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 7
  • View blog
  • Posts: 332
  • Joined: 30-August 07

Re: Idle curiosity

Posted 21 February 2008 - 09:57 PM

I would just use a on my page <div id="external_content"></div> and then in javascript i would use the innerHTML property to add html to the div.

Just one more thing, regular expressions are your closest friend when it comes to scraping and text processing. I myself just started using them, I really had no idea how much power they had in them.

http://www.regular-expressions.info
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1