Jump to content

oh_php_designer

New Members
  • Posts

    8
  • Joined

  • Last visited

oh_php_designer's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks guys. Element, I've seen that before but don't understand how to use it with the links I've provided. Quickoldcar, I totally agree with you. I don't see scores in your link though.
  2. For some reason I can't figure out how to get specific data off a website. I am trying to get a final score for a specific team. http://www.cbssports.com/nfl/scoreboard another way to do it is using google but i cant figure out how to get these scores either: https://www.google.com/?gws_rd=ssl#q=packers+vs+seahawks+final+score
  3. So I added clearstatcache(); Right after the shell_exec command and it didn't help.. Any other ideas?
  4. Izzy, Can you provide a example of what your searching for and also provide an example of what your data looks like?
  5. For some reason when the shell_exec runs, then I run the while loop and it will remove files it will not wait until all files are removed. I even added a sleep to slow it down. The issue is by the time it reaches the update statement (where the line says: "// files should be gone by now -- >" ) the files should fully be deleted and its not. shell_exec("rm -r ".$_SESSION['todays_backup_dir']); $rm_count = 0; $dir_exist=1; while( ($dir_exist==1) || ( $rm_count <= 20) ) { echo "Still deleting files, sleeping for 5 seconds <br>"; $fh = fopen($_SESSION['log_file'], 'a'); fwrite($fh, "Still deleting files, sleeping for 10 seconds \n"); fclose($fh); sleep(10); if(file_exists($_SESSION['todays_backup_dir'])) { $dir_exist=1; $fh = fopen($_SESSION['log_file'], 'a'); fwrite($fh, "Still deleting files, sleeping for 10 seconds \n"); fclose($fh); sleep(10); } else { $dir_exist=0; echo "Directory was removed successfully <br>"; $fh = fopen($_SESSION['log_file'], 'a'); fwrite($fh, "Directory was removed successfully \n"); fwrite($fh, "Sleeping 5 seconds then exiting loop \n"); sleep(5); fwrite($fh, "updating watcher settings set currently_watch = 'Y' \n"); // files should be gone by now, update table -- > $upd_monitor_on = mysql_query("update watcher_settings set currently_watch = 'Y'") or die(mysql_error()); fclose($fh); break; } $rm_count = $rm_count + 1; } if($dir_exist==1) { sleep(10); $fh = fopen($_SESSION['log_file'], 'a'); fwrite($fh, "Directory was not removed, dont want to leave the monitor off, setting back to on as the default setting \n"); fwrite($fh, "updating watcher settings set currently_watch = 'Y' \n"); fclose($fh); // even though the backup directory was not removed we don't want the monitor to remain off $upd_monitor_on = mysql_query("update watcher_settings set currently_watch = 'Y'") or die(mysql_error()); }
  6. mac_gyver thank you so much! I was thinking it would do that at runtime yes. Your idea was perfect and I appriciate your help !
  7. so when doing the following: $get_ignore_files = mysql_query("select file_name from ignore_files") or die(mysql_error()); $ignore_loopcounts=0; while ($row = mysql_fetch_array($get_ignore_files)) { $ignore_file = $row['file_name']; if($ignore_loopcounts ==0) { $_SESSION['ignore_file_string'].= "$"."file_to_scan == '".$ignore_file."'"; } else { $_SESSION['ignore_file_string'].= "||$"."file_to_scan == '".$ignore_file."'"; } $ignore_loopcounts=$ignore_loopcounts+1; } for $_session['ignore_files_string' I get the results: $file_to_scan == '/home/a2222/public_html/test2.txt' (file in my table) this is expected... when my if statement test it, it does not work if ( $file_to_scan == $_SESSION['log_file'] || $file_to_scan == $_SESSION['monitor'] || $file_to_scan == $_SESSION['monitor.ini'] || $file_to_scan == $_SESSION['monitor_detected_file'] || $file_to_scan == $_SESSION['root_path'].'/'.'class.phpmailer.php' || $file_to_scan == $_SESSION['root_path'].'/'.'class.smtp.php' does not work --> || $_SESSION['ignore_file_string'] but this does --> //|| $file_to_scan == '/home/a2222/public_html/test2.txt' ) if I echo out the session variable for ignore_file_string, it matches the line that works. what is going on ????
×
×
  • 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.