Results 1 to 9 of 9

Thread: Stop Time Out

  1. #1

    Thread Starter
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    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

  2. #2
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    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.

  3. #3
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    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).
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  4. #4
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    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.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  5. #5

    Thread Starter
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    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.

  6. #6
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Just out of curiousity, what effect can SESSION and COOKIE have on a page not showing up?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  7. #7

    Thread Starter
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099
    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

  8. #8
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Sorry, I worded my last post wrong -- what effect could COOKIE and SESSION have on dead links? Why are you interested in this information?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  9. #9

    Thread Starter
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099
    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
  •  



Click Here to Expand Forum to Full Width