$link = "https://www.r10.net/php/318915-devam-et-ibaresi.html"; $konu = end(explode("/",$link)); $sid = explode("-",$konu); $id = $sid[0];