tags:

views:

74

answers:

1

Hello, 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

Example.

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

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

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

  • A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way!
  • Find tags on an HTML page with selectors just like jQuery.
Sarfraz
there is a google API, with standard outputs, parsing an html its NOT a good practice
DomingoSL
@DomingoSL: I would never use a bunch of APIs for such trivial task.
Sarfraz