Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

BlackBerry App World™ Development

Reply
Developer
SunnyDee
Posts: 75
Registered: 01-28-2009

Dynamic license key

Hi,

 

Trying to figure out the php script to retrieve the POST from the App WOrld and then send back a response;

 

for the post to retrieve the PIN i'm guessing something like this will work:

 

 

<?php $myPIN = $_POST['PIN']; //do stuff to generate the key here //return response with a key ?>

how do i send the response containing the key?

 

Thanks!

 

 

 

Please use plain text.
Developer
SunnyDee
Posts: 75
Registered: 01-28-2009

Re: Dynamic license key

Can anyone confirm if this would work?

 

 

<?php $host = $_SERVER['HTTP_HOST']; $myPIN = $_POST['PIN']; //manipulate $myPIN to generate $key $fp = fsockopen($host, 80); fputs($fp, "HTTP/1.1 200 Ok\r\n"); fputs($fp,"Content-Type: application/www-url-encoded\r\n"); fputs($fp, "Content-Length: 20\r\n\r\n"); fputs($fp, "key=" . $key); fclose($fp); ?>

 

 

 

Please use plain text.
Administrator
mkirkup
Posts: 179
Registered: 07-14-2008

Re: Dynamic license key

I am by no means a PHP expert so cannot really comment on your PHP code.  What I can say is that when you submit your application and note that it leverages dynamic licensing you will have the ability to test your dynamic licensing server implementation to ensure that it operates properly.

 

Mike Kirkup
Director, Developer Relations
Please use plain text.
Developer
joedfranc
Posts: 61
Registered: 05-21-2009

Re: Dynamic license key

Hai

        Is this code work for you buddy.. I am also in toruble with response to vendor portal.. can you please let me know ...

<?php
$host = $_SERVER['HTTP_HOST'];
$myPIN = $_POST['PIN'];


//manipulate $myPIN to generate $key




$fp = fsockopen($host, 80);

fputs($fp, "HTTP/1.1 200 Ok\r\n");
fputs($fp,"Content-Type: application/www-url-encoded\r\n");
fputs($fp, "Content-Length: 20\r\n\r\n");
fputs($fp, "key=" . $key);

fclose($fp);
?>

 Thanks in Advance

 

Joe

Please use plain text.
Developer
sblantipodi
Posts: 1,050
Registered: 02-19-2009

Re: Dynamic license key

mmm. this code should work fine, is there someone who can confirm?
Please use plain text.
Developer
RLord321
Posts: 343
Registered: 02-23-2009

Re: Dynamic license key

Check the Content-Length.  I don't know why the test in AppWorld put 20 in there.  I know it was an example but if it says key=ABCDEFGHIJK, the Content-Length would be 15.

 

Just making sure you are not hard coding the value of 20 here.

Please use plain text.
Developer
sblantipodi
Posts: 1,050
Registered: 02-19-2009

Re: Dynamic license key

rsure thanks rlord.

 

I'm ready to enter BB store now but I'm not sure that I want to bet 200$

for a store that I can neither visit here from europe.

Please use plain text.
Developer
RLord321
Posts: 343
Registered: 02-23-2009

Re: Dynamic license key

I wouldn't let that stop you.  Even though you can't view the store, there are many many people who can. 

 

By the way, I do offer services to generate keys for dynamic licensing hosted on my website.  It's based off of whatever algorithm you come up with and it checks the IP of the sender.  It works for 3 different websites/applications.  They are AppWorld, MobiHand, and Handango.  I also perform testing for people who don't have real hardware available (STORM, BOLD, etc).  Let me know if you are interested.

Please use plain text.
Developer
sblantipodi
Posts: 1,050
Registered: 02-19-2009

Re: Dynamic license key

you are so kind, as always...

thanks but I've got a dedicated server where to generate my activation code,

the only problem is that I cannot see the app store and I can't realize if there is a similar apps

like the one I want to upload and if  my apps will worth 200$ on that store.

 

 

Please use plain text.
Developer
RLord321
Posts: 343
Registered: 02-23-2009

Re: Dynamic license key

Just mentioning :-)  There will always be an app similar to yours now or in the future.  Right now I see a game that I made as shareware and gave to the AOL community back in the day.. I mean, it was a remake of a classic game but it had its unique twists... this game that is available has the same twists...I mean, it's really bad... but right now I'm in the process of remaking this same game for the blackberry and the one that's pretty much a clone mine (you know who you are!) that has been selling is not slowing my efforts.

 

To check to see if there are apps similar to yours, go to

www.mobihand.com

www.handango.com

www.pocketgear.com

www.handmark.com

 

The same games pretty much show up on all the sites.  Have you registered to be a developer on any of these sites yet?

 

Please use plain text.