add image redirects parameter
This commit is contained in:
parent
b6310b53c8
commit
4065cba7e7
|
@ -39,7 +39,7 @@ class MetainfoController extends Zend_Controller_Action {
|
|||
}elseif(strpos($text,'[[image:')!== false||strpos($text,'[[Image:')!== false) {
|
||||
$wimag=array('[[image:',']]','[[Image:');
|
||||
$imag=str_replace($wimag,'',$text);
|
||||
$fname="http://wiki.westgis.ac.cn/api.php?format=php&action=query&prop=imageinfo&titles=image:$imag&iiprop=url";
|
||||
$fname="http://wiki.westgis.ac.cn/api.php?format=php&action=query&prop=imageinfo&titles=image:$imag&iiprop=url&redirects";
|
||||
$imagfp=fopen($fname,r);
|
||||
$imagfiles=fread($imagfp,1024);
|
||||
$imagfile=strstr($imagfiles,'http');
|
||||
|
|
Loading…
Reference in New Issue