如何使用PHP从谷歌检索数据

In PHP, I was wondering how to retrieve specific data from a google search. For example if I wanted to retrieve the price on https://www.google.com/#q=ps3&tbm=shop for the first result. I have experimented with curl and domdocs and am not going any where.

The simplest way to get the contents of a webpage in PHP is to use the file_get_contents function.

http://us2.php.net/file_get_contents

Once you have the data, you'll need to parse it. There have been plenty of great articles about how to approach this, so I'm not going to repeat them. Here's a link to a good one:

http://anchetawern.github.io/blog/2013/08/07/getting-started-with-web-scraping-in-php/