Problem wit thumb in php plus short url script

Update: The content in this post maybe out of date or inaccurate.

Hello and sorry for my English.

My Problem.
i have a webpage with this script php plus advanced short url script.
I have generate a secret kex. but i have no thumbs on my site. I have found this php file for generate the thumb. Here the code from the file:

<?php

if(!defined('ANTI_DIRECT')) exit(header('location: ../'));

function domainThumb($domain,$size='sm') {

        global $_config;

        if($_config['thumbKey']) {
                $failed = 'upload/domainThumbs/_failed.'.$domain.'.jpg';

                if(is_file($failed)) $timeout = time() - filemtime($failed);

                if(!is_file($failed) || $timeout > 1*24*60*60) {
                        $request_url =  "http://images.shrinktheweb.com/xino.php?"
                                        . "Service=".           "ShrinkWebUrlThumbnail"
                                        . "&Action=".           "Thumbnail"
                                        . "&stwaccesskeyid=".   $_config['thumbKey']
                                        . "&stwsize=" .            $size
                                        . "&stwu=" .               $_config['thumbSecretKey']
                                        . "&stwurl=http://www.rhwm.eu" .      $domain;

                        $line = implode(file($request_url));
                        $num_matches = preg_match('/<[^:]*:Thumbnail\\s*(?:Exists=\"((?:true)|(?:false))\")?[^>]*>([^<]*)<\//', $line, $matches);
                        if($num_matches == 1) {
                                $thumbnail = $matches[2];
                                $imagedata = @imagecreatefromjpeg($thumbnail);
                                if($imagedata != '') {
                                        imagejpeg($imagedata,'upload/domainThumbs/'.$domain.'.jpg',90);
                                        if(is_file($failed)) unlink($failed);
                                        return true;
                                } else {
                                        copy('env/pix/pixel.gif',$failed);
                                }
                        }
                }
        }
        return false;
}

?>

I can not find the problem. Please cam you help me ?

Rainer

Imagen de g0dxilla
g0dxilla
The Lizard King
Desconectado
Integró: 04/15/2008
Visitar g0dxilla's Sitio web

Hey Rainer,

Have you got both of our keys added to the script? If you will notice there are 2 keys highlighted in your lobby.

Can you provide an example page where this is not working?

Best Regards,

Frank

rainercfm (no verificado)

Hi

Thank you for your help. Now, i have repair the problem. The problem wars the url in the php file. I have write my url, but in this line i dont write any url.
Now , i have my Thumbs on my Site. And its great.

See my Website niow: http://www.rhwm.eu
and go to the Point: Link-Hits

Imagen de puravida
puravida
Jedi Warrior
Desconectado
Integró: 09/01/2007
Visitar puravida's Sitio web

Hello,

I do not see any problem with your script, at first glance.

We cannot offer free support for things like this, but one suggestion is that I noticed you are using imagecreatejpeg to open the remote image location. Keep in mind that allow_url_fopen must be set to ON for that to work properly. If that turns out to be your problem and you cannot modify that setting, then you could consider using cURL instead.

Take a look at a relevant article I found by searching the forum for "allow url fopen"

rainercfm (no verificado)

Hi

Thank you

I have fix the problem.
The problem is in my php file.
In the php file is this: "&stwurl=http://www.rhwm.eu"
i have now write this : "&stwurl=http://"

an now i have my Thumbs perfect.
See please ma Website : http://rhwm.eu/ShortPopular

But in the php file i can not see the option to the Thumb size.
i will make the Thumbs great. I see in my php file no size.

Thank you.

Imagen de g0dxilla
g0dxilla
The Lizard King
Desconectado
Integró: 04/15/2008
Visitar g0dxilla's Sitio web

That's great glad to hear it!

Best Regards,
Frank Grogan

rainercfm (no verificado)

Thank you for all your help.

Thank you very much.

Rainer from Germany

Imagen de puravida
puravida
Jedi Warrior
Desconectado
Integró: 09/01/2007
Visitar puravida's Sitio web

You're very welcome Smile

Topic locked

ShrinkTheWeb® (Sobre STW) es otra innovación de Neosys Consulting

Contáctenos | PagePix Benefits | Learn More | Nuestros socios | Política de privacidad | Términos de uso

©2014 ShrinkTheWeb. All rights reserved. ShrinkTheWeb is a registered trademark of ShrinkTheWeb.