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("[email protected]", "Forking Results", $message, "From: PHP<[email protected]>\n"); ?> but I cannot get the referrer value from the above script. anyone help me to solve the problem. Link to comment https://forums.phpfreaks.com/topic/76571-help-getting-referrer-value-on-fork-php/ 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. Link to comment https://forums.phpfreaks.com/topic/76571-help-getting-referrer-value-on-fork-php/#findComment-387884 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.