Results 1 to 3 of 3

 

Thread: jump urls for multiple merchants?

  1. #1
    apg1985's Avatar
    Registered User

    Status
    Offline
    Join Date
    Mar 2011
    Posts
    412
    Thanks
    1
    Thanked 17 Times in 11 Posts


    Hi,

    How would you go about creating a jump script for multiple merchants with 100's of products each.

    I've used this example before in this link and it works great but its a manual job, but how would you do it for 1000's of products with multiple merchants, im guessing I would need to connect to my product database as columns in there contain merchant name and aff url and do some sort of IF statement.

    http://www.stevedawson.com/article0006.php

    Maybe thats stupid I dont no, im not very good with server side (yet )

  2. #2
    scriptmonkey's Avatar
    Oranges & Lemons

    Status
    Offline
    Join Date
    Jan 2009
    Location
    Worthing
    Posts
    1,607
    Thanks
    112
    Thanked 253 Times in 192 Posts
    Assuming you have an ID field in your database table, then it's simply a case of linking like this as your product link:

    http://www.yoursite.co.uk/jump.php?id=12345

    Use this as your jump.php (fill in your details obviously )

    PHP Code:
    <?php
    $jumpid 
    $_GET['id'];
    mysql_connect('databaseserver''databaseuser''databasepassword') or
            die (
    'Unable to connect. Check your connection parameters.');
    mysql_select_db('databasename') or die(mysql_error());
    $query "SELECT deeplink from tablename where ID = $jumpid ";
    $result mysql_query($query) or die(mysql_error());
    $row mysql_fetch_assoc($result);
    $location =  $row['deeplink'];
    ?>
    <html>
    <head>
    <script type="text/javascript">
    <!--
    function transfer(){
        window.location = "<?php echo $location ?>"
    }
    //-->
    </script>
    <title>Redirecting to Merchant Site</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body onLoad="setTimeout('transfer()', 1000)">
    <div align="center">
    <h2>Redirecting to The Merchant Site</h2>
    <p>If you are not automatically redirected then please <a href="<?php echo $location ?>">click here</a>.</p>    
    </div>
    </body>
    </html>
    That will give you a one second pause before redirecting, if you want longer, then change 1000 (1 second)

    Tony
    The trouble with the rat race is that even if you win you're still a rat.
    Time passes. Listen. Time passes. Dylan Thomas
    Ebay Alerts to your inbox

  3. #3
    apg1985's Avatar
    Registered User

    Status
    Offline
    Join Date
    Mar 2011
    Posts
    412
    Thanks
    1
    Thanked 17 Times in 11 Posts
    nice cheers Tony great help as always.



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2