Jump to content
MakeWebGames

Decepti0n

Members
  • Posts

    731
  • Joined

  • Last visited

    Never

Everything posted by Decepti0n

  1. Re: Help me test this Do you know what your hand was? :\
  2. http://www.decepti0n.com/blackjack.php So the cards all add up right, all the shit that should wins, wins, etc :D Btw, the HIDDEN shows the card just for testing (normally it'd be blank)
  3. Re: Good Places to Advertise? I used reachads before $80 got me 1254 clicks and 942k impressions, forgot how many total signed up, maybe a few hundred
  4. Re: !!**Whore House Mod FREE**!!   <?php /*----------------------------------------------------- -- Whore House v1.0 -- A product of Stage3Gaming -- [url]http://www.stage3gaming.com[/url] -- whorehouse.php -----------------------------------------------------*/ include "globals.php"; if(!$_GET['spend']) { print "<h2>5th Street Whore House</h2> Welcome, we have many fine prostitutes here, both male and female. Prices and payment options are listed below. <h3>For The Guys</h3> <table border='1' width='90%' bordercolor='#939393'><tr background='tablehgrad.png'><th>Prostitute</th><th>Age</th><th>Sex</th><th>Price</th><th><center>Hire</th></tr><tr> <td><center>April</td><td><center>19</td><td><center>Female</td><td><center>$1,000,000</td><td><center>[url='whorehouse.php?spend=april']Hire April[/url]</td></tr><tr> <td><center>Kelly</td><td><center>18</td><td><center>Female</td><td><center>$5,000,000</td><td><center>[url='whorehouse.php?spend=kelly']Hire Kelly[/url]</td></tr><tr> <td><center>Shaniqua</td><td><center>23</td><td><center>Female</td><td><center>$7,000,000</td><td><center>[url='whorehouse.php?spend=shaniqua']Hire Shaniqua[/url]</td></tr><tr> <td><center>Rhonda</td><td><center>20</td><td><center>Female</td><td><center>$10,000,000</td><td><center>[url='whorehouse.php?spend=rhonda']Hire Rhonda[/url]</td></tr></table>"; print " <h3>For The Ladies</h3> <table border='1' width='90%' bordercolor='#939393'><tr background='tablehgrad.png'><th>Prostitute</th><th>Age</th><th>Sex</th><th>Price</th><th><center>Hire</th></tr><tr> <td><center>Mark</td><td><center>26</td><td><center>Male</td><td><center>$1,000,000</td><td><center>[url='whorehouse.php?spend=mark']Hire Mark[/url]</td></tr><tr> <td><center>Jason</td><td><center>23</td><td><center>Male</td><td><center>$5,000,000</td><td><center>[url='whorehouse.php?spend=jason']Hire Jason[/url]</td></tr><tr> <td><center>Jaquez</td><td><center>20</td><td><center>Male</td><td><center>$7,000,000</td><td><center>[url='whorehouse.php?spend=jaquez']Hire Jaquez[/url]</td></tr><tr> <td><center>Matthew</td><td><center>29</td><td><center>Male</td><td><center>$10,000,000</td><td><center>[url='whorehouse.php?spend=matthew']Hire Matthew[/url]</td></tr></table>"; print " <h3>Gay And Lesbian Only</h3> <table border='1' width='90%' bordercolor='#939393'><tr background='tablehgrad.png'><th>Prostitute</th><th>Age</th><th>Sex</th><th>Price</th><th><center>Hire</th></tr><tr> <td><center>Tommy</td><td><center>22</td><td><center>Male</td><td><center>$1,000,000</td><td><center>[url='whorehouse.php?spend=tommy']Hire Tommy[/url]</td></tr><tr> <td><center>Tina</td><td><center>18</td><td><center>Female</td><td><center>$5,000,000</td><td><center>[url='whorehouse.php?spend=tina']Hire Tina[/url]</td></tr><tr> <td><center>Riko</td><td><center>20</td><td><center>Male</td><td><center>$7,000,000</td><td><center>[url='whorehouse.php?spend=riko']Hire Riko[/url]</td></tr><tr> <td><center>Michelle</td><td><center>18</td><td><center>Female</td><td><center>$10,000,000</td><td><center>[url='whorehouse.php?spend=michelle']Hire Michelle[/url]</td></tr></table>"; } else { $her = array('april','kelly','shaniqua','rhonda','michelle','tina'); $him = array('mark','jason','jaquez','matthew','tommy','riko'); switch ($_GET['spend']) { case "april": case "tommy": case "mark": $cost = 1000000; $will = 35; break; case "kelly": case "jason": case "tina": $cost = 5000000; $will = 70; break; case "shaniqua": case "jaquez": case "riko": $cost = 7000000; $will = 140; break; case "rhonda": case "matt": case "michelle": $cost = 10000000; $will = 250; break; } if($ir['money'] < $cost) { echo "You don't have enough money to hire a ".ucfirst($_GET['spend'])."!"; } else { $will_q = (($ir['will'] + $will) > $ir['maxwill']) ? "will=maxwill" : "will=will+$will"; $will_q .= ", energy = 0, money = money - $cost"; $gender = (in_array($_GET['spend'], $her)) ? "her" : "him"; mysql_query("UPDATE users SET $will_q WHERE userid=$userid",$c); echo "<center>You payed a ".ucfirst($_GET['spend'])." \$".number_format($cost).", took $gender to the back room and had your way with $gender. You feel some of your will comming back to you. [url='index.php']>Home[/url]</center>"; } } $h->endpage(); // 197 lines cut to 84 ?>   All that isn't really necessary :|
  5. Re: Shafted by LunarPages Don't use so many resources then? :\ If there's much bigger sites running on shared servers fine, you can't just run screaming at the host
  6. Re: Hmm this section needs something Mine updates when they visit the profiles page, but I might change it, thats the only way I have it now. Instead of updating almost the entire table of players, it just gets the one that a) is being viewed by a profile and b) actually has less health/is in hosp. So far I haven't noticed anything, but its relatively small-scale, so we'll have to see how it works out in a bigger game.
  7. Re: stats cap does number_format($number) work? :\
  8. Re: Hmm this section needs something Yeah, my comments are usually huge in production, when i upload though, I summarize it :P, and I use salt plus a custom hashing function usually :P Geez dont quote me on that I wrote it like as I went when I was bored one night :P
  9. Re: Converting V1 mods to V2 I lol'd ^
  10. Re: Refresh Blocker Session variable and a URL variable
  11. MySQL 1. Use the COUNT modifier to check the table headers, and return the number of entries, than loading the whole info into an array and using mysql_num_rows() 2. Always use MySQL to do simple maths, such as totals, averages. It has built in functions just for this 3. Never load more than you need. If you only need the users name, don't do SELECT * FROM users, just select the name 4. Don't cram your table with useless columns. Having two columns for energy isn't necessary. Use one, have it as '50:100' (50% energy), and use PHP's explode() function to get the two values 5. If, like step 4, you use this a lot, use MySQL's SUBSTRING_INDEX function to do things such as finding users with only 40 energy 6. Reduce your server load by optimizing your queries, and save money on that dedicated server! 7. ALWAYS construct your own database class, and time your queries. You can use microtime() before and after your mysql_query() function, to see how long the query took. Try and record as much info as possible to be able to optimize further 8. As I said, ALWAYS check ALL input into the database 9. Don't use values such as 5 if you're checking something like days old, use the timestamp recorded when they sign up to compare it to the current time, and save another column 10. Don't store everything in the database. Some things, like IP bans can be stored in files, same as other things like if the game is shut down. Doing this reduces the amount of queries to the MySQL server, even if they aren't logged in. Similarly, you can store announcements etc in a text file, saving db calls on the login pages. And now i'll go die for bbcode abuse
  12. Some fun! 1. Use ctype_digit() to validate your input when you need to make sure they only enter numbers 2. Always create custom functions for things that are repeated often, such as displaying or calculating things 3. Always check any input in the database first, NEVER insert any unchecked data 4. NEVER allow users to externally host their pictures. Even checking the extension of the file does nothing, use file_get_contents and preg_match() to ensure that the picture isn't disguised as a PHP file 5. NEVER allow users to use html anywhere. There's about ten different ways to insert javascript via html, which isn't too fun if they know what they're doing. 6. Decide whether to whitelist of blacklist: a whitelist checks any input, and if it isn't in a pre-defined array (or however you decided to check it), it refuses. A blacklist simple refuses certain pre-defined words, and accepts all others. 7. NEVER totally trust any form data, even radio fields, checkboxes, or even hidden fields. They can all be tampered with 8. Try to stay away from using the md5 hash. Its huge use has lead to massive databases of all possible combinations. Develop your own function, accepts a string, uses various string functions (substr, str_repeat, str_shuffle) and other algorithms (sha1) or multiple. 9. NEVER use crons that run every single minute. Nearly every function that uses a cron can be replaced entirely by utilizing and calculating different timestamps. I completely removed the energy refill, stamina refill, jail/hosp times, days old etc crons from my game by converting. 10. Comment your code! If you can't go back in 2 weeks and instantly know what piece of code does what, you've failed. Comments are all to you, so don't be against writing notes, having 14-line comment blocks or commenting even the smallest things
  13. Decepti0n

    speedtest

    Re: speedtest wooo
  14. Re: i better warn all game owners here oh...because i was gonna just hand my cpanel over to random strangers :|
  15. Re: Crystal / Bank Transfer Bug. whats the transfer page?
  16. Re: Whats your opinion? anyone can make a game from scratch :D its not too hard
  17. Re: Java well, i too it as 'javascripts' :P hell if i know anything about java
  18. Re: Java notepad
  19. Re: !!**Whore House Mod FREE**!! i just ignore the force :| its pointless
  20. Re: sms billing lol i looked into it before, one company said it was around $1k a month just to use the service
  21. Re: Converting V1 mods to V2 you use frontpage of course!
  22. Re: !!**Whore House Mod FREE**!! what's the bet it'd be used more if you had pictures :p
  23. Re: help with re-arranging header.php that was one too xD
  24. Re: help with re-arranging header.php i tried frontpage years ago, after the mountains of useless tags and folders it added, i moved away from it
  25. Re: right hand side main menu why do you guess at random things to make it work :| aligning it to the right is basic html, and since (i think) its tabled, you'll have to move the entire content into the left table cell, and the menu to the right. and how can you vertically align something to the right?
×
×
  • Create New...