Results 1 to 4 of 4
Jan 5, 2008, 01:15 #1
curl and file get contents...queries
we are planning to have forex,weather in our sites....
one way to use was use rss,some external includes...as there is no way we can hire a person to look around weather ,forex and enter data manually again and again...(pratically ...for small sites)
another things that include may hamper the repuatation badly and sites may seems unprofessional...
so we heard of curl and file get contents....function...
is it safe to use...somewhere we read it brings security problems later
which one to use curl or file get content..which one is better
does these functions have future ..or it is much debated things and can be closed later?
legally ...as forex and weather are quite universal data..there should not be huge (we mean "huge"..we know there is always some issues grabbing contents from other site) issues relating to it
so any suggestion...
by the way are there any such forex and weather service,scripts which retrives data internally...(doesnt not ad) and works with in our website...
Jan 5, 2008, 08:29 #2
- Join Date
- Nov 2004
- Lincoln Nebraska
- 0 Post(s)
- 0 Thread(s)
There are no real security issues with just using Curl or file_get_contents(). How you use what you retrieve can cause a problem, but RSS is pretty safe.
Curl can be made to act more like a standard web user agent. file_get_contents() is just a file system function that can, with the proper ini settings, work with URL's but you have no real control over how it does it in comparison.
If you are retrieving a RSS feed, it may be is freely accessible. However, just because a TYPE of information is very common, does not mean it is free to access. If a company or individual has spent significant money and resources to compile the data, or paid to license it from somewhere else, they have every right to expect to charge for access to it. You are also using their network, which in one way or another cost them money.
Follow the rules as much as possible. Find out if there is an API and if there are any access restrictions.
Jan 5, 2008, 09:29 #3
I am sure there are freely accessible APIs from a few websites that will let you access the kind of information you are trying to fetch. Well defined APIs would provide a far better better and sturdy interface to the external data than than relying on hacked fixes like screen scraping with CURL or file_get_content. As for the security, either CURL or file_get_content could be hazardous if the external site contains malicious code and you do something unscrupulous with the fetched code.
Jan 5, 2008, 10:39 #4
As for the security, either CURL or file_get_content could be hazardous if the external site contains malicious code and you do something unscrupulous with the fetched code.
- Join Date
- Oct 2006
- France, deep rural.
- 17 Post(s)
- 1 Thread(s)
That's been true of everything I have downloaded and looked at so far.
You need to be really careful.
It's certainly given me a few ideas on how to protect my own sites from this kind of behaviour if I were to take offence about how the data is used.