Celebslam Posted November 9, 2006 Share Posted November 9, 2006 Example Picture: http://www.celebslam.com/hillary-duff-had-it-coming/hilary-duff-stalked-by-russian-maksim-miakovsky/From this post: http://www.celebslam.com/hillary-duff-had-it-coming/As you can tell, there's no way to tell the picture came from an original story (unless you look at the URL but not everyone is that savvy). How do I provide a link back to the original story from the image page (I'm using an attachment.php on wordpress)? Quote Link to comment Share on other sites More sharing options...
Monkeymatt Posted November 9, 2006 Share Posted November 9, 2006 You could take the url using $_SERVER['PHP_SELF'] or $_SERVER['REQUEST_URI'] and split off the last folder-type section: (untested code)[code]<?php$link=preg_replace("#(http://(www.)?([^\.]*)\.[a-z]{2,4}/([^/]*)/)(.*)/#Ui", "\\1", $_SERVER['REQUEST_URI']);?>[/code]Monkeymatt Quote Link to comment Share on other sites More sharing options...
Celebslam Posted November 11, 2006 Author Share Posted November 11, 2006 didn't seem to work Quote Link to comment 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.