Log in

View Full Version : Dynamic Data Updating



red03golf
04-03-2011, 05:37 PM
HI.
Total newb here.
I am new to html and webpages but I would like to make a very basic webpage that I keep on my desktop so that it keeps track of a price on another website page so that I don't have to keep going to the webpage and refreshing to see if the price has changed.
I am waiting for a price to drop for a motherboard and would like a script to check the price for me once per day perhaps.
I'm sure there are programs already created that would do this but that wouldn't permit me to learn anything.
Could someone please assist me with this little project?
Thank you.

Beverleyh
04-03-2011, 06:39 PM
This request has left me a little bemused. You say you want a script to refresh a price page for you once a day? what could be simpler that bookmarking the price page and manually refreshing once a day? It just seems like you're creating unnecessary work for the sake of something so straightforward.

The easiest thing you could probably do is look for an auto refresh iframe script - that's assuming that the website with the motherboard price doesn't use a 'break out of frame' script itself.

djr33
04-03-2011, 07:17 PM
It is possible to extract information from another page. But as Beverley says, the request is a little strange. In order to view this page, you would need to load it. So it wouldn't save you any more time than just making a shortcut to this webpage (a bookmark) on your desktop.
There are only two ways around this: 1. Use an auto refreshing page, and keep this open all the time-- if you close it, it won't refresh any more; 2. Use a cron job, which is a method of telling a server to automatically run a certain page at a certain time (for example, once a day) and then using this to check if there is a change and if so do something such as send you an email.

In order to do any of this you would probably need to use a serverside language like PHP, unless you just want to use an iframe and display the page as-is, but I don't see the point in that at all.

Is your goal to learn how to do this sort of thing and what tools are available? Or to actually create something that is useful/functional? Because in my opinion those are two very different things. For the first, there's a lot to explore here. For the second, just check the page once a day yourself and you'll in the end save a lot of time. Realistically, how long are you willing to wait to buy this anyway? A month?

You might even be able to setup a script to automatically run that page every day in your operating system so it acts as an alarm clock. Beyond that, I don't see any way that would really be helpful.


Also, note that depending on how you approach this the website in question may attempt to prevent automated requests (in one way or another) and you might end up blocked, or maybe your script just won't work.

red03golf
04-03-2011, 07:56 PM
This request has left me a little bemused. You say you want a script to refresh a price page for you once a day? what could be simpler that bookmarking the price page and manually refreshing once a day? It just seems like you're creating unnecessary work for the sake of something so straightforward.

The easiest thing you could probably do is look for an auto refresh iframe script - that's assuming that the website with the motherboard price doesn't use a 'break out of frame' script itself.

Thanks for the reply.
Yes, a simple bookmark would be ... well, simple - I agree. But, again, then I won't learn anything new as I learned how to bookmark pages in '92 when I first got on the internet.
I'm not a programmer but I thought that I would venture into something new and start with webpages and that's where I am at.
I decided to make the process more difficult as I'm sure any programmer would agree with - necessity is the mother of invention.
Ok, I'm not inventing here - just looking to learn by someone else's example.
It's fine though I found other ways to do it via excel, ajax, scrapi and scruby. I just have to go through the examples to tailor them to my purposes.
Eventually I would like to put up an online store and keep track of other sites' pricing so I figured that a simple one-item example would be a good trainer and then I'd only need to replicate it for more / other items.
I didn't expect instant attack on a subject just because I want to do something that 'other' people don't see the need for.
Sorry to have bothered you I'll keep my projects to myself from now on.

djr33
04-03-2011, 08:08 PM
There's no need to take our comments as "attacks". We're offering advice from our experience and from the limited information you posted, it didn't seem like a logical approach. As I said, if this is just to find out how, then there are ways to do it, but it won't be any easier than just loading a page when you want to look it up. But as you've now said, if your goal is to keep track of many prices at once, then that's a situation where this would make sense.
However, do keep in mind what I said at the end of my post: you may be blocked from viewing prices on other sites with automated requests, and in fact if these sites find out what you are trying to do, they may intentionally try to block you specifically. It's not really an issue of legality, but it is certainly an issue of business competition. This is why some sites require a login or email confirmation to view the current price.