使用PHP中的谷歌图像API获取图像搜索结果的第一个URL

问题描述:

你知道一个PHP脚本(一个类会很好)谁得到谷歌api图像搜索的第一个图像结果的网址?谢谢

did you know a php script (a class will be nice) who get the url of the first image result of a google api image search? Thanks

示例。

<?php echo(geturl("searchterm")) ?>


你应该可以用轻松完成简单HTML DOM

You should be able do that easily with Simple HTML DOM.

注意:有关详细信息,请参阅其网站上的示例。

Note: See the examples on their site for more information.


  • 用PHP5编写的HTML DOM解析器让你以非常简单的方式操纵HTML!

  • 使用像jQuery这样的选择器在HTML页面上查找标签。