Jump to content

help getting referrer value on Fork PHP!


prakash

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.