|
-
Jun 24th, 2004, 04:01 AM
#1
Thread Starter
<?="Moderator"?>
Stop Time Out
Hey I have a 404 error page which sends me an email when every something goes wrong so that i know if there are any dead links on my site.
Im trying to get all the variables which the user was passing at the that current time.
This is what im using to get the the data
PHP Code:
$data = "Get\n";
$var = $_GET;
foreach($var as $key => $val)
$data .= "$key==$val\n";
$data .= "\nPost\n";
$var = $_POST;
foreach($var as $key => $val)
$data .="$key==$val\n";
$data .= "\nSESSION\n";
$var = $_SESSION;
foreach($var as $key => $val)
$data .= "$key==$val\n";
$data .= "\nCookie\n";
$var = $_COOKIE;
foreach($var as $key => $val)
$data .= "$key==$val\n";
The problem is that it times out before it can send the email? Does anyone know of a more efficant way of getting the variables
Thanks
-
Jun 24th, 2004, 06:51 AM
#2
Frenzied Member
I think this is what you are looking for:
http://in.php.net/function.set-time-limit
Have I helped you? Please Rate my posts. 
-
Jun 24th, 2004, 06:56 AM
#3
Frenzied Member
You could try this... tho I'm not sure if it would be faster:
PHP Code:
while(list($key, $val) = each($_REQUEST))
{$data .="$key==$val\n";}
The REQUEST array holds all GET, POST, COOKIE elements, but not the SESSION array... (AFAIK).
-
Jun 24th, 2004, 10:48 AM
#4
Stuck in the 80s
Re: Stop Time Out
Originally posted by john tindell
The problem is that it times out before it can send the email? Does anyone know of a more efficant way of getting the variables
That's weird; I wouldn't think that chunk of code would take that long to execute.
-
Jun 24th, 2004, 04:40 PM
#5
Thread Starter
<?="Moderator"?>
Re: Re: Stop Time Out
Originally posted by The Hobo
That's weird; I wouldn't think that chunk of code would take that long to execute.
Its strange on my PC it works fine, but on my web site it timesout
ober0330, I want to know which variables came from which method, Post Get Session etc.
Acidic i dont want the time-outlimit to be increased beacuse i dont the user to wait around as its an error page and i want the user to be redirected ASAP.
-
Jun 24th, 2004, 05:32 PM
#6
Stuck in the 80s
Just out of curiousity, what effect can SESSION and COOKIE have on a page not showing up?
-
Jun 24th, 2004, 05:44 PM
#7
Thread Starter
<?="Moderator"?>
What happens is that the page doesnt get displayed it just waits and waits. I took it off as it wasnt really that important, I just thought it would help me to keep the level of dead links down.
Could also be that on my PC im using PHP 5 and my webhosting is using 4.x
Cheers for all the feedback
-
Jun 25th, 2004, 10:13 AM
#8
Stuck in the 80s
Sorry, I worded my last post wrong -- what effect could COOKIE and SESSION have on dead links? Why are you interested in this information?
-
Jun 25th, 2004, 10:42 AM
#9
Thread Starter
<?="Moderator"?>
I want to know what the user was doing at the time. If the user is logged in, then certain session data is stored. But like I said its not that really important.
Say if they were following links that were generated from a database then i would need to change my code to correct the mistakes. Was just an idea that i thought could help me. O Well
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|