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("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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.