immortal-nights Posted September 2, 2007 Share Posted September 2, 2007 I have the following code on a page for a good while and until recently it has been working fine. <?php echo GetHostByName($REMOTE_ADDR) . " - ip<br>"; echo GetHostByName($HTTP_ACCEPT_LANGUAGE) . " - lang<br>"; echo GetHostByName($HTTP_REFERER) . " - ref<br>"; echo GetHostByName($HTTP_USER_AGENT) . " - agent<br>"; //~ // Collect forwarder information $forwarded1 = getenv(HTTP_X_FORWARDED_FOR); $forwarded2 = $HTTP_X_FORWARDED_FOR; $forwarded3 = GetHostByName($HTTP_X_FORWARDED_FOR); if ($forwarded1 != null) { $forwardCom .= $forwarded1; } if ($forwarded2 != null) { $forwardCom .= " | $forwarded2"; } if ($forwarded3 != null) { $forwardCom .= " | $forwarded3"; } if ($forwardCom == null) { $forwardCom = "No data"; } echo "$forwardCom | $forwarded1 | $forwarded2 | $forwarded3"; ?> The page didn't output the information as the example does, but the above code still processes very slowly. The idea is to collect this information to store in a database, however for some reason the code now seems to lag the page so much that the browser sometimes even attempts to download the .php page, and nothing else on the page is executed correctly. I am sure that the Web host has not updated PHP (its a 3rd party one and they are running PHP 4.x), though if anyone else knows something that could have been updated that would effect this, then please let me know. Anyhow, is there something wrong with the way I collect the information, is there a better way, or is some of it really of no use, or generally why all of a sudden does it not work? Would appreciate any insight into this. Quote Link to comment https://forums.phpfreaks.com/topic/67628-variable-collection-suddenly-running-very-slow/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.