Results 1 to 18 of 18
  1. #1
    Full Member
    Join Date
    January 18th, 2005
    Posts
    100
    Hi:

    I've seen many redirect like http://www.mysite.com/dir/goto.pl?xxx. I've searched around for free script but couldn't find any that would produce such result.

    I am willing to spend $$ to buy a software but have no idea which one to buy. Maybe I didn't do a effective search, the only few I found that might be the ones suit my needs have very different cost. I would love to purchase one that is good enough but at the lowest cost possible.

    I know many of you are familiar with cgi, php or other scripts, I would appreciate if anyone can recommend a low cost software to generate the url redirect I mentioned above.

    Thanks a lot in advance.

    snakebaby

  2. #2
    Just Lurking
    Join Date
    January 18th, 2005
    Posts
    1,263
    Here's one:

    <pre class="ip-ubbcode-code-pre">&lt;?php


    //-----------------------------------------------------------------------------
    // FILENAME: redirect.php
    // PURPOSE: link redirect
    //-----------------------------------------------------------------------------

    $password = 'password';
    $error_url = 'http://www.domain.com/';

    $url = $_GET['link'];
    $hash = strtolower($_GET['hash']);

    if($hash == strtolower(substr(md5($password.$url),0,12))){
    header('Location: '.$url);
    exit;
    } else {
    header('Location: '.$error_url);
    }
    ?&gt;</pre>

    This is the function I use to generate nice clean links, (just the open tag &lt;a&gt:

    <pre class="ip-ubbcode-code-pre">function redirect_link($dirty, $clean, $class=''){
    global $config;
    $hash = strtolower(substr(md5($config['redirect_password'].$dirty),0,12));
    if($clean == ''){
    $clean = $dirty;
    }
    $dirty = urlencode($dirty);
    if($class){
    $class = ' class="'.$class.'"';
    }

    $link = &lt;&lt;&lt;EOF
    &lt;a$class href="redirect.php?hash=$hash&amp;link=$dirty"
    onmouseover="window.status='$clean';return true;" onmouseout="window.status=' ';return true;" target="_blank"&gt;
    EOF;

    return $link;
    }</pre>

    This is a secure redirect meaning outsider can't use it.

    Hope that gives you some ideas.

    [Whoops, forgot password had to re upload my site]

    [This message was edited by Buddha on September 21, 2003 at 01:10 PM.]

  3. #3
    Full Member
    Join Date
    January 18th, 2005
    Posts
    100
    Hi Buddha:

    Thank you for your quick reply.

    I have never used any url redirect script. I'm having difficult time figuring out how to use the script you provided.

    Is everything in one script named 'redirect.php'? Do I put it under the 'cgi-bin'? Is there anything I have to do for the installation? I just don't have a clue.

    Thanks a lot in advance for any further guidance.

    Thanks

    snakebaby

  4. #4
    ABW Ambassador Vrindavan's Avatar
    Join Date
    February 25th, 2003
    Posts
    1,902
    Hi

    i am new to this too.

    a more detailed step by step explanation is helpful.

    http://8n.nu

  5. #5
    Just Lurking
    Join Date
    January 18th, 2005
    Posts
    1,263
    You bet it was quick! dinner was waiting.

    You can place this part:
    <pre class="ip-ubbcode-code-pre">&lt;?php
    //-----------------------------------------------------------------------------
    // FILENAME: redirect.php
    // PURPOSE: link redirect
    //-----------------------------------------------------------------------------

    $password = 'password';
    $error_url = 'http://www.domain.com/';

    $url = $_GET['link'];
    $hash = strtolower($_GET['hash']);

    if($hash == strtolower(substr(md5($password.$url),0,12))){
    header('Location: '.$url);
    exit;
    } else {
    header('Location: '.$error_url);
    }
    ?&gt;
    </pre>

    in a file named redirect.php that doesn't need to go in cgi-bin. Just place it in among your other HTML file. (I'm hoping you have PHP on your server already to process the file.)

    This function:
    <pre class="ip-ubbcode-code-pre">&lt;?php
    function redirect_link($dirty, $clean, $class=''){
    global $config;
    $hash = strtolower(substr(md5($config['redirect_password'].$dirty),0,12));
    if($clean == ''){
    $clean = $dirty;
    }
    $dirty = urlencode($dirty);
    if($class){
    $class = ' class="'.$class.'"';
    }
    ?&gt;
    </pre>

    was actually only an example. You could place it in another file inc_redirect.php and use it like this:

    <pre class="ip-ubbcode-code-pre">
    &lt;html&gt;
    &lt;head&gt;
    &lt;body&gt;
    &lt;?php include 'inc_redirect.php'; ?&gt;
    ...
    &lt;?php echo redirect_link('http://www.biostar-usa.com/mbdetails.asp?
    model=m7ncg+pro_NO_ITS_NOT_AN_AFFLINK', '', 'text'); ?&gt;Biostar&lt;/a&gt;</pre>

    make sure to save the file as php.

    My web site is actually generate on my home computer using PHP. This function doesn't actually leave my home computer. It's only used to generate the links. And how you would develop a similar function would depend a great deal on your website.

    I really must apologies, I have the bad habit of thinking everyone understands computer code like it is a universal language. &lt;I should get out more often&gt;

    Might I suggest checking out some of these links:

    PHP/Scripts and Programs/Redirection Sub Categories
    CGI and Perl/Scripts and Programs/Redirection Sub Categories

  6. #6
    Just Lurking
    Join Date
    January 18th, 2005
    Posts
    1,263
    My previous post should read:

    This Function:
    <pre class="ip-ubbcode-code-pre">function redirect_link($dirty, $clean, $class=''){
    global $config;
    $hash = strtolower(substr(md5($config['redirect_password'].$dirty),0,12));
    if($clean == ''){
    $clean = $dirty;
    }
    $dirty = urlencode($dirty);
    if($class){
    $class = ' class="'.$class.'"';
    }

    $link = &lt;&lt;&lt;EOF
    &lt;a$class href="redirect.php?hash=$hash&link=$dirty"
    onmouseover="window.status='$clean';return true;" onmouseout="window.status=' ';return true;" target="_blank"&gt;
    EOF;

    return $link;
    }
    </pre>

    [EDIT: An Inutiative shouldn't be limited to 60 minutes! I'm an INTP the other day I woke up and corrected something I wrote three months ago! IT CRUEL AND UNUSUALLY PUNISHMENT!]

  7. #7
    Full Member
    Join Date
    January 18th, 2005
    Posts
    100
    Hi Buddha:

    Thanks for your reply. I haven't found time to practice it but I will soon. I'll try my best to make it work. Hope I don't have to ask another question just for this script.

    snakebaby

  8. #8
    Just Lurking
    Join Date
    January 18th, 2005
    Posts
    1,263
    I'll keep checking back just in case you do need answers. As for the script, it's working great for me. Even with those big long BeFree URL's.

    If your not worried about others using your redirect you could simply do this instead.

    <pre class="ip-ubbcode-code-pre">&lt;?php
    //-----------------------------------------------------------------------------
    // FILENAME: redirect.php &lt;-- yeah put it in that file
    // PURPOSE: link redirect
    //-----------------------------------------------------------------------------

    $url = $_GET['link'];

    header('Location: '.$url);
    exit;
    ?&gt;</pre>

    But you'll still need to URL encode the address for it to work with all browsers.

    So the link would look something like this:

    <pre class="ip-ubbcode-code-pre">This link could go strieght in a .html file.
    &lt;a href="redirect.php?link=http%253A%252F%252Fwww.store.com%"&gt;Store.com&lt;/a&gt;

    or

    This link need to be in a .php or atleast processed by it.
    &lt;a href="redirect.php?link=&lt;?php echo urlencode('http://www.store.com/'); ?&gt;"&gt;Store.com&lt;/a&gt;</pre>

    Might try that first, just to figure out the basics. I just didn't like leaving a script open to possible abuse so I added the hash and password.

  9. #9
    Newbie
    Join Date
    January 18th, 2005
    Posts
    1
    If you're using apache web server, redirects can be handled via mod_rewrite (for dynamic redirects) or just put regular redirects that say redirect "this" to "here".

    You can add rewrite directives to your .htaccess files. This certainly eliminates any chance that other people will use your script.

    seo@customerengineering.com
    http://www.survey-hosting.com

  10. #10
    Full Member
    Join Date
    January 18th, 2005
    Posts
    100
    Thank you all for your further information and guidance.

    It's been hectic here (as a full time mom, especially with the older kid just started Kingdergarten), I haven't been able to try it out (got interupted constantly).

    I am searching around for more ideas. I will ask for more help if I get stumped.

    Thanks

    snakebaby

  11. #11
    Just Lurking
    Join Date
    January 18th, 2005
    Posts
    1,263
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by seoengineer:
    If you're using apache web server, redirects can be handled via mod_rewrite (for dynamic redirects) or just put regular redirects that say redirect "this" to "here".

    You can add rewrite directives to your .htaccess files. This certainly eliminates any chance that other people will use your script.

    seo@customerengineering.com
    http://www.survey-hosting.com<HR></BLOCKQUOTE>

    I don't know if that's going to work on affiliate links that don't point back to the server. Guess you could setup something like

    ^bfast/(.*) http://service.bfast.com/bfast/$1

    But I'm not sure it would log? Atleast, on my host. Need one for each Affiliate Network. Interesting idea seoengineer.

    I'm using the PHP redirect basically to log exit from the site. Comparing my results to that of that network should give me an idea about any parasite activety.

  12. #12
    Full Member
    Join Date
    January 18th, 2005
    Posts
    100
    Hi Buddah:

    I wish I could sit down with an expert to have a much better understanding about everything.

    Well, since it's impossible so I just want to ask another simple question.

    Will the sales be tracked if I use the world's simplest redirect script for affiliate links? It is like a basic php redirect script that calls a text file that contains corresponding affiliate links?

    My feeling is it should work (why not if it is just like clicking on the original links?). But why people offer paid software just for affiliate redirect?

    Thanks for any info.

    snakebaby

  13. #13
    Just Lurking
    Join Date
    January 18th, 2005
    Posts
    1,263
    It should, if it uses the same or similar "header('Location: '.$url);" command. Just open it in a text editor and take a look.

    "But why people offer paid software just for affiliate redirect?"

    I don't know. It's not like it's a secret how to do this sort of thing. Yes it does take some specialized knowledge, but it all out there for free. You could figure it out yourself without help. Just takes longer. I guess some people don't have anyone to help them and don't know where to look, and those guys are preying on them with there Superdupper Redirect for 19.95.

    Hope those kids give you two seconds of peace and quiet.

  14. #14
    ABW Ambassador DesignerWiz's Avatar
    Join Date
    January 18th, 2005
    Location
    U.S.A
    Posts
    2,777
    Hello Buddah, I don't agree with this comment
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> and those guys are preying on them with there Superdupper Redirect for 19.95. <HR></BLOCKQUOTE>
    We offer a link mask redirect PERL code with control panel for free .. we also provide a "upgrade feature" that cost money to count the clicks for the webmaster to know what does/does not get clicked on with their promotions. They can even upgrade from that package to a referrer log included as well.

    If we were to offer all of our expertise and bandwidth fees, etc. at absolutely no charge and also provide the thousands of lines of codes and knowledge we know for free .. how do you propose that us "preying" services (as you described our type services to be) are going to make any profits?

    Ray Thomas
    DesignerWiz.com CEO
    Development Resource & Javascript Public Archive Center
    http://DesignerWiz.com
    ABW Board: Category: Programming / Coding

  15. #15
    Just Lurking
    Join Date
    January 18th, 2005
    Posts
    1,263
    Ray sorry I missed your post here. Better late than never I guess.

    Ray if your providing all that free? I guess the comment wasn't directed at you was it? &lt;confused look here&gt;

    I do have problems with the guys packaging up the frame redirects with cut and paste instructions. If that's not prey on those less knownledgable, who is? Heck I think I've seens frame redirect explained here more than once. Wonder if that's a copyright violation? There are plenty of redirect scripts available at HotScripts.com and log files are a great source of statistics.

    Ray, I've learned everything I know the hard way, if I can help someone by sharing what I know I will. Can't guarantee they'll learn anything as I'm a lousy teacher. I'll try though.

    I didn't mean to insult you, still can't figure out why you were.

    ------------------------------
    "Everybody gets so much information all day long that they lose their common sense." - Gertrude Stein, American author (1874-1946).

  16. #16
    Member KIMarketing's Avatar
    Join Date
    January 18th, 2005
    Location
    Nebraska
    Posts
    166
    Will this script work with my cold fusion database on my coupon code site - ShoppingBookmarks.com? I don't need all the links redirected, just those in my database. I would also like it to automatically the "afsrc=1" to the ends of my links.

    I am willing to pay someone to do this for me - as long as you are cheap Please email me if you can do this for me - kim@shoppingbookmarks.com

  17. #17
    Just Lurking
    Join Date
    January 18th, 2005
    Posts
    1,263
    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>Originally posted by KimRowley.com:
    Will this script work with my cold fusion database on my coupon code site - http://www.shoppingbookmarks.com? I don't need all the links redirected, just those in my database. I would also like it to automatically the "afsrc=1" to the ends of my links.

    I am willing to pay someone to do this for me - as long as you are cheap Please email me if you can do this for me - kim@shoppingbookmarks.com)<HR></BLOCKQUOTE>The same technique should work with CF but have no idea how. I think there's a CF tag call cflocation that does a server side redirect. As for automatically adding "afsrc=1" that should not be difficult. A template to do the redirect shouldn't be to difficult. Neither should modifying your coupon template.

    However, finding someone to do that for a CF site isn't going to be cheap. I have absolutely zero experience with CF. I don't even know if CF works with PHP. Most of the CF servers I've seen don't have PHP but ASP.

    Wish I could help.

    ------------------------------
    "A man is but the product of his thoughts. What he thinks, he becomes." -- Mahatma Gandhi

  18. #18
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    532
    Hey Everybody!

    I'm trying to keep track of the keywords that users are inputting into my HTML forms (search boxes). Say I have a form like so:
    <pre class="ip-ubbcode-code-pre">
    &lt;FORM METHOD="POST" ACTION="http://www.merchantURL.com/affID/"&gt;
    &lt;INPUT TYPE="text" NAME="keywords" SIZE="15" MAXLENGTH="60"&gt;
    &lt;INPUT TYPE="SUBMIT" VALUE="Search" CLASS="search"&gt;
    &lt;/FORM&gt;
    </pre>

    I'm trying to write a PERL script that I can substitute for the affiliate link, which will write the keyword to a text file, than redirect the user to the merchant.

    Although I haven't tested it yet I'm thinking something like the following would work for affiliate sites using a GET statement.
    <pre class="ip-ubbcode-code-pre">
    #!/usr/local/bin/perl

    #set default redirect url
    $durl = "http://www.domain.com/affID";

    #set secondary redirect url (search string)
    $surl = "http://www.domain.com/cgi-bin/search/search.cgi?keywords=";

    use CGI;
    $cgi = new CGI;
    print $cgi-&gt;header;
    $keywords = $cgi-&gt;param('keywords');

    #log keyword to file
    open(DATA,"&gt;&gt; keylog.txt");
    flock(DATA, 2);
    print DATA "$keywords\n";
    flock(DATA, 8);
    close(DATA);

    if ($keywords eq "") { print("location:$durl\n\n"); }

    else { print("location:$surl$keywords\n\n"); }
    </pre>

    {Please don't laugh...I've only started coding in PERL for about two weeks now.}

    My question is how would I pass along the keyword parameter if the merchant is using POST like BettyMills?

    Affiliate-Blog.com

  19. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Suggest us some good Networks
    By neerajsam in forum Midnight Cafe'
    Replies: 9
    Last Post: August 7th, 2008, 04:20 PM
  2. Redirect script and google, good or evil?
    By TJ in forum Voting Booth
    Replies: 9
    Last Post: November 18th, 2004, 05:34 PM
  3. URL Redirect Question - I Need Help.
    By HumbleFish in forum Commission Junction - CJ
    Replies: 12
    Last Post: March 22nd, 2004, 09:19 AM
  4. Redirect URL Parameter
    By newemail in forum Rakuten LinkShare - LS
    Replies: 1
    Last Post: December 4th, 2003, 05:24 PM
  5. Redirect URL Parameter
    By newemail in forum Commission Junction - CJ
    Replies: 6
    Last Post: December 4th, 2003, 10:47 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
  •