Clickbank link generator

18 replies
Hi warriors.

im putting togheter my first product, and on my affiliates page i want to put a clickbank link generator, when the affiliate types his/her clicbank ID and hit Submit all the codes on the page will replace with the affiliate's ID, ready tio copy and paste

if anyone can help me find a good PHP script or any other i can use. (It needs to reload on the same page)
#clickbank #generator #link
  • Profile picture of the author jaouadk
    Use this, you just need to change the clickbank address :
    <html>
    <body>
    <form method='POST'>
    <input name='clickbankid' type='input'>
    <input name='generat' type='submit'>
    </form>
    <?php
    if (isset($_POST['generat']))
    {
    $link = $_POST['clickbankid'].'.affiliate.clickbank.blabla';
    echo 'Your affiliate link is : '.$link;
    }
    ?>
    </body>
    </html>
    {{ DiscussionBoard.errors[4606328].message }}
  • Profile picture of the author jaouadk
    Sorry I'm not allowed to send PM yet.

    Look, the problem is that your page is .html, you need to change it to .php

    otherwise the code couldn't be executed by Apache or whatever you're using.
    {{ DiscussionBoard.errors[4609093].message }}
  • Profile picture of the author watsonovedades
    Thank you soo much i've tested it and it works great!.

    just one question, what do i have to type to show the generated code wherever i want?

    $link?
    echo 'Your affiliate link is : '.$link;?
    echo ': '.$link;?

    Thanks again
    Signature
    Whatever your mind can conceive and BELIEVE you can achieve
    Follow me on Twitter - @DineroConPc
    I talk about Affiliate Marketing Methods
    {{ DiscussionBoard.errors[4609138].message }}
  • Profile picture of the author jaouadk
    just copy that php part to any place on the page :
    <?php
    if (isset($_POST['generat']))
    {
    $link = $_POST['clickbankid'].'.affiliate.clickbank.blabla';
    echo 'Your affiliate link is : '.$link;
    }
    ?>

    Don't hesitate if you have any further questions .
    {{ DiscussionBoard.errors[4609172].message }}
  • Profile picture of the author watsonovedades
    Thanks again jaouadk

    My intention is too display the generated code acrooss the all affiliate page on </textarea> boxes below the images , im trying to do it like this

    <textarea name="textarea" rows="5"
    cols="35">
    <?php
    if (isset($_POST['generat']))
    {
    $link = $_POST['clickbankid'].'.affiliate.clickbank.blabla';
    echo 'Your affiliate link is : '.$link;
    }
    ?>
    </textarea>

    but its broken
    Signature
    Whatever your mind can conceive and BELIEVE you can achieve
    Follow me on Twitter - @DineroConPc
    I talk about Affiliate Marketing Methods
    {{ DiscussionBoard.errors[4609239].message }}
  • Profile picture of the author watsonovedades
    the basic function im after is like this example:

    Hot Video Squeeze Templates | Flash Templates | Aweber Video Pages - The Best Collection Of Video Optin Squeeze Pages

    Hope yuu can give me some direction

    Thanks
    Signature
    Whatever your mind can conceive and BELIEVE you can achieve
    Follow me on Twitter - @DineroConPc
    I talk about Affiliate Marketing Methods
    {{ DiscussionBoard.errors[4609249].message }}
  • Profile picture of the author jaouadk
    This should fix it, copy the code, and place that green part in any place you want in the textarea
    <html>
    <body>
    <form method='POST'>
    <input name='clickbankid' type='input'>
    <input name='generat' type='submit'>
    </form>
    <?php
    if (isset($_POST['generat']))
    {
    $link = $_POST['clickbankid'].'.affiliate.clickbank.blabla';
    echo 'Your affiliate link is : '.$link;
    }
    else
    {
    $link = '';
    }
    ?>
    <textarea>
    Click here1 : <?php echo $link; ?>
    </textarea>
    </body>
    </html>
    {{ DiscussionBoard.errors[4611866].message }}
    • Profile picture of the author watsonovedades
      Hi jaouadk

      this code is on El Baby Shower Perfecto

      please take a look a it and tell what can i do. seems to be wrong
      Signature
      Whatever your mind can conceive and BELIEVE you can achieve
      Follow me on Twitter - @DineroConPc
      I talk about Affiliate Marketing Methods
      {{ DiscussionBoard.errors[4614344].message }}
  • Profile picture of the author heimannm
    Hello jaouadk! your code never work correctly and don't understand this.
    Signature

    The Game is Over

    {{ DiscussionBoard.errors[4612031].message }}
    • Profile picture of the author jaouadk
      Originally Posted by heimannm View Post

      Hello jaouadk! your code never work correctly and don't understand this.
      It depends on how you're using it, i tested it before posting.
      Explain your problem, and post the code you're using.
      {{ DiscussionBoard.errors[4612052].message }}
  • Profile picture of the author watsonovedades
    i copied an pasted it on the source code
    Signature
    Whatever your mind can conceive and BELIEVE you can achieve
    Follow me on Twitter - @DineroConPc
    I talk about Affiliate Marketing Methods
    {{ DiscussionBoard.errors[4614355].message }}
    • Profile picture of the author jaouadk
      Originally Posted by watsonovedades View Post

      i copied an pasted it on the source code
      Looks like you copied it the wrong way, look what I found in your source code :
      <textarea>
      Click here : &lt;?php echo $link; ?&gt;
      </textarea>

      you must replace it with this <?php echo $link; ?>

      As I said the script works, already tested on my computer.
      {{ DiscussionBoard.errors[4615776].message }}
  • Profile picture of the author VinceGray
    The correct link would be: clickbankid.vendorid.hop.clickbank.net
    {{ DiscussionBoard.errors[4618443].message }}
    • Profile picture of the author jaouadk
      Originally Posted by VinceGray View Post

      The correct link would be: clickbankid.vendorid.hop.clickbank.net
      Yes that's it, I just gave an example.
      {{ DiscussionBoard.errors[4621502].message }}
  • Profile picture of the author rufaswan
    I think this echo line don't need to be there, as you will echo it on the textarea later.

    Code:
    if (isset($_POST['generat']))
    {
    $link = $_POST['clickbankid'].'.affiliate.clickbank.blabla';
    echo 'Your affiliate link is : '.$link;
    }
    - Rufas
    {{ DiscussionBoard.errors[4619248].message }}
  • Profile picture of the author shantanu
    awesome links, so many links but same function......
    {{ DiscussionBoard.errors[4623128].message }}
  • Profile picture of the author ProEFI
    Here is a wordpress plugin that does that and much more...

    http://www.warriorforum.com/warrior-...te-system.html


    Andrew
    {{ DiscussionBoard.errors[4651212].message }}
  • Profile picture of the author jefftardif
    Just did that in Javascript.

    You should have:

    - a textArea with ID= txtClickBankID
    - a span with ID= originalHopLink
    - each span you want to replace should have the class = test (just change it to whatever you want).


    <script type="text/javascript" language="javascript">
    function getHop()
    {
    var originalSpan = document.getElementById("originalHopLink");
    var originalHop = originalSpan.innerText;
    var txt = document.getElementById("txtClickBankID");
    var txtHop = txt.innerText;
    var myNewLink= originalHop.replace("zzzzz", txtHop);
    var spans = document.getElementsByTagName("span");
    for (var i=0;i<spans.length;i++)
    {
    if (spans[i].className == "test")
    {
    spans[i].innerText = myNewLink;
    }
    }
    }

    </script>
    {{ DiscussionBoard.errors[4676401].message }}

Trending Topics