Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-28-2012, 07:23 PM   PM User | #1
Trki
Regular Coder

 
Join Date: Jan 2012
Location: Slovakia
Posts: 106
Thanks: 9
Thanked 0 Times in 0 Posts
Trki is an unknown quantity at this point
hm... parsing?

Hi guys :/ I have a rly big problem for me... My classmate asked me if i could help him with one thing on his dad's website. I of course say what u need. And for my suprise i dont know help ... i wasn't expecting this. He wants have the NEWS from http://www.kmss.sk/ website on his website. This website when i am good looking doesnt have a XML RSS.... So. .. what now? :P i was googling all of the day but nothing. I just finded something like parsing? or something like that but ... can somebody send me a great tut for it or ... i dont know something what would help me. I think .. maybe exists something like ... library ? for it, which will parse all the info what i will want and then, when i will have the data in my array i have win ... ah.
Trki is offline   Reply With Quote
Old 01-28-2012, 07:47 PM   PM User | #2
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 891
Thanks: 4
Thanked 205 Times in 204 Posts
tracknut is an unknown quantity at this point
Firstly you might check to see that their usage agreement on the web site allows you to copy the information. By default, it's copyrighted, so unless they say "feel free to copy this", you can't. That might get you off the hook on having to do it

Secondly, if you do have permission, it's called "screen scraping", if you're googling it. Essentially you'd need to CURL the web page over, and parse through it looking for the news of interest. Not particularly fun stuff, and of course if they change the page, your site is likely to break.

Dave
tracknut is offline   Reply With Quote
Old 01-28-2012, 11:59 PM   PM User | #3
Trki
Regular Coder

 
Join Date: Jan 2012
Location: Slovakia
Posts: 106
Thanks: 9
Thanked 0 Times in 0 Posts
Trki is an unknown quantity at this point
Quote:
Originally Posted by tracknut View Post
Firstly you might check to see that their usage agreement on the web site allows you to copy the information. By default, it's copyrighted, so unless they say "feel free to copy this", you can't. That might get you off the hook on having to do it

Secondly, if you do have permission, it's called "screen scraping", if you're googling it. Essentially you'd need to CURL the web page over, and parse through it looking for the news of interest. Not particularly fun stuff, and of course if they change the page, your site is likely to break.

Dave
hm... ok great link i think i was reading this article in past. But ... one problem ...i parsed the text... but when i want take image which is looking like this-> the source code -> <img src="~/media/SK/Navigation/Main-navigation/Model-Visuals/carPreview_Picanto_2011.jpg?h=153&w=250" alt="" width="250" height="153"/>
</a> ??? :P can i somehow?

When it would be normal link i would just add the domain name before but now when i am trying this:

http://www.kmss.sk/media/SK/Navigati...pg?h=153&w=250

link to the browser it will not find the file

Any ideas how to take a image?
Trki is offline   Reply With Quote
Old 01-29-2012, 09:20 AM   PM User | #4
Arbitrator
Senior Coder

 
Arbitrator's Avatar
 
Join Date: Mar 2006
Location: Splendora, Texas, United States of America
Posts: 2,887
Thanks: 5
Thanked 186 Times in 183 Posts
Arbitrator is on a distinguished road
Quote:
Originally Posted by Trki View Post
When it would be normal link i would just add the domain name before but now when i am trying this:

http://www.kmss.sk/media/SK/Navigati...pg?h=153&w=250


link to the browser it will not find the file
You omitted a reference to the directory "~" from the URL.
__________________
Please for the love of god stop making IE. You current "browser"s cause me to cry every day. —Phil *
Arbitrator is offline   Reply With Quote
Old 01-29-2012, 12:01 PM   PM User | #5
Trki
Regular Coder

 
Join Date: Jan 2012
Location: Slovakia
Posts: 106
Thanks: 9
Thanked 0 Times in 0 Posts
Trki is an unknown quantity at this point
Quote:
Originally Posted by Arbitrator View Post
You omitted a reference to the directory "~" from the URL.
hm... sorry? :P didnt understand how did you mean ? :P but solved

Last edited by Trki; 01-29-2012 at 04:13 PM..
Trki is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:37 PM.


Advertisement
Log in to turn off these ads.