+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Shopping cart help.

  1. #1
    begamer26 is offline x10Hosting Member begamer26 is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    24

    Shopping cart help.

    For selling a game: I am using PayPal shopping cart buttons, and am redirecting (On success) to a page which will ask them for their e-mail to send them a random code which will be added to a MySQL database, once the person opens the game (no help needed) it will go to the MySQL database and check if the users mac-address is in there, if not it will ask for the code they received in the e-mail, it will then check if it is in the MySQL database and then add the persons mac-address to it. THEN it will check if the mac-adress is in the database, if it is, it will let them to proceed to play the game. if not it will automaticaly close.

    *Deep breath* What I need help with is to somehow protect the page that they get redirected to, so they can only give the e-mail if they were 're-directed' by PayPal. (Not if the previous page they were on was PayPal.)

    Any help?
    Last edited by begamer26; 01-04-2011 at 08:46 AM.

  2. #2
    Anna's Avatar
    Anna is offline I am just me Anna is a name known to allAnna is a name known to all
    Join Date
    Aug 2007
    Location
    Sweden
    Posts
    6,569

    Re: Shopping cart help.

    I have no idea on the coding part, but there's potentially another problem with that scenario, if they are to open the game on their own computer, they will not be able to connect to the database if it is on one of our free accounts for verification. Access is restricted to content on our servers only. I notice you don't have a hosting account at this time, but wanted to point that out.

    I guess there'd be a way to check for http referrer, and set a "if not from paypal clause" that gives them information on how to buy the game? I'm sure someone more experienced in coding can suggest something better, and possibly also bash that idea for being insecure
    Do you have trouble reaching your site?
    Check here first: News and Announcements


    Don't forget that x10hosting has an irc server as well. Come and join the fun
    server: irc.x10hosting.com, main channel: #x10hosting
    There's a lot helpful users there if need help building your site

  3. #3
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: Shopping cart help.

    Re the first part, that sounds kinda tricky. I think I understood it, anyway You can't connect to MySQL remotely, and even if you could that would be a security flaw, as someone could reverse engineer your code, get the login info, and modify the database. It would be better to build something where you query the website, then it returns true or false, eg the game could query example.com/verify.php?cine7d84joj367dubv=vhhd6865ycgbb864 would return either true or false.

    You don't want to host that on free hosting, as you need a very fast server to do that. You would probably want VPS.

    Anyway, why not use the conventional enter code, play game?

    ~Callum
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

  4. #4
    begamer26 is offline x10Hosting Member begamer26 is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    24

    Re: Shopping cart help.

    @Anna I plan to get my site paid hosting and on a different website. : P

    @Callum You can connect to a MySQL through a game, It basically sends information to a php code which does the query. : P I'm not sure how someone could reverse engineer a .exe though. If there is a way, is there any way I could secure it?

    If they enter the code, play game. ANYONE could play the game for free. :/ Thats what I want to prevent. :C
    Last edited by begamer26; 01-03-2011 at 05:22 PM.

  5. #5
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: Shopping cart help.

    They don't even have to reverse engineer the game, they can just sandbox it and see what it connects to. It really isn't a good idea.

    Have a database of lots of random codes. Each code can be used three times, after that it becomes deactivated and the user has to ask you to reactivate it. Distribute one code with each copy of the game, and tell them that if they install it more than three times they will need to contact you. I'm not sure exactly how it should validate the code, but I'm thinking validate.php?code=longcomplexcodehere, which will then return true or false. In order to prevent hackers from brute forcing the code, you should restrict them to 3 attempts every 5 minutes, and then they have to contact you to get their IP unblacklisted.

    I think all that would work

    ~Callum
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

  6. #6
    begamer26 is offline x10Hosting Member begamer26 is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    24

    Re: Shopping cart help.

    Quote Originally Posted by Alex Mac View Post
    They don't even have to reverse engineer the game, they can just sandbox it and see what it connects to. It really isn't a good idea.

    Have a database of lots of random codes. Each code can be used three times, after that it becomes deactivated and the user has to ask you to reactivate it. Distribute one code with each copy of the game, and tell them that if they install it more than three times they will need to contact you. I'm not sure exactly how it should validate the code, but I'm thinking validate.php?code=longcomplexcodehere, which will then return true or false. In order to prevent hackers from brute forcing the code, you should restrict them to 3 attempts every 5 minutes, and then they have to contact you to get their IP unblacklisted.

    I think all that would work :)

    ~Callum
    C: Good idea! But I think something else than their IP should be blacklisted as people can spoof them quite easily. Overall Great idea! :D

  7. #7
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: Shopping cart help.

    They can spoof anything if they want to, just use their IP

    ~Callum
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

  8. #8
    begamer26 is offline x10Hosting Member begamer26 is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    24

    Re: Shopping cart help.

    Quote Originally Posted by Alex Mac View Post
    They can spoof anything if they want to, just use their IP

    ~Callum
    Yeah, but the IP changes all the time with a few ISP's. They would be able to play the game for a day, turn off their router, turn it back on, they'de get ripped off. :C The mac-address always stays the same though. C:

    Anyway, how would I make sure that the person got redirected from PayPal on the page where it askes them for their e-mail address? I want to make sure that you can only get the code if you payed for it. :B
    Last edited by begamer26; 01-04-2011 at 08:48 AM.

  9. #9
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: Shopping cart help.

    Nonono I meant that during installation they would have to enter the code, their copy isn't validated when the game is opened. If the server went down they wouldn't be able to play

    It's as easy to change or forge your mac address as it is to change your IP if you know how.

    I dont know about the paypal bit, sorry

    ~Callum
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

  10. #10
    begamer26 is offline x10Hosting Member begamer26 is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    24

    Re: Shopping cart help.

    Quote Originally Posted by Alex Mac View Post
    Nonono I meant that during installation they would have to enter the code, their copy isn't validated when the game is opened. If the server went down they wouldn't be able to play

    It's as easy to change or forge your mac address as it is to change your IP if you know how.

    I dont know about the paypal bit, sorry

    ~Callum
    I'm not sure how I would do that though?

+ Reply to Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Shopping Cart
    By stesouthby in forum Scripts & 3rd Party Apps
    Replies: 1
    Last Post: 10-05-2010, 08:12 AM
  2. shopping cart
    By flyinpolak in forum Programming Help
    Replies: 3
    Last Post: 10-04-2009, 12:23 AM
  3. PHP Shopping Cart
    By Twinkie in forum Programming Help
    Replies: 12
    Last Post: 06-21-2009, 03:44 PM
  4. Shopping cart
    By VictorySkateShop in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 10-19-2007, 02:50 AM
  5. Shopping Cart?
    By UndergroundMark in forum Off Topic
    Replies: 3
    Last Post: 10-26-2005, 02:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers