I have a script that includes these lines
include($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'globalFunctions.php');
include('connect.php');
.
.
.
.
.
.
.
.
getPostingDetails($page, $ch);
blue("fb_dtsg = ".$fb_dtsg);
exit;
This is the function i have in the globalFunctions.php which is ../../ folders back
function getPostingDetails($page, $ch) {
preg_match('|fb_dtsg:"[a-zA-Z0-9_-]*"|', $page, $match);
if($match && $match[0]) {
$fb_dtsg = str_replace("fb_dtsg:", "", $match[0]);
$fb_dtsg = trim($fb_dtsg, "\"");
blue("Post Parameter[fb_dtsg]:".$fb_dtsg."<br />");
} else {
red("cant find fb_dtsg");
}
global $fb_dtsg;
}
how come when i run the script it doesnt out put the $fb_dtsg??
blue("fb_dtsg = ".$fb_dtsg);
when i put this line in the code
getPostingDetails($page, $ch);
it does echo out
Post Parameter[fb_dtsg]:AQCYXOEa