Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: PHP Include... Again!

  1. #11
    Join Date
    Aug 2005
    Posts
    174
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    before the head:

    PHP Code:
    <?php 
    $handset 
    = ("i-mate JASJAR");
    $handsetclean strtolower($handset);
    $make = ("i-mate");
    $makeclean strtolower($make);
    $makeclean2 str_replace(" ""-"$makeclean);
    $id = ("jasjar");
    $tracking $_GET['tracking'];
    $tariff $_GET['tariff'];
    $url str_replace(" ""-"$handsetclean);
    if(
    $_GET['tariff'] == "org"$network = (" On Orange");
    if(
    $_GET['tariff'] == "o2"$network = (" On O2");
    if(
    $_GET['tariff'] == "voda"$network = (" On Vodafone");
    if(
    $_GET['tariff'] == "tmob"$network = (" On T-Mobile");
    if(
    $_GET['tariff'] == "3xnet"$network = (" On Three");
    if(
    $_GET['tariff'] == "payg"$network = (" On Pay As You Go");
    if(
    $_GET['tariff'] == "simfree"$network = (" On SIM Free");
    if(
    $_GET['tariff'] == "xnet1"$network = (" With 100 Free Minutes");
    if(
    $_GET['tariff'] == "xnet2"$network = (" With 200 Free Minutes");
    if(
    $_GET['tariff'] == "xnet3"$network = (" With 300 Free Minutes");
    if(
    $_GET['tariff'] == "xnet4"$network = (" With 400 Free Minutes");
    if(
    $_GET['tariff'] == "xnet15"$network = (" With 500 Free Minutes");
    if(
    $_GET['tariff'] == "op"$network = (" With Free Off Peak Minutes");
    if(
    $_GET['tariff'] == ""$network = ("Online");
    setcookie("tracking"$trackingtime()+31536000);
    ?>
    in the body:

    PHP Code:
    <p>
    <?php if(isset($_GET['tracking']))
    include (
    "http://www.affiliate.com/iframe.asp?hs=$id&tariff=$tariff&col=crazy&ref=mysite.com&tracking=" .$_COOKIE["tracking"]);
    else
    include (
    "http://www.affiliate.com/iframe.asp?hs=$id&tariff=$tariff&col=crazy&ref=mysite.com&tracking=");
    ?>
    Not only does the cookie get deleted, but there is a delay with the tracking...

    e.g. if i go to www.mysite.com/?tracking=blabla i need to refresh the page before it accually adds the tracking to the page i'm including.

  2. #12
    Join Date
    Aug 2005
    Posts
    174
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    I sorted everything out.

    I created a tracking.php page that creats a cookie, and refreshes to the correct page..

    I then pull up the cookie within the php include url...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •