Results 1 to 10 of 10
  1. #1
    Newbie Knothead's Avatar
    Join Date
    July 29th, 2005
    Location
    South Carolina
    Posts
    43
    open new window while using jump.php
    I can't find any info on using a jump.php redirect for affiliate links and still be able to have it open in a new window. I had been using target="new" and now that I've changed my links over to use the jump.php redirect it doesn't work.

    Does anyone have an idea what I can use to solve the problem?

    Kirk

  2. #2
    Lite On The Do, Heavy On The Nuts Donuts's Avatar
    Join Date
    January 18th, 2005
    Location
    Winter Park, FL
    Posts
    6,930
    What part doesn't work... opening a new window or the jump.php script on that new window redirecting to where you intend to send the visitor?

    I sent people to my "jump" php pages, on many sites, in new windows - all works fine, but I've coded them myself. I happen to use target="_blank" in my original page, to open the jump script page in a new window, but I doubt that target="_new" versus target="_blank" is your issue.

  3. #3
    Newbie Knothead's Avatar
    Join Date
    July 29th, 2005
    Location
    South Carolina
    Posts
    43
    Hi, Donuts
    I use if($_GET['m'] == "link on my website") {$link = "http://affiliate link&subid=0&type=4";}
    It works fine like this but if I add {$link = "http://affiliate link &subid=0&type=4" target="new";} it redirects to my home page.

    Any ideas what I'm doing wrong?

    Kirk

  4. #4
    Lite On The Do, Heavy On The Nuts Donuts's Avatar
    Join Date
    January 18th, 2005
    Location
    Winter Park, FL
    Posts
    6,930
    so you do this...
    <?php echo '<a href='.$link.'>anchor text</a>'; ?>

    change it to target="_new"... you need that underscore to precede the word new

    also, the quotes that contain the variable aren't being included, php interprets them to be marking the beginning and end of the variable, when you define it. To tell php that a quote isn't marking the variable, but rather is part of the variable text string, you need to escape the characters with a backslash.

    So use this instead...
    $link = "\"http://affiliate link &subid=0&type=4\" target=\"new\"";}

    So when php sees \", it knows that quote is in the text string. And the quote marks at the front and last positions of defining the variable are not escaped with a backslash, so php knows they are the markers defining where the text string variable begins and ends.

  5. #5
    Newbie Knothead's Avatar
    Join Date
    July 29th, 2005
    Location
    South Carolina
    Posts
    43
    Hi, Donuts. I know this is trivial to you and I'm grateful for your help. I am still having trouble making it work.
    On my home page I have an affiliate link I named mysite.com/Jump.php?m=airpurifier

    I have a page named jump.php with this
    <?PHP

    if ($_GET['m'] == "") {$link = "http://mysite.com/";} // Default Blank
    if($_GET['m'] == "airpurifier") {$link = "http:// xxxxxxxx&subid=0&type=4";}

    header("Location: $link"); // Jump to the hiddden affiliate URL above
    exit();
    ?>
    Like this it goes to the merchants page, but doesn't open in a new window.
    If I change to xxxxxxxx&subid=0&type=4\" target=\"new\"";} It still won't open in new window and I played around with it adding target="_new" with underscore and other ways and still having problems.

    Any other Ideas?

    Kirk

  6. #6
    Moderator MichaelColey's Avatar
    Join Date
    January 18th, 2005
    Location
    Mansfield, TX
    Posts
    16,232
    Where you have your <a href="jump.php?"> link, change it to <a href="jump.php?" target="_blank">.
    Michael Coley
    Amazing-Bargains.com
     Affiliate Tips | Merchant Best Practices | Affiliate Friendly? | Couponing | CPA Networks? | ABW Tips | Activating Affiliates
    "Education is the most powerful weapon which you can use to change the world." Nelson Mandela

  7. #7
    Newbie Knothead's Avatar
    Join Date
    July 29th, 2005
    Location
    South Carolina
    Posts
    43
    Thank you Michael Coley!!!!!!
    It works perfect....so simple.....thanks again!

    Kirk

  8. #8
    Lite On The Do, Heavy On The Nuts Donuts's Avatar
    Join Date
    January 18th, 2005
    Location
    Winter Park, FL
    Posts
    6,930
    I didn't realize you wanted them to always open in a new link - thought you wanted to determine via vars which was the case. Since MC's solution works for you, guess always in new window works for you.

    Have fun!

  9. #9
    Newbie Knothead's Avatar
    Join Date
    July 29th, 2005
    Location
    South Carolina
    Posts
    43
    Sorry I wasn't clear Donuts!
    I'm not totally sure what I want! I'm trying some opening in new windows and some not. Don't know what's best.
    I still have so much to learn about the affiliate biz. Making a dollar is moving so slow it's frustrating, but it'll come I khow it. I've worked to hard to give up!!

    thanks,
    Kirk

  10. #10
    ABW Ambassador JoyUnltd's Avatar
    Join Date
    January 19th, 2005
    Location
    Emerald City
    Posts
    2,019
    First of all, thank you Knothead, Donuts and Michael for a very valuable thread! It's an old one, but a real goody!

    I'm in the process of moving my site to a host with php and wanted to mask my links. The " if ($_GET['m']" did the trick. I had been trying "if ($o" and "if ($m" to no avail.

    One last question: should &afsrc=1 be appended to the links in the php file? I was reading in other threads that this is necessary when placing links in a server side file.

    True or not true?
    Renée
    Pay no attention to that woman behind the curtain. -Wizardress of Oz

  11. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Need PHP Affiliate Jump Script for CJ
    By trev0006 in forum Commission Junction - CJ
    Replies: 0
    Last Post: October 27th, 2006, 04:58 AM
  2. Need help with a PHP/MySql Jump Script
    By dak142 in forum Programming / Datafeeds / Tools
    Replies: 11
    Last Post: April 13th, 2004, 07:29 PM
  3. Jump.php type code... help!
    By TJ in forum Programming / Datafeeds / Tools
    Replies: 4
    Last Post: July 23rd, 2003, 04:45 PM
  4. To open in a New Window or not?
    By wly in forum Midnight Cafe'
    Replies: 7
    Last Post: May 6th, 2002, 07:22 PM

Posting Permissions

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