Collection of mostly command line tools / PHP scripts. Somewhat out of date.

⌈⌋ ⎇ branch:  scripts + snippets


Artifact [0aad16e715]

Artifact 0aad16e715c932b0c37061e58943130553eb7dee:

  • File social-media-links/social.html.php — part of check-in [c49ea11126] at 2014-12-13 17:36:28 on branch trunk — Retrieve count of backlinks to URL from various web services (Facebook, Google+, Twitter, Reddit, StumbleUpon, LinkedIn, Delicious, Pinterest) <em>Shallow merge of previous <code>php-scripts.fossil</code> repo.</em> (user: mario size: 763)

<?php
/**
 * description: Generates a static plain-text link list for URL sharing
 *
 */


// escape
$url = htmlspecialchars(urlencode($_REQUEST["url"]), ENT_QUOTES|ENT_HTML5, "UTF-8");

// output
print "
<span class=social-share-links>
<a href=https://plus.google.com/share?url=$url title=google+>g+</a>
<a href=https://www.facebook.com/sharer/sharer.php?u=$url title=facebook>fb</a>
<a href=https://twitter.com/intent/tweet?url=$url title=twitter>tw</a>
<a href=http://reddit.com/submit?url=$url title=reddit>rd</a>
<a href=https://www.linkedin.com/shareArticle?mini=true&amp;url=$url title=linkedin>in</a>
<a href=https://www.stumbleupon.com/submit?url=$url title=stumbleupon>su</a>
<a href=https://del.icio.us/post?url=$url title=delicious>dl</a>
</span>
";