I want to make a script that will visit my forums and view each thread once so it will boost up the view count, how can I do that? Basically a script that will visit the a url such as: http://forums.digitalpoint.com/showthread.php?t=211864, then /showthread.php?t=211865, and so on. This is what I have so far: What other way can I do this? Thanks
Why? Do you want to increase the views slowly? You can do something like this. // Keep the script running in the background, even if browser window has been closed. ignore_user_abort(); set_time_limit(0); for ($i = 0; $i < 1000; $i++) { mysql_query('UPDATE vb_thread SET views = (views + 1)'); sleep(60); // Wait a minute and run update again. } PHP: This would increase the views to the current views plus 1000, one by one each minute.
<?php $start_thread = '0'; $end_thread = '3000000'; if($_GET['do'] == NULL){ $do = $start_thread;}else{$do = $_GET['do'];} $next_do = $do+1; if($next_do > $end_thread){ die ('Done');} ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Refresh" content="0; url=<?=$_SERVER['PHP_SELF'].'?do='.$next_do;?>"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <div align="center"><iframe src="http://forums.com/showthread.php?t=<?=$do;?>" frameborder="1" width="400" height="400"></iframe></div> </body> </html> PHP: Peace,