Jump to content

mike42

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mike42's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi guys How can i with preg_match multi div tags matching ex:<div> some text1</div><div>sometxt2</div><div>example</div>... thx
  2. hi i will to grab this image tags and download from source url match string: <div id="divnewsh"><img src="/news/image/imagename.jpeg" alt="blabla" width="300" border="0" class="imgnews"/></div> how can i only image name and ext. (imagename.jpeg) matching if (preg_match('#<div id="divnewsh"><img src="(.*?)"#', $f, $matches)) { $images=$matches[1]; $images=trim($images); $url = "http://urldomain.com".$images; $target = "./news/".$images; $file = fopen($target,"r"); while(!feof ($file)) { $content1 = fgets($file, 4096); $content .=$content1; } fclose($file); $file = fopen($target,"w"); fwrite($file,$target); fclose($file); } thanks..
  3. thnx nrg_alpha i will try
  4. hi guys. i need your help please also my problem is i need to matching this img and download to my ftp this is my code if (preg_match('@<li class="activeMiniImage" id="pic_1"><img id="ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_Images1_NewsDetailImageRepeater_ctl01_image1" alt="" src="../../../../(.*?)" style="border-width: 0px;"><\/li>@', $sub, $im)){ $im = $matches[1]; $im=trim($im); } and match string <li class="activeMiniImage" id="pic_1"> <img id="ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_Images1_NewsDetailImageRepeater_ctl01_image1" alt="" src="../../../../../images/292_0/False/126099.jpg" style="border-width: 0px;"> <span style="display: none;"> </span> </li> thanx
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.