Results 1 to 3 of 3
  1. #1
    Newbie
    Join Date
    May 27th, 2009
    Location
    Georgia, USA
    Posts
    5
    Question PHP Pulling Wrong Page Url in Wordpress
    Here is the PHP code for the multi store coupon integration:
    <?php
    $SID="aaa24bd9-db92-40de-ac9b-d2d0ab14b897";
    $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);
    ?>


    So, I am using Wordpress and Exec-PHP which seems to be working fine on other stores from GC. I created a page which is mysite/coupon-codes and pasted the code there. When I go to the page I see the table of links. When I select one merchant to see the coupon codes, the link is going to mysite/index.php?gcsiteid=123 and brings you to the home page. I think I need to have the link go to mysite/coupon-codes. Any ideas would be appreciated. Thanks.

  2. #2
    Full Member iolaire's Avatar
    Join Date
    October 3rd, 2006
    Location
    Arlington, VA
    Posts
    229
    off the top of my head i looks like you need to modify the following:
    Code:
    $PageURL=urlencode($_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING']);
    to something like:
    Code:
    $PageURL=urlencode($_SERVER['SCRIPT_NAME'].'/coupon-codes?'.$_SERVER['QUERY_STRING']);

  3. #3
    Newbie
    Join Date
    May 27th, 2009
    Location
    Georgia, USA
    Posts
    5
    That did the trick. Thanks for they help!!!

  4. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. WordPress Categories Post count wrong on inner pages
    By kse in forum Blogging, Mobile and Social Media
    Replies: 2
    Last Post: February 10th, 2012, 04:42 AM
  2. Adding php to Wordpress
    By Phil Kaufman aka AffiliateHound in forum Blogging, Mobile and Social Media
    Replies: 7
    Last Post: December 29th, 2011, 05:53 AM
  3. Php Page / Form Processing / Mysql Insert / No Page Refresh
    By Uncle Rico in forum Programming / Datafeeds / Tools
    Replies: 3
    Last Post: January 4th, 2009, 11:55 AM
  4. What's wrong with my URL validation script?
    By UKJ in forum Programming / Datafeeds / Tools
    Replies: 3
    Last Post: November 7th, 2005, 06:45 AM

Posting Permissions

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