Are you a regular stikked user? Signup so you can keep track of your pastes!
  1.             // Return the url without any "/", or "http" -> http://www.example.com = www.example.com -> http://example.com -> example.com
  2.             // get host name from URL
  3.                         preg_match("/^(http:\/\/|www.|https:\/\/)?([^\/]+)/i", $item, $matches);
  4.                         $host = $matches[2];
  5.                        
  6.                         // get last two segments of host name (Removes possible www)
  7.                         preg_match("/[^\.\/]+\.[^\.\/]+$/", $host, $matches);
  8.                         $host_url = $matches[0];
  9.  
  10.             // Strips off the domainextension from the host url -> example.com = example
  11.             preg_match($many, $host_url, $matches);      
  12.             $name = $matches[1];

Reply to "Untitled"

Here you can reply to the paste above

Create a snipurl

Make Private

Feeling clever? Set some advanced options.