Computer Science Canada Reading multiple webpage directories |
Author: | TokenHerbz [ Sat Apr 29, 2006 5:18 pm ] |
Post subject: | Reading multiple webpage directories |
Hi. Im having a hard time getting my turing program to read a website, and its directories (like other parts which are not the main page). I need to read these pages, and then save them to compare them with a new read of the pages in a 5 minute span. If the pages change, i want it to return a message saying so. I've been looking around, and checking turings manual, and there is nothing which seems to be able to do this, so i would like to know how it would be done, so i may attempt to write a code to do this. I don't think turing is incapable of this task, though i could be wrong. if there IS a command which can help me a great deal, please enlighten me with it. Any and all information based on this you should post ![]() |
Author: | Thuged_Out_G [ Sat Apr 29, 2006 6:22 pm ] |
Post subject: | |
I dont believe turing is capable of this, although i could be wrong aswell. If it is capable, i would imagine it is something in the Net commands. |
Author: | TokenHerbz [ Sat Apr 29, 2006 6:24 pm ] |
Post subject: | |
I would of assumed the same, and iv'e looked, and tryed to think how i could use them for this purpose but, it seems non are ment to do this thing. I hear something about "HTTP", though... im trying to get answers w/ google |
Author: | MysticVegeta [ Sat Apr 29, 2006 7:52 pm ] |
Post subject: | Re: Reading multiple webpage directories |
TokenHerbz wrote: Hi. Im having a hard time getting my turing program to read a website, and its directories (like other parts which are not the main page).
I need to read these pages, and then save them to compare them with a new read of the pages in a 5 minute span. If the pages change, i want it to return a message saying so. I've been looking around, and checking turings manual, and there is nothing which seems to be able to do this, so i would like to know how it would be done, so i may attempt to write a code to do this. I don't think turing is incapable of this task, though i could be wrong. if there IS a command which can help me a great deal, please enlighten me with it. Any and all information based on this you should post ![]() Well someone did make a program that could make you view the source code of a website on turing (basically reading the html file) you could maybe make a convertor so that after reading the txt from the html file, you could convert that html code into graphics on turing screen, is that what you mean? I am not quite sure.. |
Author: | md [ Sat Apr 29, 2006 9:01 pm ] |
Post subject: | |
IIRC you were asking on the irc channel so you could see if pages changes. We pointed you towards the http protocol. I'd sugest googling for it and reading up on it. |
Author: | TokenHerbz [ Sun Apr 30, 2006 2:24 pm ] |
Post subject: | |
Yeah, i read up on that stuff, and don't exactly know how to use it... let me give you an example of what i intend to do... Say we have a new post topic, well it is a web page link.. So i want to read this page, and 5 minuets later, read it, and compare the new read with the old read. If someone posted a reply, then the page info would be different, (maybe i have to convert it into text in a file or somthing to store the old page info??).. When the pages are different i want the program to tell you, other wise, it wont post nothing. Is the a bit more clear? it's hard to explain exactly what i need. |
Author: | md [ Sun Apr 30, 2006 4:52 pm ] |
Post subject: | |
1) request page from server 2) hash page using MD5 or some other hash function. Store hash. 3) Wait XX time 4) request page from server 5) hash page and compare to previously stored value. If same goto 3, otherwise goto next. 6) do whatever you wanted to do when the page changed. Getting the page is as simple as sending an HTTP request to the server. You can almost certainly do it using the turing net interface. You could either write it to a temporary file or store it in a buffer in memory (char array...). Hashing would be more complex, but the code is out there in other languages you'd just need to convert it to turing and tune it to your particular needs. |