i have already this code
but for this it makes a pattern like image[1-10].jpg but what i want is to fetch the gallley like this above but also like domain.com/gallery/ what do i get to chance to get this working.
hope someone can tel me the tric.
$parts = preg_split("/\[\d+-\d+\]/", $url, -1, PREG_SPLIT_DELIM_CAPTURE);
preg_match_all("/\[\d+-\d+\]/", $url, $matches, PREG_PATTERN_ORDER);
$parts_number = count($parts);
$matches_number = count($matches[0]);
// JYM
if ($parts_number==1) {
$image_alt_url=$url;
$url = str_replace("[", '', $url);
$url = str_replace("]", '', $url);
$alto = str_replace("/", '_', $image_alt_url);
$alto = str_replace("www", '', $alto);
$alto = str_replace("http", '', $alto);
$alto = str_replace("https", '', $alto);
$alto = str_replace("jpg", '', $alto);
$alto = str_replace("com", '', $alto);
$alto = str_replace("net", '', $alto);
$alto = str_replace("info", '', $alto);
$alto = str_replace(".com.np", '', $alto);
$alto = str_replace("org", '', $alto);
$alto = str_replace(".", '', $alto);
$alto = str_replace(":_", '', $alto);
$alto = str_replace("-", '_', $alto);
$alto = preg_replace("/[^a-z-_]/",'',$alto);
$alto = str_replace("__", '_', $alto);
$alto = str_replace("___", '_', $alto);
$alto = str_replace("_", '-', $alto);
$alto=substr($alto, 1, -1);
$ary_header = get_headers($url, 1);
$filesize = $ary_header['Content-Length'];
Aucun commentaire:
Enregistrer un commentaire