Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/01/2010, 06:56
Hidek1
Colaborador
 
Fecha de Ingreso: octubre-2009
Ubicación: Tokyo - Japan !
Mensajes: 3.867
Antigüedad: 14 años, 6 meses
Puntos: 334
Respuesta: recoger nombre de subdominio?

Código PHP:
Ver original
  1. $text = "www.subdominio.patines24h.com";
  2. preg_match('/^www\.(\w+)\.patines24h\.com$/i',$text,$matches);
  3. echo $matches[1];

asi la obtienes con expresion regular...
__________________
More about me...
~ @rhyudek1
~ Github