Web Development Questions That Don't Need Their Own Thread v2
3,079 replies, posted
[QUOTE=MXbd6tWTxB;32537302]So I made this game that I want people to download from my website (because that's the only way to get paid from it... i'm not selling it, just banking with ads)
My cousins have said: "we already told all our friends, they're playing it everyday at school!"
Me: "Well bro, why don't I see the downloads going up?"
SO. what I'm thinking is this. Somehow I need to have a hidden data value somewhere that indicates the IP of the computer the game was downloaded on.. i'm sorry, i meant IP of the network.
Then when the game runs, (if it can connect to the net) it will check the IP of the player... if it matches, it will play, if it doesn't match, it will say "you need to download it from the site asshole, instead of passing it around on a USB".... if there is no internet connection then it will just play. (the thing is, people wont realize that web connection is needed ... well, not right away ... most kids are constantly connected to the internet, i mean, who ever turns off their modem?)
my question is. can i insert a dynamic file into the .zip folder that is being downloaded?
I'm using PHP. So, any help?[/QUOTE]sure you can include a PHP file in the download, but it won't run unless they have a server and run the document on it. You're better off having a check in the game itself, because that's the only thing that's guaranteed to be run by them
I mean, I want PHP to inject a file in the .zip (or maybe even change the name of the .zip folder being downloaded)
That way, when it's downloaded, there is a small bit of data that can help determine if they downloaded on their computer or not.
For example I might change the zip name to to md5($IP)
that way when the game does check for an internet connection & correct IP, it can read the folder name
changing the folder name is actually a bad idea because people will probably rename that folder to the game's name.
So instead I'll want o change... IDk... IDk...IDK.
There is nothing I can do in-game to ensure they downloaded that .exe from the website.
[QUOTE=MXbd6tWTxB;32537639]I mean, I want PHP to inject a file in the .zip (or maybe even change the name of the .zip folder being downloaded)
That way, when it's downloaded, there is a small bit of data that can help determine if they downloaded on their computer or not.
For example I might change the zip name to to md5($IP)
that way when the game does check for an internet connection & correct IP, it can read the folder name
changing the folder name is actually a bad idea because people will probably rename that folder to the game's name.
So instead I'll want o change... IDk... IDk...IDK.
There is nothing I can do in-game to ensure they downloaded that .exe from the website.[/QUOTE]
That won't work.
How about a serial key activation? They get a serial when they register on your website which they can use to install the game.
why not make it so when they click on a download button, it submits a form with all the data you need?
[QUOTE=zzlawlzz;32538381]why not make it so when they click on a download button, it submits a form with all the data you need?[/QUOTE]
He wants them unable to share it with a usb-stick, so they all have to go trough his website and he can collect the advertising money.
[QUOTE=mobrockers2;32537963]That won't work.
How about a serial key activation? They get a serial when they register on your website which they can use to install the game.[/QUOTE]
So I'd store a key in my DB
Then I'd prompt for a key if one hasn't been entered into the registry?
I'm hoping that wont be too much of a hassle. It will work though.
Let's see:
0.) Have player enter email
1.) Trigger Download
2.) Send Key to player's email
3.) They load game up
4.) Prompt if no key in registry.
5.) put the "OK" in registry if prompt's answer matches DB thing
6.) forward to game
the game is well liked. So I know it will be tolerated to some extent. But for oncoming players the game seems too good to be true and with all these demands i'm gonna get a lot of:
[IMG]http://i.imgur.com/Sso9u.jpg[/IMG]
The game does have a youtube, twitter and that whole social media jazz. So there is plenty of evidence to show people THIS GAME IS REAL. but not everyone is going to know that.... even with the videos on the front page :/
my first cure for this was going to just keep up with a lot of updates. That way people would constantly check to see if there was anything new. checking the website... so i can get some ad monies.
I say "my first cure" but I've never tried it because I've never done rapid updates. I'll have to try it once I launch some new advertising program.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
on a good note I did manage to land this imgur
[url]http://i.imgur.com/Cocks.png[/url]
Cocks is the emphasis here. I'm proud of this. I don't know why, but it makes me feel like I've found a nugget of gold.
moving on
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I know this isn't web related, but how do you think players would take to this:
having to download the game every time there is an update. this would help force lots of people to DL from the website, but it also might piss some off. How many people that is pissed off, I don't know; that's where you come in (would you be pissed?).
There will be updates every week if not every 3 days.
I'm using second rate software to program this game, so automatic updates is quite the hassle. (plus auto updates don't bring people to the site)
( before 2012 starts I'll be re-writing the game from scratch in java... assuming i make enough money from this game + other projects )
[QUOTE=MXbd6tWTxB;32540011]So I'd store a key in my DB
Then I'd prompt for a key if one hasn't been entered into the registry?
I'm hoping that wont be too much of a hassle. It will work though.
Let's see:
0.) Have player enter email
1.) Trigger Download
2.) Send Key to player's email
3.) They load game up
4.) Prompt if no key in registry.
5.) put the "OK" in registry if prompt's answer matches DB thing
6.) forward to game
the game is well liked. So I know it will be tolerated to some extent. But for oncoming players the game seems too good to be true and with all these demands i'm gonna get a lot of:
[IMG]http://i.imgur.com/Sso9u.jpg[/IMG]
The game does have a youtube, twitter and that whole social media jazz. So there is plenty of evidence to show people THIS GAME IS REAL. but not everyone is going to know that.... even with the videos on the front page :/
my first cure for this was going to just keep up with a lot of updates. That way people would constantly check to see if there was anything new. checking the website... so i can get some ad monies.
I say "my first cure" but I've never tried it because I've never done rapid updates. I'll have to try it once I launch some new advertising program.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
on a good note I did manage to land this imgur
[url]http://i.imgur.com/Cocks.png[/url]
Cocks is the emphasis here. I'm proud of this. I don't know why, but it makes me feel like I've found a nugget of gold.
moving on
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I know this isn't web related, but how do you think players would take to this:
having to download the game every time there is an update. this would help force lots of people to DL from the website, but it also might piss some off. How many people that is pissed off, I don't know; that's where you come in (would you be pissed?).
There will be updates every week if not every 3 days.
I'm using second rate software to program this game, so automatic updates is quite the hassle. (plus auto updates don't bring people to the site)
( before 2012 starts I'll be re-writing the game from scratch in java... assuming i make enough money from this game + other projects )[/QUOTE]
How about no registration, as soon as they click download they get the key on screen?
I fear they may lose it...
oh wait... if they do they can go back to the site (to the ads)
and get a new one :D
Site: "QUICKLY NOW!!! COPY THIS REGISTRATION CODE BEFORE THE PAGE REDIRECTS!
vi0MLhp1SclTNIGxJYz5"
(don't forget, the javascript prevents highlighting and right clicking)
1 second later: "I'm sorry, please try again"
I kid, that would be annoying.
yeah. this works.
I'll need to figure out how to put stuff in the registry, & i'll need a DLL to get connection to the internet, but this works very well. If they don't have internet connection... should I not allow them to play?
If I allow them to play and they are really trying to turn off their connection every time they load the game then that will eventually ware on them, especially if I do the registration+connection check every time a battle ends.... oh yeah, we gott'em good. Thanks for the advice.
[QUOTE=MXbd6tWTxB;32540558]I fear they may lose it...
oh wait... if they do they can go back to the site (to the ads)
and get a new one :D
Site: "QUICKLY NOW!!! COPY THIS REGISTRATION CODE BEFORE THE PAGE REDIRECTS!
vi0MLhp1SclTNIGxJYz5"
(don't forget, the javascript prevents highlighting and right clicking)
1 second later: "I'm sorry, please try again"
I kid, that would be annoying.
yeah. this works.
I'll need to figure out how to put stuff in the registry, & i'll need a DLL to get connection to the internet, but this works very well. If they don't have internet connection... should I not allow them to play?
If I allow them to play and they are really trying to turn off their connection every time they load the game then that will eventually ware on them, especially if I do the registration+connection check every time a battle ends.... oh yeah, we gott'em good. Thanks for the advice.[/QUOTE]
They don't need to connect to the internet, why would you want them to connect? Why would your game need online verification? Just create a humangus list of keys and save that somewhere in the exe. Your game is free, online verification is bs.
oh yes... a large list of keys... hrm....
but the thing is... what if they share the keys with their friends (neglecting the site)
#checkmate?
[QUOTE=MXbd6tWTxB;32540011]lines and lines and lines[/QUOTE]
In other words: How to make sure nobody plays your free game in...well, frankly, way too many steps.
[QUOTE=StinkyJoe;32540897]In other words: How to make sure nobody plays your free game in...well, frankly, way too many steps.[/QUOTE] my point exactly
[QUOTE=StinkyJoe;32509956]I cleaned up the code a bit:
But most likely the problem is with a missing URL rewrite, since the URLs point to /pagename, while the script actually expects scriptname.php?page=pagename
My Apache is a bit rusty, but something along these lines should work:
Put that in an .htaccess file in the same directory as the script, rename SCRIPTNAME to the script's name (which will probably be 'index.php', and it should be good to go.)[/QUOTE]
thanks a lot man! and i mean it, i was burning my ass on this for daaays. works like a charm on usbwebserver, and i don't know why but breaks on WAMP (still gives the 404)
shows me this error in Apache error log
[code]
[Thu Sep 29 20:27:10 2011] [error] [client 127.0.0.1] File does not exist: C:/Program Files/wamp/www/about, referer: http://localhost/
[/code]
which bums be out b/c im sure everything points to includes/pages(/about.php)
I'm just going to update the game a lot and hopefully people will download it when upgrades come out without having to wait on "that kid" who has the game on his flash drive.
[QUOTE=MXbd6tWTxB;32540970]I'm just going to update the game a lot and hopefully people will download it when upgrades come out without having to wait on "that kid" who has the game on his flash drive.[/QUOTE]
sounds like the way dev's work on those bad free MMORPG's dude, you should really sit down with a cold brew and chill out and think of something really simple but effective which isn't much of a hassle for players to go through.
i'm having ICT class tomorrow, and the teacher always ends the week with asking a development question, like "how would you solve X and Y with a simple solution" and i'll ask him to ask the class a question that would help you out
[QUOTE=MXbd6tWTxB;32540970]I'm just going to update the game a lot and hopefully people will download it when upgrades come out without having to wait on "that kid" who has the game on his flash drive.[/QUOTE]
I still wouldnt think anyone will download unless your updates are huge.
(I know i wouldnt bother.)
[QUOTE=Elexar;32540942]thanks a lot man! and i mean it, i was burning my ass on this for daaays. works like a charm on usbwebserver, and i don't know why but breaks on WAMP (still gives the 404)
shows me this error in Apache error log
[code]
[Thu Sep 29 20:27:10 2011] [error] [client 127.0.0.1] File does not exist: C:/Program Files/wamp/www/about, referer: http://localhost/
[/code]
which bums be out b/c im sure everything points to includes/pages(/about.php)[/QUOTE]
WAMP's Apache comes with mod_rewrite disabled by default. Look for 'LoadModule mod_rewrite.so' or something similar in your apache's httpd.conf file, and uncomment it, then restart WAMP and you're good to go.
[QUOTE=StinkyJoe;32541642]WAMP's Apache comes with mod_rewrite disabled by default. Look for 'LoadModule mod_rewrite.so' or something similar in your apache's httpd.conf file, and uncomment it, then restart WAMP and you're good to go.[/QUOTE]
Or you can use the WAMP manager. Click the WAMP icon, then Apache -> Apache Modules -> rewrite_module.
PHP/SQL Question :
If I have a game where a player owns items in a table called itemOwner and each owned item is its own entry (playerid, itemid) and I want the player to 'buy' 100 items is there any easy way in sql to add 100 entries?
I don't want to add a quantity variable, all the items need to be their own instances. I also don't want to execute 100 queries because that would be stupid. I'm not sure I want to make a gigantic insert query in a loop because that seems like it would be slow/silly as well and makes me think of "yo dawg I heard you liked inserting so I put inserts in your inserts so you can insert while you insert"
Cheers for any help!
[QUOTE=Helk;32544615]PHP/SQL Question :
If I have a game where a player owns items in a table called itemOwner and each owned item is its own entry (playerid, itemid) and I want the player to 'buy' 100 items is there any easy way in sql to add 100 entries?
I don't want to add a quantity variable, all the items need to be their own instances. I also don't want to execute 100 queries because that would be stupid. I'm not sure I want to make a gigantic insert query in a loop because that seems like it would be slow/silly as well and makes me think of "yo dawg I heard you liked inserting so I put inserts in your inserts so you can insert while you insert"
Cheers for any help![/QUOTE]
You should just make it so each time someone buys something it just updates the query by +1 or +2 ..etc. and when used -1 or -2 each time
And in the player's view maybe you can loop the the about of items they bought.
What would I be doing +1 to, I don't understand
[QUOTE=Helk;32545632]What would I be doing +1 to, I don't understand[/QUOTE]
I looked around a bit for you, and there doesn't seem to be any way to quickly create [I]n[/I] rows with the same column values. You can try something with the MySQL [URL="http://dev.mysql.com/doc/refman/5.0/en/repeat-statement.html"]REPEAT[/URL] or [URL="http://dev.mysql.com/doc/refman/5.0/en/while-statement.html"]WHILE[/URL] statements. Neither give you an easy way to do this, but it's a possibility.
Doing a loop directly with PHP, while costly, might actually not be as bad as you think if you use [url=http://php.net/manual/en/book.pdo.php]PDO[/url], as it compiles queries, making repeat executions faster.
[QUOTE=jaybuz;32530945]Anyone noticed horrible background clipping in webkit?
[img]http://dl.dropbox.com/u/386727/ScrnCap/webkit-bg-clipping.png[/img]
This is using:
[code]
background-clip: content-box
[/code][/QUOTE]
Use padding-box?
[QUOTE=MXbd6tWTxB;32540970]I'm just going to update the game a lot and hopefully people will download it when upgrades come out without having to wait on "that kid" who has the game on his flash drive.[/QUOTE]
Or Or just put a advert in the main menu of the game or something? or have like a launcher with your webpage and latest updates or something, similar to minecraft but with ads.
To be honest you should just be happy people are enjoying your game. You could do away with the ads and sell it for a small price with no DRM and encourage people to pay for it
[QUOTE=a2h;32549179]Use padding-box?[/QUOTE]
I've tried all the modes, nothing works. I Googled about and found out it's just the way Webkit does it atm. I'm hoping they improve it soon.
What would the general procedure be for registering a domain and getting hosting for it? Should I register the domain name and get hosting for it separately?
I just want a website that's basically a media dump blog for all my mapping/programming work, as well as a place to host binaries for the things I've finished and released. I don't really care about downtime, unless it's crazy high. I just want to make sure I can transfer the domain if I need to. I don't need many fancy features, something cheap will do.
I already have a wordpress blog that I'm using for my current media dump blog, transferring the content over looks fairly simple.
[QUOTE=robmaister12;32580439]What would the general procedure be for registering a domain and getting hosting for it? Should I register the domain name and get hosting for it separately?
I just want a website that's basically a media dump blog for all my mapping/programming work, as well as a place to host binaries for the things I've finished and released. I don't really care about downtime, unless it's crazy high. I just want to make sure I can transfer the domain if I need to. I don't need many fancy features, something cheap will do.
I already have a wordpress blog that I'm using for my current media dump blog, transferring the content over looks fairly simple.[/QUOTE]
Free/Paid?
[QUOTE=robmaister12;32580439]What would the general procedure be for registering a domain and getting hosting for it? Should I register the domain name and get hosting for it separately?
I just want a website that's basically a media dump blog for all my mapping/programming work, as well as a place to host binaries for the things I've finished and released. I don't really care about downtime, unless it's crazy high. I just want to make sure I can transfer the domain if I need to. I don't need many fancy features, something cheap will do.
I already have a wordpress blog that I'm using for my current media dump blog, transferring the content over looks fairly simple.[/QUOTE]
My general rule is to register at Namecheap because they have a fairly nice control panel, amazing features, free whoisguard, 24/7 live support who aren't a bunch of dicks, and have discounts (just ask in live chat).
I can host you for free if you want, don't expect anything more than FTP access though. I can provide a database if needed too
[QUOTE=Fleamonji;32580795]My general rule is to register at Namecheap because they have a fairly nice control panel, amazing features, free whoisguard, 24/7 live support who aren't a bunch of dicks, and have discounts (just ask in live chat).
I can host you for free if you want, don't expect anything more than FTP access though. I can provide a database if needed too[/QUOTE]
Namecheap is amazing. I recommend them as well.
I'll just go with Namecheap, domain registration price seems good, Value plan should be more than enough for a bunch of pictures and a few binaries.
Thanks guys.
Sorry, you need to Log In to post a reply to this thread.