Adding php script
-
I have tried several ways of adding the following code below to my pages but have not been able to get the page to display correctly. I have tried various php plugins like exec-php, php exec and many others to no avail. Can anyone give me any insight on what I am doing wrong with the code below. I am basically placing the code inside a new page or post, but when i click to display, it shows the code instead of the store which is what the code is for?
<?php
$SID=”02486A4A-7C45-4014-825D-B0789249A909″;
$IPAddress = urlencode($_SERVER[‘REMOTE_ADDR’]);
$UserAgent = urlencode($_SERVER[‘HTTP_USER_AGENT’]);
$Host=urlencode($_SERVER[‘HTTP_HOST’]);
$PageURL=urlencode($_SERVER[‘SCRIPT_NAME’].’?’.$_SERVER[‘QUERY_STRING’]);
$URL=”http://si.goldencan.com/GetData.aspx?ver=2.0&SID=”.$SID;
$URL=$URL.’&Host=’.$Host;
$URL = $URL.’&PageURL=’.$PageURL;
$URL = $URL.’&IPAddress=’.$IPAddress;
$URL = $URL.’&UserAgent=’.$UserAgent;
include($URL);
?>
The topic ‘Adding php script’ is closed to new replies.