/    Sign up×
Community /Pin to ProfileBookmark

n00b question..*hides face in shame*

(.*)

What does that mean? ?

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@pyroSep 15.2003 — 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.
Copy linkTweet thisAlerts:
@mg8authorSep 15.2003 — Ah ok.
Copy linkTweet thisAlerts:
@mg8authorSep 15.2003 — 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:apachehtdocsmu.php on line 14


How do I change the execution time?
Copy linkTweet thisAlerts:
@pyroSep 15.2003 — 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...)
Copy linkTweet thisAlerts:
@mg8authorSep 15.2003 — This is the script:

<?php

set_time_limit(100777);


$firstmarkup = "[li][color=orange]";

$secondmarkup = "[/color]
[link=http://users.ign.com/about/";

$thirdmarkup = "]";

$fourthmarkup = "[/link][/li]";

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

Success!

Help @mg8 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.8,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...