php - How may Sphider be modified to display an image in search results, without knowing the name of the image -


using code below sphider search engine, sphider display image in search results - if html page , jpg share same name (i.e) page14.html, , page14.jpg.

1) without knowing name of image, how code modified first of 2-3 jpg's displayed html page returned in search results ?

<?php $url_path = "http://www.webpage.com/"; // url indexed pages. $url_ext = ".html";                    // file ext. of indexed pages. $image_path = "../";                   // path image folder. $image_ext = ".jpg";                   // file extension of images. $image = str_replace("$url_path", "$image_path", $url); $image = str_replace("$url_ext", "$image_ext", $image);     if (file_exists($image)) { // nothing } else { $image = $image_path . "ics" . $image_ext; } ?> <img src="<?php print $image ?>" align="left" style="margin-right:10px;" /> 

or,

2) how modify above php code display images below in search results - without renaming images ?

i have many gallery pages hundreds of following html image links;

<a href="page_02.html"><img src="chair_0.jpg"></a> <a href="page_03.html"><img src="table_0.jpg"></a> <a href="page_04.html"><img src="bed_0.jpg"></a> 


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -