Skip to content

Instantly share code, notes, and snippets.

@gofullstack
Created April 22, 2010 15:22
Show Gist options
  • Save gofullstack/375365 to your computer and use it in GitHub Desktop.
Save gofullstack/375365 to your computer and use it in GitHub Desktop.
<?php
// put together the requested (current) URL
$current_url = ($_SERVER['HTTPS'] ? 'https' : 'http') . '://'
. $_SERVER['HTTP_HOST']
. $_SERVER['REQUEST_URI'];
// encode it for use in the src parameter
$current_url = rawurlencode($current_url);
?>
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php
echo $current_url;
?>&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment