I am trying to make something where you put in a link from an article and it puts out the article so the title, description , ... Is that possible, i think there is a way because some websites do it. And i think it's only compatible with websites that an rss reader can read. Can somebody help me or give me a little help on how to do it with simple pie for example.
Asked
Active
Viewed 69 times
0
-
Is this article on your server or someone else's? – George Reith Sep 01 '12 at 21:31
-
This is a very broadly phrased question. Is there some specific step you're stuck on? – millimoose Sep 01 '12 at 21:31
-
cURL the data and parse it using DOMDocument. There's your info :) – PeeHaa Sep 01 '12 at 21:31
-
Please be more precise, where what is stored. This kind of question can't really be answered. – SteAp Sep 01 '12 at 21:32
-
the article comes from a blog. It actually the same thing as the reader function in safari. And you can copy the url in a web app and the web app will display it clean. Just like the reader function on safari. – Simon Vermeir Sep 01 '12 at 21:49
1 Answers
0
This is the reason why RSS exists - A way to read information in a standardized way.
In the pre html5-era every web-developer is more or less inventing his own format, because xhtml, html4 didn't have the right semantic elements for this.
A few examples:
<div class="article">
<h1>Article</h1>
<p>Content Content Content Content Content</p>
</div>
<div class="article">
<span class="arcticleHeader">Article</span>
<div class="left">Content Content Content Content Content</div>
</div>
with html5 it is different.
there are much more semantic elements like <article>
, <header>
, <footer>
.
but you can still not know, how the content is actually structured.
you should use, a well defined format for this like RSS, ATOM, RDF.
Wikipedia describes this problem very well
A standardized XML file format allows the information to be published once and viewed by many different programs.
-
Thanks, but how do you get the content out a url from an article which has
tag's in it. There has to be some javascript or php code required. And i can't an example from that anywhere. Services like digg use this i think. – Simon Vermeir Sep 01 '12 at 21:52 -
[parsing rss in php](http://rssphp.net/) and [php xml parser](http://php.net/manual/de/book.xml.php) – mo. Sep 01 '12 at 21:56