Jump to content

Checking File Links


Exoon

Recommended Posts

Hello,

 

I run a site that hosts files on SharingMatrix, I want to be able to keep track of any files that have been deleted. Ive made a script but it seems slow as it has to check over 1000 links.

 

Is there any better way for me to do this? Or even a way to process only 10 links per time or somthing?

 

while($row=mysql_fetch_assoc($result)) {
  if(strlen($row[r_sm]) > 1) {

          $link_str = file_get_contents("$row[r_sm]");
          $pattern = '<input type=hidden name=action value=capt>';
          $pattern = '<p class="fileInfo filename">';

          preg_match($pattern,$link_str,$match);
          
          if ($match[0] != null)  {
              if(strlen($row[r_sm]) > 1) {
                  echo "$row[r_id] = UP <br />";
                } else {
                  echo "$row[r_id] = DOWN <br />";
              }
          }
  }

}

 

Thanks in advance.

 

Link to comment
https://forums.phpfreaks.com/topic/208865-checking-file-links/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.