Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External Link Usage !! #39

Closed
GoogleCodeExporter opened this issue Feb 1, 2016 · 4 comments
Closed

External Link Usage !! #39

GoogleCodeExporter opened this issue Feb 1, 2016 · 4 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. using wordpress. and copy entire posts with the original images links.
2. when my theme use timthumb.php to generate resized copies.
3. it stops because we have "http" external links.

What is the expected output? What do you see instead?
i want to check $src -the link- and redirecting it to external links
resizer function else use the local.

Original issue reported on code.google.com by ismaeel....@gmail.com on 4 Sep 2009 at 5:50

@GoogleCodeExporter
Copy link
Author

I may have a fix for you, but first let me describe what this will/won't work 
on:

Your script will not work cross-domain (meaning you can't link to an image that 
is on
a different server than the script).

However, if you're trying to do something like this: 
http://yoursite.com/timthumb.php?src=http://www.yoursite.com/image.png

Then apply this:

// sort out image source
$src = get_request("src", "");

// remove the http://....com and replace with a relative "/" to root directory
$src = preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*?)?)?)@', '/', 
$src);

Original comment by clay.mci...@gmail.com on 2 Dec 2009 at 12:52

@GoogleCodeExporter
Copy link
Author

Please help me. i can't use remote link to my site. i make tihs but can't work? 
how
to make this. sorry my bad english :)

Original comment by halilibr...@gmail.com on 26 Dec 2009 at 2:49

@GoogleCodeExporter
Copy link
Author

please test the latest version of the script. Previously this was not possible 
but it
has now been allowed for certain domains (flickr.com etc)

Original comment by BinaryMoon on 31 Dec 2009 at 7:15

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

I've tried the beta version, but still won't work. I'm using Google App Engine 
as
CDN, and I've added the domain to the beta file, but it doesn't work.

Original comment by ivan%art...@gtempaccount.com on 7 Jan 2010 at 3:49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant