YOURcom™ 1.3
Full commission based affiliate program

(c) Copyright 2002-2005 YOURsoft . All rights reserved. YOURcom™ is a registered trademark of YOURsoft™. Please refer to the end of this document for more information.
http://www.yoursoft-tm.com


YOURcom™ installation requires:

yourcom13.zip file contains following files:

In case your yourcom121.zip does not include all listed files, contact us!


>> Installing and configuring YOURcom™

  1. If the path to Perl on your server doesn't match the default path in the scripts '#!/usr/bin/perl', open all '*.CGI' and '*.PL' files in a PLAIN TEXT editor (like Notepad or Wordpad, DO NOT use MS Word!) and change the very first line '#!/usr/bin/perl' to the Perl path on your server. If you do not know the exact path to Perl on your server, please read server documentation or ask your server administrator! The path is usually '#!/usr/bin/perl' or '#!/usr/local/bin/perl'

  2. Uploading files

    Use your FTP client to login to your account. Got to your CGI-BIN directory (or create one).

    Create a directory called "yourcom". Upload all CGI and TXT files to this directory in ASCII mode (NOT BINARY)! Then upload "blank.gif" in the same directory but this time as BINARY.

    CHMOD CGI files to "755" (rwx-rx-rx) and all the TXT files to "644" (rw-r-r).

    In the same folder (yourcom) create 3 new empty folders: "counts", "temp" and "userdata". Do not use CAPITAL letters!

    CHMOD all folders (including "yourcom" folder) to "777" (rwx-rwx-rwx) or "733" (rwx-wx-wx).


  3. Open your browser and go to "admin.cgi" ("http://www.yourdomain.com/yourcom/admin.cgi").
    Enter the default password "admin" and change it when you enter admin area (the form for changing admin password is located at the bottom of Admin area)!
    After this done click "Edit settings" and configure your affiliate program (Read the section "Setting up your affiliate program" below). Then enter the "Banner editor" and "Text ad editor" where you can view/add/remove your ads which your affiliates will choose from.

  4. Use the HTML code from "form.htm" file to create a "subscription" and a "user login" form on your site. CHANGE "<FORM ... action=" to the urls of "vpis.cgi" and "login.cgi" on your server! (You may edit the appearance as you want, just DON'T change any names or values of the "input fields" (<input type= ... value=... name=...>) between <FORM> and </FORM> headers!

>> Setting up your affiliate program

After clickin button "Edit settings" you will be taken to "Settings page". Here you can configure your affiliate program. In order for YOURcom to work properly please follow guidelines below!

  1. Site name (title) - the name (title) of your web site. Example: My web site
  2. Site URL - URL of your web site. Example: http://www.mydomain.com
  3. Admin e-mail - e-mail address of administrator. Example: admin@yourdomain.com
  4. Domain name - your domain name without "www" and with a dot (.) before the name. Example: .mydomain.com
  5. Base URL - URL of the folder where YOURcom is installed. Do not add a "/" at the end! Example:
    wrong - http://www.domain.com/path/yourcom/
    correct - http://www.domain.com/path/yourcom
  6. E-mail software on server - Path to e-mail software on the server (usually /usr/sbin/sendmail or /usr/lib/sendmail, ask your server administrator). Add a " -t" at the end! Example: /usr/sbin/sendmail -t
  7. Thank you page URL - URL of your "Thank you" page (page where customers are redirected after a successful purchase). You only need this if you will be using com.cgi?r=XX (see below). Example: http://www.domain.com/thankyou.html
  8. Use file locking? - 0 = NO, 1 = YES. 99,9% of UNIX hosts allow file locking (for greater security). We strongly recommend you leave file locking set to 1!
  9. Use SEF links? - 0 = NO, 1 = YES. Please read the section "Search Engine friendly links" below before setting this option to 1!
  10. Currency - currency in which earnings will be displayed/paid
  11. Signup bonus - credit (money) affiliates receive just for signing up.
  12. Commission - affiliate commission. 1 = 100% commission, 0.1 = 10% commission, 0.15 = 15%commission, etc. Example: 0.2 (20% commission)
  13. Payout amount - money affiliates need to rais in order to be paid. Example: 50.00
  14. Notify about sales? - 0 = NO, 1 = YES. If set to 1 you will receive a notification when an affiliate is credited with commission (a sale is made). The notification e-mail is easily editable (see below)
  15. Round digits to + "f" - set the number of digits in earnings after the dot (.) + "f". Example: Script receives this value for earnings: earnings=23.642154631 $
    2f will set the earnings to 23.64 $
    1f will set the earnings to 23.6 $
    5f will set the earnings to 23.64215 $
  16. Cookie expiration time - expiration time for the affiliate cookie in days. 183 is (approximately) half year, 7 is one week...
  17. Bonus for referring new affiliates? - 0 = NO, 1 = YES. If you wish to credit affiliates for recruiting new webmasters set this variable to 1. In this case if affiliate with ID number XY sends a webmaster to your web site and the webmaster joins your affiliate program, affiliate XY will be credited with Referral bonus (set below).
  18. Referral bonus - the amount for which referrals (affiliate XY in example above) are credited. Only matters if Bonus for referring new affiliates is set to 1.
  19. Use an additional field? - 0 = NO, 1 = YES. Please read section &Optional field" below before making any changes!
  20. Additional field text - if above is set to 1 enter the text for this field. Example: PayPal e-mail (or EGold number, SSN, etc.)
  21. Add. field default value - default value of the additional field. Example: none (or Please enter one, etc.)
  22. Use secure IPN URL? - 0 = NO, 1 = YES (recommended). For PayPal only. If set to 1 it will send IPN POST back to https://www.paypal.com/cgi-bin/webscr, if not it will POST it to http://www.paypal.com/cgi-bin/webscr. Please read the section "PayPal integration" below for more information.
  23. Double IPN call for PayPal? - 0 = NO, 1 = YES. Please read the section "PayPal integration" below for more information.
  24. URL of the other IPN script - URL of your old IPN script. Example: http://www.domain.com/path/old_ipn_script.cgi Please read the section "PayPal integration" below for more information.

Click "Submit Changes" in order to store preferences.

Editing the notify e-mail

If you don't like the default notification e-mail, you can easily edit it - open file notify.txt and change the text. If you use the phrases below YOURcom will automatically replace them with:

##SITE_NAME## - web site name (as set in Settings page)
##SITE_URL## - web site URL (as set in Settings page)
##ADMIN_MAIL## - administrator e-mail (as set in Settings page)
##CURRENCY## - currency (as set in Settings page)
##COMISSION## - the commission for this sale

Example:
Your commission for this sale is ##CURRENCY## ##COMISSION##.
... will for example become ...
Your commission for this sale is $ 15.25.
(This is example only. In reality the e-mail will contain the actual commission (not necessarily $ 15.25) and the currency which you set.)


>> Implementing YOURcom™ into your existing store/purchase forms

YOURcom™ can be easily implemented into your existing store or purchase forms in one of three ways (if you use PayPal please read instructions further down):

  1. If you are familiar with Perl and use a Perl store/purchase script, we have provided you with yourcom.pl file. Make sure you include this file in your script using this command:
    include 'path/to/yourcom.pl';

    Add these two lines of Perl code where you want the script to check for affiliates:
    $denar=XX; # set $denar to the value of purchase (not commission!)
    &track_com;

    The script will now check for affiliate every time someone makes a purchase, calculate commission and add it to the affiliate's account.

  2. The second way is using an <IMG> tag (this is the easiest way). Just place HTML code below on your "Thank you" page ( = the page where customer is redirected after a successful purchase). Make sure you change the path to YOURcom™ and set XX as the value of purchase!

    <IMG SRC="http://www.domain.com/path/to/yourcom/com.cgi?i=XX" BORDER="0" HEIGHT="0" WIDTH="0">

    For a $50 sale you would add following tag:
    <IMG SRC="http://www.domain.com/path/to/yourcom/com.cgi?i=50" BORDER="0" HEIGHT="0" WIDTH="0">

  3. The third way you can use YOURcom™ is by using redirection method (your purchase script can be written in any programming language as long as you know how to modify it). Setup your purchase script so that it will redirect customers after a successful purchase to com.cgi?r=XX instead to the "Thank you" page (XX is the value of purchase). The script will then redirect customers to the "Thank you" page (as set in Settings page).

    If you have Perl purchase script you would, for a $50 purchase, use this line of code:
    Print "Location: http://www.domain.com/path/to/yourcom/com.cgi?r=50\n\n";

>> I want to give my affiliates a flat commission rather than "percent-of-the-value" commission!

In this case just set Commission in Settings page to 1 (100% commission) and then replace XX in the examples above with the commission your affiliates will be credited instead of the purchase value.

For a $5 commission you would use
$denar=5;
&track_com;
OR
http://.../com.cgi?i=5
OR
http://.../com.cgi?r=5
as explained above.

>> Optional field

YOURcom allows you to setup one additional field to get additional information from your affiliates. This field is usually used to collect PayPal e-mail addresses, E-gold numbers or other information. To activate it go to Settings page and set "Use an additional field?" to 1. Enter the text for this field (edit "Additional field text") and set the default value for this field ("Add. field default value"). See example below. Note: This field will NOT be entered during signup, it can be set in User area or Admin area!

Use an additional field? 1
Additional field text: PayPal e-mail
Add. field default value: Please enter one

IMPORTANT: If you already have affiliates in your database (upgrading from previous versions, didn't use optional field before, etc...) make sure you click "Upgrade database" in the Admin area before allowing any new affiliates to signup! Same thing applies if you are using the optional field and for some reason don't want to anymore - in this case click button "Downgrade database" in the Admin area! Backup your database before executing any of this, YOURsoft cannot be held responsible for loss of your affiliate data! Please be patient, this process might take a while!

Adding the optional field:
- Upgrade the database in Admin area if you already have affiliates signed up
- Edit settings as described above

Removing the optional field:
- Downgrade the database in Admin area
- Set "Use an additional field?" in Settings page back to 0

>> PayPal integration

YOURcom can be easily integrated into PayPal system. It uses PayPal's IPN (Instant Payment Notification) to collect purchase information, so a PayPal Premier or Business account is required (Personal account does not support IPN). Upgrade is free, please refer to PayPal website for further information.

To integrate YOURcom with PayPal you must activate IPN (login to your PayPal account, click "Profile", under "Selling Preferences" click "Instant Payment Notification Preferences", activate IPN and enter IPN URL (If you already use some othe IPN script please read instructions further down on how setup your IPN):
http://www.domain.com/path/to/yourcom/paypal.cgi

Next you have to add this line to your HTML code for PayPal buttons:
<script language=javascript src="http://www.yourdomain.com/cgi-bin/yourcom/com.cgi?pp"></script>

EXAMPLE:

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<script language=javascript src="http://www.yourdomain.com/cgi-bin/yourcom/com.cgi?pp"></script>
<input type="hidden" name="business" value="youremail@yourdomain.com">
<input type="hidden" name="item_name" value="Test Product">
<input type="hidden" name="item_number" value="874578">
<input type="hidden" name="amount" value="$1.00">
<input type="image" src="images/x-click-but22.gif" border="0" name="submit">
<input type="hidden" name="add" value="1">
</form>

For those having problems with the "Thank you" page with PayPal we have included file ty.cgi. You can set it as the return parameter in PayPal button HTML code - just add this line in the code (edit page URL!):
<input type="hidden" name="return" value="http://www.domain.com/path/yourcom/ty.cgi">
and ty.cgi will redirect customers to the thank you page set in the Settings page after a successful purchase.

That's all there is to it! Make sure you change the URLs in the examples above!

Q: YOURcom isn't logging PayPal sales and adding commissions (a "HTTP error" is logged)!?
A: Please double-check the URL to paypal.cgi in your PayPal account. Set variable "Use secure IPN URL?" to 0 in the settings page and try again.

Q: What if someone finds the URL of the paypal.cgi script in my HTML source code and opens it? Will YOURcom count this as a sale?
A: Of course not, paypal.cgi script was written to protect you and knows the difference between a real sale and an illegal attempt!

Q: What if a customer reloads the Thank you page?
A: Don't worry, paypal.cgi logs all transaction ID numbers and compares new ones to the old ones to prevent doubled commissions!

Q: Can I give my affiliates a flat commission when using paypal.cgi?
A: Unfortunately not due to the way PayPal processes payments. We will try to find a way around this in the future and include it in the next update.

Q: But I already use some other IPN script - how do I implement YOURcom then?
A: Please read the "Double IPN issue" below.

You are already using some other IPN script with PayPal and would also like to use YOURcom, but PayPal lets you enter only one IPN script URL. The solution is simple - all you have to do is go to the settings page in Admin area and set "Double IPN call for PayPal?" to 1 and "URL of the other IPN script" to the URL of your existing IPN script, ie.:
Double IPN call for PayPal? 1
URL of the other IPN script: http://www.domain.com/path/my_old_IPN_script.cgi

Then just set the IPN URL in your PayPal account manager to paypal.cgi as described above ("PayPal integration") and both your IPN scripts will work!

>> Search Engine friendly links

The default YOURcom affiliate urls look similar to http://www.domain.com/path/to/yourcom/stetje.cgi?affiliate_id

Some Search Engines have problems with processing uncommon characters (? in our case) and are set to ignore urls containing them. One of the algorithms Search Engines use to determine importance of a web site is known as "page rank". Page rank is (simplified) measured by the number of web sites linking to your site (a link from site A to site B counts as a vote from site A for site B). The more links the better your page rank will be, so why not benefit from your affiliate program even more?

This is the reason YOURcom allows you to use Search Engine friendly affiliate urls similar to http://www.domain.com/path/to/yourcom/a-affiliate_id. Note that there are no more uncommon characters in the urls (- is recognized by all Search Engines as it is a part of many domain names). However, not all servers will allow you to do this so it is very important to you install YOURcom in normal mode first and make sure everything works, before activating SE friendly links!

Installation process:
- install YOURcom 1.3 (with "Use SEF links?" set to 0 in Settings page!)
- make sure everything works
- set "Use SEF links?" to 1
- upload file .htaccess to your YOURcom directory in ASCII mode!
- again make sure everything works (especially affiliate links!)

If YOURcom doesn't work anymore after uploading the .htaccess file this means your server does not allow "url rewriting". In this case delete this file from your yourcom directory and set "Use SEF links?" back to 0!

 


>> Support

To request assistance or ask questions please contact us!


Copyright notice and license agreement

YOURcom™ 1.3 by YOURsoft™. Copyright © 2002 YOURsoft™. All Rights Reserved. YOURcom™ is a registered trademark of YOURsoft™.

WARNING: This Software is protected by copyright law and international treaties. Unauthorized reproduction of this Software, or any portion of it, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extend possible under law.
With this license agreement you are allowed to use only one (1) copy of the Software. For additional licenses please contact us!

YOURcom™ 1.3 ("Software") is licensed for use only under the terms of this license agreement. Information in this document is subject to change without notice and is provided for informational purposes only. The entire risk of the use or results of the use of this Software remains with the user, and YOURsoft makes no warranties, either express or implied. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this Software may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of YOURsoft.

YOURsoft reserves any rights not expressly granted to you.
To keep this license valid, you must ensure that the YOURcom™ copyright notice is left intact and is visible. You must also keep all the copyright information intact in all the script headers, and in the scripts themselves.

By using this Software you agree to the license agreement and are bound by it. If you do not accept the license agreement, you are prohibited by law from using this Software in any way.

Portions of this license agreement may refer to the Software as: "YOURcom™".

For the purposes of this license agreement, "YOURcom™" is the version 1.3 of the Software.