DLGuard
fully integrated with the major payment systems
Paypal
Clickbank
2checkout
Authorize.Net
Click2Sell
1ShoppingCart
LinkPoint
AlertPay
eBay
PayDotCom
Mal's e-commerce
PagSeguro
CCBill
CommerceGate
DigiResults
FastSpring
JVZoo
MultiSafePay
WorldPay
Plimus
WSO Pro
Paypal Digital Goods
RevenueWire
SWReg
     

Product protection after download
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    DLGuard Forum Forum Index -> Member's Tips and Tricks!
View previous topic :: View next topic  
Author Message
admin
Site Admin


Joined: 31 Jul 2005
Posts: 9396
Location: Australia

PostPosted: Thu May 08, 2008 7:27 am    Post subject: Reply with quote

Andrew is right, as well as receipt number checking, you can also send machine code checking, and create a database on your website of a machine code and it's associated receipt number.

This can be done for website scripts by passing website URLs.

Thanks for the input Andrew!

cheers
Sam
_________________
Sam Stephens
DLGuard: www.dlguard.com
GuardHQ: www.guardhq.com
-------
Keep up to date with DLGuard and other GuardHQ products: www.guardhq.com/newsletter.php
www.twitter.com/DLGuard
Back to top
View user's profile Send private message Send e-mail Visit poster's website
AndrewTraub



Joined: 07 May 2008
Posts: 15

PostPosted: Fri May 09, 2008 7:55 pm    Post subject: Reply with quote

admin wrote:
Andrew is right, as well as receipt number checking, you can also send machine code checking, and create a database on your website of a machine code and it's associated receipt number.

This can be done for website scripts by passing website URLs.

Thanks for the input Andrew!

cheers
Sam


Thanks Sam. I have written a simple php page that takes an order id, name, and email and writes it to a table. If the same page is passed the order id, name, and email, and a "fingerprint" it updates the record. If it is only passed the order id and fingerprint, it returns a message based on whether the entry was found.

What I don't understand is how the custom script url and custom template interact. If I specify a custom script url, will that be called INSTEAD of the template or will both be called?

If both are called, what are the variables posted to the script url?

I would rather call from a custom script than use an iframe.

Thanks,
_________________
Andrew
http://www.softwarefactoryinc.com
Back to top
View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 31 Jul 2005
Posts: 9396
Location: Australia

PostPosted: Sat May 10, 2008 9:02 am    Post subject: Reply with quote

Hi Andrew,

Sounds like you've got a nice script going!

The Custom URL is an invisible "POST" that DLGuard does at the point of sale - it sends your customer's sales info to the script you specify. The variables for this can be found in DLGuard, under the Help menu > Developers.

The custom template is the page that your customer reaches to download their product.

Usually, if you want a script to do something, you'd use the Custom Script option.

The custom template is more for simply making the download page have the same look and feel of the rest of your website, however you can run Javascript and iframes if you wish.

Does this make more sense?

So if you use both, then both will be used. The sale takes place, DLGuard validates it, then send the details to your Custom Script, and then sends your customer to your Custom Template Page to download their product.

cheers
Sam
_________________
Sam Stephens
DLGuard: www.dlguard.com
GuardHQ: www.guardhq.com
-------
Keep up to date with DLGuard and other GuardHQ products: www.guardhq.com/newsletter.php
www.twitter.com/DLGuard
Back to top
View user's profile Send private message Send e-mail Visit poster's website
AndrewTraub



Joined: 07 May 2008
Posts: 15

PostPosted: Sun May 18, 2008 7:04 pm    Post subject: Query.php Reply with quote

I've noticed that Stevenh77's code uses the query method instead of the post method - will both work with the query.php file?

Thanks,

Andrew
_________________
Andrew
http://www.softwarefactoryinc.com
Back to top
View user's profile Send private message Visit poster's website
AndrewTraub



Joined: 07 May 2008
Posts: 15

PostPosted: Sun May 18, 2008 8:53 pm    Post subject: Problem Reply with quote

I fixed StevenH77's code which had two small errors.

I also modified my script which had taken query string inputs (and had been working) to use posts instead.

