<?php $host = "http://5ka.ru//3/5153/1.html"; preg_match("|^http:\/\/.*\/\/([0-9]+)\/|",$host,$a); print_r ($a[1]); ?>