Open Sencillo  2015.003
Long live the simplicity of PHP
 All Data Structures Namespaces Functions
url.management.urlman.php
1 <?php
12 class url
13 {
14  protected $data;
15 
16  public function __construct()
17  {
18  $this->data['content']=$_GET['p'];
19  $this->data['hash']=md5($data.date("YmdHis"));
20  }
21 
27  public function url($array=false)
28  {
29  return ($array===true?$this->data['content']:"//".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
30  }
31 }
32 ?>
url($array=false)