I put the full url in the "Custom script URL" part of the DLGuard product screen and then created a new order in DLGuard, checking the "Run Custom Script URL if set"

However, my database was not updated when the customer was originally created within DLGuard and not created when I visited the download URL.

How can I debug this - can I email support the script?

Andrew
_________________
Andrew
http://www.softwarefactoryinc.com
Back to top
View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 31 Jul 2005
Posts: 9396
Location: Australia

PostPosted: Mon May 19, 2008 1:28 am    Post subject: Reply with quote

Hi Andrew,

Quote:
I've noticed that Stevenh77's code uses the query method instead of the post method - will both work with the query.php file?


Yes, both methods (GET and POST) work for the Query script. I prefer POST, but either will work!


The easiest way to debug one of these scripts is to simply modify the script so it reads static values (ie. instead of passing them via POST, just hardcode them into your script).

Then run the script, and see what kind of errors (if any) pop up.

This way you can debug it the same way you would a standard script.

Does this make sense?

cheers
Sam
_________________
Sam Stephens
DLGuard: www.dlguard.com
GuardHQ: www.guardhq.com
-------
Keep up to date with DLGuard and other GuardHQ products: www.guardhq.com/newsletter.php
www.twitter.com/DLGuard
Back to top
View user's profile Send private message Send e-mail Visit poster's website
AndrewTraub



Joined: 07 May 2008
Posts: 15

PostPosted: Mon May 19, 2008 10:15 pm    Post subject: Reply with quote

admin wrote:

Yes, both methods (GET and POST) work for the Query script. I prefer POST, but either will work!


Thanks. However, I am not interacting with the Query script for this part of the licensing. I need DLGuard to call my script when a sale occurs, passing in the order number, name, and email address of the person placing the order. I assume DLGuard is posting to my script with the same variables the Query script uses.

admin wrote:

The easiest way to debug one of these scripts is to simply modify the script so it reads static values (ie. instead of passing them via POST, just hardcode them into your script).

Then run the script, and see what kind of errors (if any) pop up.

This way you can debug it the same way you would a standard script.

Does this make sense?


I think all I really need to know is, when my script is called from DLGuard, are the variables passed with post or get (though I guess I can write code to check for both) and more importantly what are the variable names.

Thanks,
_________________
Andrew
http://www.softwarefactoryinc.com
Back to top
View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 31 Jul 2005
Posts: 9396
Location: Australia

PostPosted: Tue May 20, 2008 3:18 am    Post subject: Reply with quote

Quote:
I need DLGuard to call my script when a sale occurs, passing in the order number, name, and email address of the person placing the order. I assume DLGuard is posting to my script with the same variables the Query script uses.


Ah, I see - on the Developers page there is a part about Instant Notificaiton.

This happens by use of the Custom URL feature. This means that when a sale is made, DLGuard will POST the sales details to your script.

The variables are listed on the Developers Help page, and there is an "ipnexample.php" file in the main folder of your DLGuard that shows this in action.

You'll get:

ipnSecretKey : your secret key as set in DLG's config screen

processor_type : the processor used for the sale.

receipt : customers receipt number

name : the customers full name

email : the customers email address

product_number : the product number of the product the customer purchased

product_name : the name of the product the customer purchased



Quote:
when my script is called from DLGuard, are the variables passed with post or get


POST

cheers
Sam
_________________
Sam Stephens
DLGuard: www.dlguard.com
GuardHQ: www.guardhq.com
-------
Keep up to date with DLGuard and other GuardHQ products: www.guardhq.com/newsletter.php
www.twitter.com/DLGuard
Back to top
View user's profile Send private message Send e-mail Visit poster's website
v7web



Joined: 03 May 2008
Posts: 16

PostPosted: Fri May 23, 2008 9:27 pm    Post subject: Reply with quote

Hi,
Great work.

Does anyone happen to have an example code for visual basic?

I am somewhat new to VB9 and any help would be superb.

Thanks,
Paul
Back to top
View user's profile Send private message
halls7



Joined: 23 Dec 2007
Posts: 55
Location: Malta

