Page 1 of 1

Gas Price Script

Posted: Mon Aug 07, 2006 4:10 pm
by Tomcat7194
Hello everyone, I'm trying to find a script that will show the average US gas price. There are a lot of sites that give a national number (Gasbuddy.com is a big one, MSN Autos has it too), but none of them appear to offer an RSS feed or a script that I could modify. After extensive Googleing, I've yet to find a solution. Does anyone know of a gas price script or some other method for making the US national gas price average into a PHP variable?

Failing that, does anyone know of a script that will simply display the US average price for crude oil?

Thanks
Tom

Posted: Mon Aug 07, 2006 4:14 pm
by RobertGonzalez
Not sure if it will help, but have you had a look at GasPriceWatch.com?

Posted: Mon Aug 07, 2006 4:30 pm
by Tomcat7194
I did, but it doesn't seem to provide any actual feeds. Is there a way that one could somehow get data from the source code?
Tom

Posted: Tue Aug 08, 2006 12:55 pm
by RobertGonzalez
Possible...Yes. Ethical... not so sure (unless you get their permission). Have you tried to contact them to see about syndicating their data?

Posted: Tue Aug 08, 2006 1:08 pm
by shiznatix
yes it could be illigal (you steal their hard discovered content).

take a look at:

Code: Select all

echo file_get_contents('http://sitename.com');
and you might find yourself something interesting