Source Code for Me (s-c.me)

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Code:
Selected Language:
Show Linenumbers:
Short link for Twitter:
HTML:

HTML view:

Copy Source | Copy HTML
  1. // returns request URI segments, by shuchkin.livejournal.com
  2. function get_uri_segments() {
  3.     $uri = $_SERVER['REQUEST_URI'];
  4.     // cleanup uri
  5.     if (($i = strpos($uri,'?')) >  0) $uri = substr($uri, 0,$i);
  6.     if (($i = strpos($uri,'#')) >  0) $uri = substr($uri, 0,$i);
  7.  
  8.     return trim( str_replace(array('\\','../'), array('/',''), urldecode($uri)), '/' );
  9. }




Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2012