28, May 2012

[Help] dynamic-thumbnails-from-websites - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Miscellaneous scripts or snippets (Moderator: Olaf)
Topic: [Help] dynamic-thumbnails-from-websites
« previous next »
Pages: [1] Print

Author Topic: [Help] dynamic-thumbnails-from-websites  (Read 2573 times)
Atari ST fan
*
Posts: 8
52 credits
Members referred : 0


« on: Mar 10, 2007, 04:26:39 pm »

I read this tutorial:
http://www.web-development-blog.com/archives/dynamic-thumbnails-from-websites/

but it not work with me:
http://www.MyDomain.com/thumb.php?url=webdigity.com

this the code in [thumb.php]:
<?php
function thumbnail($url) {
$client_id 'sc010xxx'// your client ID
$signature '2007'// the signature you entered @ girafa 
$concatenated $signature.$url;
$MD5_Hash =    md5($concatenated);
$signature substr($MD5_Hash1616);
$url urlencode($url);
$str 'http://scst.srv.girafa.com/srv/i?i=';
$str .= $client_id .'&r='$url .'&s='$signature;
return 
$str;
}
?>


Please tell me how to correct it,
and how to use the second script to cache the thumbnails on my own web server


Best Regards.
« Last Edit: Mar 11, 2007, 02:38:06 am by Samhan »
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #1 on: Mar 10, 2007, 05:55:37 pm »

What error you get?

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Atari ST fan
*
Posts: 8
52 credits
Members referred : 0


« Reply #2 on: Mar 10, 2007, 05:57:34 pm »

There is no error! only blank screen!
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #3 on: Mar 10, 2007, 06:04:45 pm »

Try this first :

ini_set('display_errors',true);?>

Do you get any error now?

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Atari ST fan
*
Posts: 8
52 credits
Members referred : 0


« Reply #4 on: Mar 10, 2007, 07:41:14 pm »

Hello Nikolas,


I add that line, the same thing blank screen!

I'm using that [thumb.php] with other scripts, and I link with it by <img> code:
Code:
<img  src="/thumb.php?url=www.somedomain.com" width="160" height="120" />

the resulte is X image!
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #5 on: Mar 10, 2007, 08:26:55 pm »

Can you tell us the url of your script?

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Atari ST fan
*
Posts: 8
52 credits
Members referred : 0


« Reply #6 on: Mar 10, 2007, 08:40:23 pm »

« Last Edit: Mar 11, 2007, 12:51:47 am by Samhan »
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #7 on: Mar 10, 2007, 08:58:09 pm »

I have used the exact snippet you posted and it is working.

The use should be something like :

echo '<img  src="'.thumbnail('example.com').'" width="160" height="120" />'?>
« Last Edit: Mar 10, 2007, 09:01:22 pm by Nikolas »

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Atari ST fan
*
Posts: 8
52 credits
Members referred : 0


« Reply #8 on: Mar 10, 2007, 09:22:34 pm »

Thank you!
the other thing if I want to cache the thumbnails on my own web server?
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #9 on: Mar 10, 2007, 09:32:13 pm »

Check those functions :

file_get_contents
fopen
fwrite
fclose

If you need any assistance post in the forum Wink

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Atari ST fan
*
Posts: 8
52 credits
Members referred : 0


« Reply #10 on: Mar 10, 2007, 09:34:06 pm »

thank you Cool
I think it's the last one  Wink
Tim Nash
Global Moderator
Community Supporter ?
Internet Junkie
*****
Posts: 2175
5052 credits
Members referred : 2


Venture Skills - New Media & IT group


« Reply #11 on: Mar 10, 2007, 10:18:31 pm »

Check those functions :

file_get_contents
fopen
fwrite
fclose

If you need any assistance post in the forum Wink
many servers don't allow the use of fopen, and file_get_contents for security reasons so you may wish to look at curl instead if yoyur server is one of them, for example Dreamhosts prevents fopen

Would you like to be an SEO, let me help with, The Tim Nash introduction to SEO alternatively for Social media optimisation take a look at the Venture Skills Blog

Last blog : Its all in the mp3s
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #12 on: Mar 10, 2007, 10:35:39 pm »

Right, you can check this cURL tutorial for more information on curl.

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Atari ST fan
*
Posts: 8
52 credits
Members referred : 0


« Reply #13 on: Mar 11, 2007, 03:04:50 am »

Hello again,

I think I have problem with $Signature code, I check both Signature resulte from the script and from Thumbnail URL Generator at Girafa.
they are not same code! for that I get X image!
for ex:
when I check msn.com in Thumbnail URL Generator the Signature will be:
4d9d906c622f00c6
but from this script [thumb.php]:
6daf94d3156e446d
Atari ST fan
*
Posts: 8
52 credits
Members referred : 0


« Reply #14 on: Mar 11, 2007, 03:52:01 am »

I fix it, thank you again for help.
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #15 on: Mar 12, 2007, 08:45:33 am »

Thanks people to help this guy with my tutorial Cheesy

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5799
46391 credits
Members referred : 3



« Reply #16 on: Mar 12, 2007, 08:49:24 am »

Thanks people to help this guy with my tutorial Cheesy

No problem. I will charge this to your account Tongue Tongue Tongue

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6194
Tags : [Help] dynamic-thumbnails-from-websites Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Miscellaneous scripts or snippets (Moderator: Olaf)
Topic: [Help] dynamic-thumbnails-from-websites
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 06:49:47 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.