Click to See Complete Forum and Search --> : n00b question..*hides face in shame*


mg8
09-15-2003, 10:33 AM
(.*)


What does that mean? :D

pyro
09-15-2003, 10:39 AM
I'm going to assume that it is part of a regexp, and in that case, it would mean this:

The parenthesis means it is a sub pattern, and that the match should be rememberd, the . means to match any character, and the * means to match 0 or more of the previous character. So, basically, that will match any number of any characters.

mg8
09-15-2003, 10:42 AM
Ah ok.

mg8
09-15-2003, 10:52 AM
I got another question:

I get this error when I run a php script:

Fatal error: Maximum execution time of 30 seconds exceeded in C:\apache\htdocs\mu.php on line 14


How do I change the execution time?

pyro
09-15-2003, 11:12 AM
You'll have to have access to the php.ini file to change this. If you do, look for these lines:

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)

and just change the max_execution_time to a slightly higher number (though I'd be curious what the script that maxed it out looked like...)

mg8
09-15-2003, 12:07 PM
This is the script:

<?php

set_time_limit(100777);


$firstmarkup = "";
$secondmarkup = "";
$fourthmarkup = "";

echo ("DragonBall Member Update<br><br>");

$names=file("names.txt");

for($i=0;$i<sizeof($names);$i++){
$fname="http://users.ign.com/about/".trim($names[$i]);
$userpage=fread(fopen($fname,"r"),900000);

eregi('Posts:</B> </td>
([ ]*)?<td class="BoardRowB">(.*)? <a href(.*)?view latest posts', $userpage,$regs);

$mu[$names[$i]]=$regs[2];
}

arsort($mu, SORT_NUMERIC);

while(list($name,$pc) = each($mu)){
echo <<<END
$firstmarkup $pc $secondmarkup$name$thirdmarkup$name$fourthmarkup <br>
END;
}

?>

It is designed to get a number and match it to the username and them print it out. It's for a MU (Member Update) at a forum site.

I have about 30 names in the names.txt file.