Can't get example.php to show me an example
I've signed up for a free account to try out thmbnl, downloaded the PHP plugin, jumped through some hoops to get PHP running on my local system and looked through the (short) README file 289 times, but I still can't get the example file to work.
I stuck the entire example.php snippet (minus the unusable 'create' function) inside an img tag as the source. I'm getting what looks to be a good URL, but no image is retrieved. Note: I'm only trying to snag the default www.thmbnl.com 320 pixel image as it's set up in the example.
Example URL being returned:
h**p://www.thmbnl.com/snapshots?oauth_version=1.0&oauth_nonce=5ea60584827e57dfa4ac9721d98beb59&oauth_timestamp=1206395144&oauth_consumer_key=Zy8z6Wg6ShP9WuTP&size=320&url=www.thmbnl.com&oauth_token=avPvE3MTsChjnaJK&oauth_signature_method=HMAC-SHA1&oauth_signature=N1U3gXdwAbhVAp6%2FLNKuVszUx54%3D
Is that how the URL should appear? Any suggestions?
I stuck the entire example.php snippet (minus the unusable 'create' function) inside an img tag as the source. I'm getting what looks to be a good URL, but no image is retrieved. Note: I'm only trying to snag the default www.thmbnl.com 320 pixel image as it's set up in the example.
Example URL being returned:
h**p://www.thmbnl.com/snapshots?oauth_version=1.0&oauth_nonce=5ea60584827e57dfa4ac9721d98beb59&oauth_timestamp=1206395144&oauth_consumer_key=Zy8z6Wg6ShP9WuTP&size=320&url=www.thmbnl.com&oauth_token=avPvE3MTsChjnaJK&oauth_signature_method=HMAC-SHA1&oauth_signature=N1U3gXdwAbhVAp6%2FLNKuVszUx54%3D
Is that how the URL should appear? Any suggestions?
1
person has this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Hello.
That is a correctly formatted thmbnl URL. I'm a little confused when you say "I stuck the entire example.php snippet inside an img tag as the source...", so here is an example that may be more useful:
<?php
require_once 'thmbnl.php';
$consumer_key = 'CONSUMER KEY';
$consumer_secret = 'CONSUMER SECRET';
$token = 'TOKEN';
$token_secret = 'TOKEN SECRET';
$t = new Thmbnl( $consumer_key, $consumer_secret, $token, $token_secret );
$thumbnail_src = $t->find('www.thmbnl.com', 320);
?>
<html>
<body>
[img src="<?= $thumbnail_src ?>"/]
-or-
[img src="<?= $t->find('www.thmbnl.com', 100) ?>"/]
</body>
</html>
...just copy in your consumer/token values and it'll be be good to go. If you need more help, just ask.
(Don't forget to change the []'s to <>'s in the img tags above)
Adam -
Inappropriate?aroth:
Thanks very much for demonstrating that. I've since tried the same thing on another machine at a different location and it all works perfectly, so maybe I had a browser issue of some sort. I'll check tomorrow and report back if I find out what's causing the problem. Thanks again! -
Inappropriate?I just got back to the machine where I had left the test open in a browser, hit refresh and it worked. Don't know what was going on, but thanks for the response.
Loading Profile...



