| Welcome to Webforumz.com. |
|
Jan 10th, 2008, 10:20
|
#1 (permalink)
|
|
Junior Member
Join Date: Aug 2007
Location: Haverhill
Posts: 40
|
Is it possible to parse data from a different website into my website?
I'm not entirely sure where to start on this.
Basically a website I'm currently working on for a Financial Advisor Company want to have a display of the current Stock indices on their page
This information can be easily accessed from various websites.
Ideally they would like parts of the information from the table in this London Stock Exchange page (LSE page)
To my mind the page needs - when accessed/refreshed to access the LSE page
- collect the data from this page
- carry out some manipulations of this data
- display this information on the page
I just don't know really where to start to do this so any help/suggestions would be useful? It doesn't need to be ASP if a different language would be able to do this easier/better?
Last edited by Phil; Jan 11th, 2008 at 09:00.
Reason: mending the broken link
|
|
|
Jan 10th, 2008, 23:35
|
#2 (permalink)
|
|
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
|
Re: Is it possible to parse data from a different website into my website?
I got "400 Bad Request" with your link!
You could do it either ways: I never tried it but the article I found look's promising 
__________________
Last edited by Monie; Jan 10th, 2008 at 23:39.
|
|
|
Jan 11th, 2008, 00:08
|
#3 (permalink)
|
|
Administrator
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
|
Re: Is it possible to parse data from a different website into my website?
The best way is to use the PHP cURL functions.
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.
|
|
|
Jan 11th, 2008, 01:23
|
#4 (permalink)
|
|
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
|
Re: Is it possible to parse data from a different website into my website?
I've use this perfectly  but the Style Sheet seems to be "neglected"
- HTML: Select all
<%
Dim objHTTP
Set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.Open "GET", "http://www.webforumz.com", false
objHTTP.Send
Response.Write objHTTP.ResponseText
%>
__________________
|
|
|
Jan 11th, 2008, 01:41
|
#5 (permalink)
|
|
Administrator
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
|
Re: Is it possible to parse data from a different website into my website?
Monie, the stylesheet is relative the the site.
e.g.
<link href="style.css">
That would refer to a file on your site that you didn't have now that you've stolen someone's page ha.
So you have to replace the link from relative to absolute.
You'd do it like so in php:
- PHP: Select all
//assume $grab holds a string of the page we got $grab = str_replace('style.css', 'http://www.sitename.com/style.css', $grab);
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.
|
|
|
Jan 11th, 2008, 02:08
|
#6 (permalink)
|
|
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
|
Re: Is it possible to parse data from a different website into my website?
Oh I see...
That means we have to "borrow" their .css file and keep/copy it in our local css folder, right!
Cool...
Thanks.
__________________
|
|
|
Jan 11th, 2008, 09:45
|
#7 (permalink)
|
|
Administrator
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 4,102
|
Re: Is it possible to parse data from a different website into my website?
No it means we have to point to there's instead of ours (which doesn't exist).
So we replace the link with a link to their style.css.
__________________
Languages: PHP, mySQL (queries), C#, (X)html, CSS, JS.
|
|
|
Jan 11th, 2008, 23:18
|
#8 (permalink)
|
|
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
|
Re: Is it possible to parse data from a different website into my website?
Right...
That clear things up! Thanks..
__________________
|
|
|
| Thread Tools |
|
|
| Rate This Thread |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|