chwebdesigns Posted March 12, 2008 Share Posted March 12, 2008 is there a way of reading the current url and then attatching that for a link to bookmark it in facebook for example. (if this makes sense) cheers. ch p.s. sorry if this seems like a stupid question!!! :S Link to comment https://forums.phpfreaks.com/topic/95853-getting-the-url/ Share on other sites More sharing options...
soycharliente Posted March 12, 2008 Share Posted March 12, 2008 You could grab the full URL using $_SERVER most likely. I'm not sure I understand what you mean by bookmarking it in something like Facebook though. Link to comment https://forums.phpfreaks.com/topic/95853-getting-the-url/#findComment-490725 Share on other sites More sharing options...
chwebdesigns Posted March 13, 2008 Author Share Posted March 13, 2008 well to bookmark a site in facebook, you need the http://www.facebook.com/sharer.php?u=YOUR URL and i wondered whether there was a quick way to use this link in a template so that the php code reads the current URL , and then imputs it into the facebook URL to bookmark it Hope this makes more sense Link to comment https://forums.phpfreaks.com/topic/95853-getting-the-url/#findComment-491488 Share on other sites More sharing options...
discomatt Posted March 13, 2008 Share Posted March 13, 2008 $this_page = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; Give that a shot. Link to comment https://forums.phpfreaks.com/topic/95853-getting-the-url/#findComment-491513 Share on other sites More sharing options...
chwebdesigns Posted March 13, 2008 Author Share Posted March 13, 2008 that's great thanks SOLVED Link to comment https://forums.phpfreaks.com/topic/95853-getting-the-url/#findComment-491558 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.