PWRSHELL.COM


Powershell all the Things!

| HOME | ABOUT | BLOG | GITHUB | TWITTER |

Want to learn powershell? Get Powershell in a Month of Lunches

SOCIAL MEDIA SHARE BUTTONS IN PHP


Published: 2022-4-06

So this came up while I've been building my humble little website.

I needed (well, need is a strong term) some buttons for easy sharing to things like twitter, facebook, and reddit. I didnt want to use use some service, and in keeping with the website theme, it needed to be text only.

Please excuse my terrible HTML skills.
<?php

$uri = $_SERVER['REQUEST_URI'];
echo 
'<table align="center" border="0" cellpadding="1" cellspacing="1" style="width:75%;">
	<tbody>
		<tr>
			<td align="center">
			<br>
			<font size="1"> 
			    Share this page: <a href="http://reddit.com/submit?url=https://www.pwrshell.com'.$uri.'" target="_blank">Reddit</a>
                | <a href="http://twitter.com/share?url=https://www.pwrshell.com'.$uri.'" target="_blank">Twitter</a>	
                | <a href="http://www.facebook.com/sharer.php?u=https://www.pwrshell.com'.$uri.'" target="_blank">Facebook</a>		
			</font>
			</td>
		</tr>
	</tbody>
</table>'

?>

Share this page: Reddit | Twitter | Facebook

Copyright 2022 - pwrshell.com
~ Hand coded with organic home grown PHP and ♥ ~
chris(at)pwrshell.com