PT Posted August 24, 2007 Share Posted August 24, 2007 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); ?> Quote Link to comment https://forums.phpfreaks.com/topic/66560-what-am-i-missing-in-this-code-driving-me-loopy/ Share on other sites More sharing options...
lemmin Posted August 24, 2007 Share Posted August 24, 2007 There isn't any actual code there, it's all variables. The link to your site doesn't work. Quote Link to comment https://forums.phpfreaks.com/topic/66560-what-am-i-missing-in-this-code-driving-me-loopy/#findComment-333381 Share on other sites More sharing options...
PT Posted August 24, 2007 Author Share Posted August 24, 2007 sorry, didn't know the link was broken. Here it is again. http://www.scubabyte.com/Google-Leech_image_search/isearch.php?q=scuba+ Quote Link to comment https://forums.phpfreaks.com/topic/66560-what-am-i-missing-in-this-code-driving-me-loopy/#findComment-333397 Share on other sites More sharing options...
lemmin Posted August 24, 2007 Share Posted August 24, 2007 Instead of $domain = "www.domain.com"; Try: $domain = "www.scubabyte.com"; Quote Link to comment https://forums.phpfreaks.com/topic/66560-what-am-i-missing-in-this-code-driving-me-loopy/#findComment-333416 Share on other sites More sharing options...
PT Posted August 24, 2007 Author Share Posted August 24, 2007 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!! Quote Link to comment https://forums.phpfreaks.com/topic/66560-what-am-i-missing-in-this-code-driving-me-loopy/#findComment-333578 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.