mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 02:39:47 +02:00
use medium images from google, not any
This commit is contained in:
parent
134adf17af
commit
6c7d0fffeb
1 changed files with 5 additions and 1 deletions
|
@ -430,7 +430,11 @@ class Album extends database_object {
|
||||||
|
|
||||||
$search = rawurlencode($search);
|
$search = rawurlencode($search);
|
||||||
|
|
||||||
$html = file_get_contents("http://images.google.com/images?source=hp&q=$search&oq=&um=1&ie=UTF-8&sa=N&tab=wi&start=0&tbo=1");
|
//$size = ''; // Any
|
||||||
|
$size = '&imgsz=m'; // Medium
|
||||||
|
//$size = '&imgsz=l'; // Large
|
||||||
|
|
||||||
|
$html = file_get_contents("http://images.google.com/images?source=hp&q=$search&oq=&um=1&ie=UTF-8&sa=N&tab=wi&start=0&tbo=1$size");
|
||||||
|
|
||||||
if(preg_match_all("|\ssrc\=\"(http.+?)\"|", $html, $matches, PREG_PATTERN_ORDER))
|
if(preg_match_all("|\ssrc\=\"(http.+?)\"|", $html, $matches, PREG_PATTERN_ORDER))
|
||||||
foreach ($matches[1] as $match) {
|
foreach ($matches[1] as $match) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue