Are you a regular stikked user? Signup so you can keep track of your pastes!
  1. $split = explode(" ", $url);
  2.  
  3.         foreach ($split as $item) {    
  4.             $fv = $this->set_favicon($item);
  5.  
  6.             // Return the url without any "/", "www" or "http" -> http://www.example.com = example.com
  7.             // get host name from URL
  8.                         preg_match("/^(http:\/\/|www.|https:\/\/)?([^\/]+)/i", $item, $matches);
  9.                         $host = $matches[2];
  10.                        
  11.                         // get last two segments of host name
  12.                         preg_match("/[^\.\/]+\.[^\.\/]+$/", $host, $matches);
  13.                         $host_url = $matches[0];
  14.  
  15.             // Strips off the .[end] from the host url -> example.com = example
  16.             preg_match($many, $host_url, $matches);      
  17.             $name = $matches[1];
  18.  
  19.             // The file name = what is saved on the server, we want this to be the host as there can be -> example.com, but also example.org etc. which all is different sites!
  20.             $file_name = $host_url.".ico";

Reply to "Untitled"

Here you can reply to the paste above

Create a snipurl

Make Private

Feeling clever? Set some advanced options.