Jump to content

How to get data from a site?


AhellHound

Recommended Posts

I'm trying to get a total download counter for my site (the downloads are from the mod's I've created), and to do this I need to get the number of downloads from multiple sites (2, maybe more later). I've asked the site's admins if they have an API, and they both said no, and they may/may not have one open to the public. So, I was wondering if there's a way to get the number of downloads from the sites, add them together, and create a simple counter on my site. Thanks for reading and the help,AhellHound

Link to comment
Share on other sites

You can use cURL to fetch a page in web or you can even use domDocument to parse html files. But you need to cache the result, otherwise if you try to fetch multiple site on each request and update your page , your page will be slow. But as download counter is so dynamic it wont be much benificial to cache the data if you want something in real time.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...