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