Jump to content

Strange nothing happening?


rofl90

Recommended Posts

For some reason this code just goes blank, constantly loading, it should atleast echo the success/failure

<?php
$CONF = array();
$CONF["DATABASE"] 				= 'x';
$CONF["USERNAME"] 				= 'x';
$CONF["PASSWORD"] 				= 'x';
$CONF["HOST"] 					= 'x';
mysql_connect($CONF["HOST"], $CONF["USERNAME"], $CONF["PASSWORD"]);
mysql_select_db($CONF["DATABASE"]);
$first = '100000';
while($first < '9999999') {
	$fileName = "http://www.x.com/x-g--d" . $first . ".html";
	$file = file_get_contents($fileName);
	if(mysql_query("INSERT INTO pages (linkName, theText) VALUES('$fileName', '$file')")) {
		echo "Success\n\n";
		$first = $first + '1';
	}
	else {
		echo "Failure\n\n";

	}
}
?>

Link to comment
https://forums.phpfreaks.com/topic/109786-strange-nothing-happening/
Share on other sites

it probably won't load cause your trying to do 9.8 million loops.

 

PHP processes the script then outputs it to the browser. It will take some time to process 9.8 million loops. Before you try something this large why not run a test on a couple or so to make sure it works.

 

Ray

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.