0

I am trying to get data from a site and be able to manipulate it to display it on my own site.
The site contains a table with ticks and is updated every few hours.
Here's an example: http://www.astynomia.gr/traffic-athens.php

This data is there for everyone to use, and I will mention them on my own site just to be sure.

I've read something about php's cURL but I have no idea if this is the way to go.
Any pointers/tutorials, or code anyone could provide so I can start somewhere would be very helpful. Also any pointers on how I can get informed as soon as the site is updated?

1

2 Answers 2

1

If you want to crawl the page, use something like Simple HTML DOM Parser for PHP. That'll server your purpose.

Sign up to request clarification or add additional context in comments.

1 Comment

after a little studying i figured it out, worked great, thanx
1

First, your web host/localhost should have the php_curl extension enabled.

To start with, you should read a bit here. If you want to jump in directly, there is a simple function here Why I can't get website content using CURL. You just have to change the value of the variables $url,$timeout

Lastly, to get the updated data every 2hrs you will have to run the script as a cronjob. Please refer to this post PHP - good cronjob/crontab/cron tutorial or book

3 Comments

to enable the curl i go wamp/php/phpextentions and tick the curl right? thats all? also, what would be preferable? @bibhas crawling solution or cUrl?
to enable the curl i go wamp/php/phpextentions and tick the curl right? - yes, don't forget to restart your server.
Try to use Simple HTML DOM Parser first for your requirements. developer.practicalecommerce.com/articles/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.