PostPosted: Fri Oct 03, 2008 10:47 am    Post subject: Reply with quote

Hi,

What if the customer sends the software itself, including his email address and license information to others? Means he shares everything...

Will Dlguard has security against this?

Thanks,
Karl
_________________
OutRankSmart NoAdware
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
admin
Site Admin


Joined: 31 Jul 2005
Posts: 9396
Location: Australia

PostPosted: Sat Oct 04, 2008 10:55 pm    Post subject: Reply with quote

Hi Karl,

You can set security up to protect against this:
http://dlguard.com/forum/viewtopic.php?p=9997#9997



Hi Paul,

I was hoping someone would be able to help you out there - I'm not a VB man (well, not since VB 6), so I wouldn't know where to start.

cheers
Sam
_________________
Sam Stephens
DLGuard: www.dlguard.com
GuardHQ: www.guardhq.com
-------
Keep up to date with DLGuard and other GuardHQ products: www.guardhq.com/newsletter.php
www.twitter.com/DLGuard
Back to top
View user's profile Send private message Send e-mail Visit poster's website
stevenh77



Joined: 09 May 2006
Posts: 26

PostPosted: Fri Feb 13, 2009 10:29 am    Post subject: Reply with quote

Hi guys, sorry I haven't been around for a while.. ran into some medical problems that took up most of my time.

@Andrew
I'd love to see what errors you fixed in my code, it was just something I threw together as a quick example of one of the more "advanced" features of DLGuard so I'm sure there were a few little bugs.

@Paul
VB9 uses the .NET runtime, so just compile this C# file to a DLL in Visual Studio (or the free Visual C# Express Edition) and include it in your VB project. You should be able to call the class directly from VB once the DLL is registered as a dependency.

@Anyone wanting to use this code in their own projects
Consider it public domain, use it however you want.
_________________
Check out my blog, Steven's Internet Marketing Tips.
Back to top
View user's profile Send private message
Adrien_B



Joined: 26 Feb 2009
Posts: 24
Location: Beijing

PostPosted: Thu Mar 12, 2009 4:28 am    Post subject: Reply with quote

Hi all,
I tried different ways to protect my pdfs. There is none really satisfying if you are worried to provide your customers with a non headache service.
I know what it takes to write a book (I'm not referring to a "let's wrap up a 90 pages e-book in 10 days" copied from articles got on the net. I'm talking about a real original work) and I know how painful it can be to see your book delivered free to folks who did not pay for it.

Unfortunately, the book you sold will be transferred to as many people as they want to, and dlg or other tools won't help in this matter.

What often Internet Marketer Pros say is this : people who got your book for free would probably never had bought it in the first place and most of the free downloads stay in folder without being effectively used for what they are. I know, I know, it still hurts but I have no choice since all the service I tried make you married-for life with their expensive protection method.
You can limit theft by giving your customer trouble but you'll maybe need great amount of support to troubleshoot their problems. Is that worth doing? It's up to you to decide. It's a very difficult question.

Good system are too expensive for self-publisher, lousy system giving headache in support and to your customers are countless.

Just my 2 cents,
Adrien
_________________
http://www.adrienbeaulieu.com
http://www.reussir-en-chine.com
http://www.une-vie-de-sens.com
http://stores.lulu.com/abeditions
Back to top
View user's profile Send private message Visit poster's website
stevenh77



Joined: 09 May 2006
Posts: 26

PostPosted: Sat Apr 04, 2009 6:57 pm    Post subject: Reply with quote

Unfortunately, there's no really good way to protect a PDF once it's been downloaded. You could "protect" it with a password, but it's just as easy for someone to share the password as it is to share the actual PDF (plus you run into situations where real customers might forget the password). You could wrap it in an EXE file that communicates with your server to handle licensing (There's one available with private label rights called Piracy Defender, I have but I've never used it, PM if interested) but then you might as well just create an EXE ebook to begin with because you're limited to Windows users only and it could create some customer support issues.

Other than that, all I can say is that people will share your PDF files. There's no good way to get around that fact, so your best bet is to try to build in as much "back-end" profit into your ebook as you can without making it into a sales page.
_________________
Check out my blog, Steven's Internet Marketing Tips.
Back to top
View user's profile Send private message
stevenh77



Joined: 09 May 2006
Posts: 26

PostPosted: Tue May 26, 2009 2:31 am    Post subject: PHP example Reply with quote

Someone on the Warrior Forum asked me how to call the DLGuard API in PHP, so I decided to write up some quick code and post it here for anyone who wants to use it. This example uses cURL, if anyone wants to see an example using fsockopen I can do that too but I really prefer to work with cURL whenever possible.

Code:
<?php
/*
 * DLGuard API in PHP, using cURL
 * Author: Steven Hancock <support at stevenhancock dot biz>
 * License: Consider this code public domain, use it however you want. Note
 * however that you must be a licensed user of DLGuard to get any use out of
 * this code.
 *
 * Define the following three constants to match your DLGuard configuration
 * and the product ID you wish to verify.
 *
 * Encode this file and any other license verification code with Zend, IonCube
 * or similar before shipping your product, or else your DLG query key will be
 * visible in your source code and your license verification will be easily
 * cracked.
 */
define("DLG_QUERY_URL", "http://yourdomain.com/dlg/query.php");
define("DLG_PRODUCT_ID", "product_id");
define("DLG_QUERY_KEY", "query_key");

/*
 * DLGuard API Query
 * Queries DLGuard API using cURL
 *
 * Input:
 * $query = complete query string to send to DLGuard's query.php
 *
 * Returns:
 * A string containing everything after the "dlguard:" in DLGuard's API
 * response
 */
function dlg_query($query) {
   $url = DLG_QUERY_URL.$query;
   $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL, $url);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
   $ret = curl_exec($ch);
   curl_close($ch);
   $res = explode(":",$ret);
   return $res[1];
}

