Jump to content

Recommended Posts

Hi,

I  have a Google Image Script that will pull and show google images on my site page. (see link below) But, when I click on the thumb it does not show the larger image. Not sure how to edit the code to make the thumb clickable to the fullsize and larger image.

 

What am I missing from the code below that makes the thumbs clickable to the larger pic?

 

Appreciate it very much!

PT

 

P.S. If you know of a better script to show images on my site that pull from google or others, I'd appreciate that too!

 

My page: http://www.scubabyte.com//Google-Lee...h.php?q=scuba+

 

 

--------------------------------------------------------------------------

 

Code here:

 

 

<?

 

// Name of your site

$sitename = "Image Search";

 

//Your www.scubabyte.com address *Do not use http://

$domain = "www.domain.com";

 

// Path from www without trailing slash /

$pathtoscript = "/webimages";

 

// Body Tag Attributes * Any of these can be left blank

$bgcolor =""; // Background Color

$text =""; // Text Color

$link =""; // Link Color

$alink =""; // Active Link Color

$vlink =""; // Visited Link Color

$backgroundimage = "http://www.domain.com/images/background.jpg"; // Background Image

 

// Header and Footer files

// If they are located somehere else then show full path ex: /home/user/www/header.txt

$headerfile = "header.txt";

$footerfile = "footer.txt";

 

 

// Result text that shows after an image is clicked

$displaytext = "Your Image From $sitename";

 

 

 

 

 

// No need to edit below here

// #######################################################

 

// 0 represents "showing no errors"

// Replacing with E_ALL will "show all errors"

error_reporting(0);

 

 

// Image Variables - imgurl=(image location) imgrefurl=(webpage image was found) h=(height) w=(width) sz=(size)

$imgurl = 'imgurl';

$imgrefurl = 'imgrefurl';

$h = 'h';

$w = 'w';

$sz = 'sz';

 

// imagetype - you cannot add more than the 3 filetypes used here

$jpg = 'jpg';

$gif = 'gif';

$png = 'png';

 

// image size - you cannot add more than the 3 types used here

$icon = 'icon';

$meduim = 'small|medium|large|xlarge';

$xxlarge = 'xxlarge';

// image colors - you cannot add more than the 3 types used here

$mono = 'mono';

$gray = 'gray';

$color = 'color';

 

 

$lang = "en";

$start = $_GET['start'];

$q1 = $_GET['q'];

$q = str_replace(" ", "+", $q1);

$turl = "/imgres?";

$nurl = "http://images.google.com/imgres?";

$therecolor = "#e7eefc";

$ourcolor = "#99CCFF";

$thumnew = "http://images.google.com/images?q";

$thumold = "/images?q";

$didyoumeanold = "/images?svnum";

$didyoumeannew = "$pathtoscript/isearch.php?svnum";

$imagesizeold = "/images?imgsz";

$imagesizenew = "$pathtoscript/isearch.php?imgsz";

$imagecolorold = "/images?imgc";

$imagecolornew = "$pathtoscript/isearch.php?imgc";

$url = "http://images.google.com/images?q=$q&hl=$lang&as_filetype=$imagetype&imgsz=$imgsz&imgc=$imgc&start=$sta rt";

// $url = "http://images.google.com/images?q=$q&hl=$lang&start=$start";

$lines_array = file($url);

$lines_string = implode('', $lines_array);

 

?>

Instead of

$domain = "www.domain.com";

 

Try:

$domain = "www.scubabyte.com";

 

Thanks, I tried it and still not working.  It looks as if it is trying to pull the larger pic from domain and not the domain that the pic originated from. 

 

Any other suggestions? 

 

Thanks very much!!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.