prakash Posted November 8, 2007 Share Posted November 8, 2007 I created two files using Fork PHP index.php <?php $ip = $_SERVER['REMOTE_ADDR']; exec("/usr/local/bin/php forked_script.php testvalue $ip > /dev/null &"); echo "<center>Hmm, maybe it forked, maybe it didn't get forked! Check your email to see!</center>"; ?> forked_script.php <?php // Get arguments from the argv array $arg1 = $_SERVER['argv'][1]; $arg2 = $_SERVER['argv'][2]; $myReferrer=$_SERVER['HTTP_REFERER']; // Build message $message = "Referrer: $myReferrer\n\n"; $message .= "First argument: $arg1\n\n"; $message .= "Second argument: $arg2\n\n"; // Send email mail("you@yourdomain.com", "Forking Results", $message, "From: PHP<php@localhost.com>\n"); ?> but I cannot get the referrer value from the above script. anyone help me to solve the problem. Quote Link to comment Share on other sites More sharing options...
trq Posted November 8, 2007 Share Posted November 8, 2007 It won't have a value. You'll need to pass the referer as another argument. Quote Link to comment 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.