/*
 * DLGuard Receipt Validation
 * Verifies that a receipt is valid and not refunded.
 *
 * Input:
 * $receipt = receipt number_format
 * $check_expired = (OPTIONAL) set to 1 if you want to return false on "expired"
 * downloads
 *
 * Returns boolean value:
 * true = receipt is valid and not refunded (and optionally, download is not
 * expired)
 * false = receipt is invalid or refunded (or optionally, download is expired)
 */
function dlg_product_validation($receipt, $check_expired = 0) {
   $query = "?r=".$receipt."&p=".DLG_PRODUCT_ID."&k=".DLG_QUERY_KEY;
   $ret = dlg_query($query);
   $res = explode(";",$ret);
   $valid = false;
   if (($res[1] == 1) && ($res[2] == 1) && ($res[3] == 0)) {
      $valid = true;
   }
   if (($check_expired == 1) && ($res[4] == 1)) {
      $valid = false;
   }
   return $valid;
}

/*
 * DLGuard Receipt / Email Validation
 * Verifies that a receipt and email address match and are not refunded.
 *
 * Input:
 * $email = email address
 * $receipt = receipt number_format
 *
 * Returns string with three possible values:
 * "true" = email address and receipt number match and are not refunded
 * "false" = email address and receipt number do not match
 * "refunded" = email address and receipt number match and are refunded
 */
function dlg_email_validation($email, $receipt) {
   $query = "?r=".$receipt."&e=".$email."&k=".DLG_QUERY_KEY;
   $ret = dlg_query($query);
   return $ret;
}
?>
<? /* This line and everything below is for testing and demonstration purposes only */
$email = "your_email";
$receipt = "your_receipt";
?>
<html>
<head>
<title>DLGuard API Test</title>
</head>
<body>
Receipt Validation: <?php echo dlg_product_validation($receipt) ? "true" : "false"; ?>
<br />
Email Validation: <?php echo dlg_email_validation($email, $receipt); ?>
</body>
</html>


Note that I did not include an example for the add user query. This code is basically just a "base" for a license verification system, there's no need to call the add user query and I don't feel it would be safe to call that query from a script running on a remote server.
_________________
Check out my blog, Steven's Internet Marketing Tips.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DLGuard Forum Forum Index -> Member's Tips and Tricks! All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group