|
Posted by shimmyshack on 03/02/07 07:36
On 1 Mar, 21:26, yoko <n...@na.ca> wrote:
> If you go here
>
> http://co.mments.com/
>
> Enter the following url to trackhttp://torrentfreak.com/interview-with-bram-cohen-the-inventor-of-bit...
>
> Click track
>
> Now you will see it added to the page. How do they strip the page to display
> it like that
>
> Please let me know if there are any examples out there or already done php
> code to do this
>
> Thanks..
getfirefox and install the "firebug" and "web developer" addons.
Then you can see the request being made behind the scenes.
The browser posts the URL to http://co.mments.com/track/track
a script on the co.mments.com server then retrieves the XML feed
corresponding to that URL,
and uses something like the SimpleXML PHP library to grab the title
body and so on for that feed, using methods similar to DOM methods
within javascript.
The results are then escaped, and mixed with html, and finally
inserted into the DOM within the browser. As Benjamin says its a
process referred to as AJAX, the real work is done server side, with a
javascript class inside the browser controlling the result in the
browser. CSS finally controls the look and feel.
I guess your next step depends on what you meant by the question!! If
you meant HUWHAT HOW??? do they do that, then you're in for a real
learning curve, if you meant how to they strip the HTML and make it
look pretty, the answer is RSS Feeds, as well as a browser version
there is often a more tightly controlled cut down version intended to
be shared between computers, that's easy to parse for re-display, RSS
is a much more accessible technology, just right click on an RSS
symbol download it and open it in an editor, and change stuff in there
and make it your own.
[Back to original message]
|