Jump to content

Facebook Share


suzie

Recommended Posts

Dear Friends,On our website we have the facebook button to let the visitors share the article on facebook....the link to share is in this form:http://www.annahar.com/new-website/content.../$type/dayafter sharing it, when click on the shared link it opens in this form, so it seems that it understands the forward slash as %2F, it encode ithttp://www.annahar.com/new-website/content...#036;type%2FdayWhat shall I do in this case..please help

Link to comment
Share on other sites

For me it's the other way, with the %2F it gets displayed, but not with the slashes.If the browser is automatically encoding those characters before it sends the request to the server then you can't really stop it from doing that. If this is going to URL-rewriting, then you can either change the rules so that it also looks for %2F in the request in addition to the slash, or you can change the character to something other than a slash and have it look for that instead.

Link to comment
Share on other sites

Thanks a lot for your replythe way am using to look about the slash and separate the URL is :if (!empty($_SERVER['QUERY_STRING']) ) { $q = $_SERVER['QUERY_STRING']; $pairs = explode ('/', $q); $len = count($pairs); for ($i = 0; $i < $len; ++$i) { list($a, $:) = explode('/', $pairs[$i]); $_GET[$a] = $b; }} $table = $pairs[1]; $type = $pairs[2]; $priority = $pairs[0];So please, is there a way to let it explode for the slash and the %2F at the same time??thanks a lot

Link to comment
Share on other sites

Well, the server should actually do that conversion. The URL says %2F, but I believe that PHP should translate that back to a slash when it reads it. Maybe I'm wrong, I could be thinking about something else. If it doesn't do it automatically, you can do it yourself with this:http://www.php.net/manual/en/function.urldecode.php$q = urldecode($_SERVER['QUERY_STRING']);

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...