Jump to content
MakeWebGames

TheMasterGeneral

Members
  • Posts

    182
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by TheMasterGeneral

  1. He messaged me on Skype. I *think* we've got it squared away.
  2. Personally, I loved my Pocket PC that ran on Windows Mobile 5. Ended up flashing WinMo6 to it just so I could use the Facebook app. Phone bit the dust a couple years ago, then I adopted a Samsung SM765C for my daily driver (Android).
  3. Do a check to make sure the spouse has the house? I don't have the specific code and I haven't messed with MCC in a long while, but I'd assume that it'd involve a similar check when the single user buys an estate.
      • 1
      • Like
  4. $query=$db->query("bleh"); while ($result=$db->fetch_row($query)) { //herp the derp }   1) Have you tried adding "LIMIT 1" to the end of the query? 2) Are you only selecting one data row? If so, I think you'd want fetch_single rather than fetch_row.
  5. Its quite... chaotic now. Pretty hard to glance over the "Latest Topics" list to see if someone needs help or whatever. ._. Edit: And the "Working..." when you post/reply. Its stuck like this until you F5. Kinda annoying.
  6. Sorry, allow me to elaborate. I had this instance setup so that the user gets 100 "searches" per day. Database holds the value of 100. Each iteration through, it subtracts 1 from the "search" variable from both the database and the loop. Once the loop hits 0, it finishes. Yes, it will echo out each output.
  7. <?php while ($searchleft > 0) { $db->query("UPDATE `users` SET `searched` = `searched` - 1, `autohex` = `autohex` - 1 WHERE `userid` = $userid"); $searchleft=($searchleft-1); $chance = mt_rand(1,100); if ($chance <= 10) { //Queries, print, etc. } //continue on and on... }   That's the basics of it.
  8. In PHPMyAdmin, check the "Check All" box at the bottom of the table listing, then click the dropdown next to it and click empty. This'll keep the table setup, but just clear the information stored in the tables.
  9. If its for permission to use or whatever, go right on ahead. No royalties owed to me. If its for something else, send me a PM and we'll talk. :D
  10. Include the Javascript in the endpage(); function in the header file. Just make sure you end each file with $h->endpage();
  11. Weirdly enough, it works in a single file (test.php) However, in a live (in-dev) application, it does not. I find this quite strange. Code, if you need it. That's exactly how it is handled right now in my application. function isImage($url = null) { $url = filter_var($url, FILTER_VALIDATE_URL) ? filter_var($url, FILTER_SANITIZE_URL) : null; if(empty($url)) return false; $params = ['http' => ['method' => 'HEAD']]; $ctx = stream_context_create($params); $fp = @fopen($url, 'rb', false, $ctx) or false; if(!$fp) return false; // Problem with url $meta = stream_get_meta_data($fp); if ($meta === false) { fclose($fp); return false; // Problem reading data from url } $wrapper_data = $meta['wrapper_data']; if(is_array($wrapper_data)) foreach(array_keys($wrapper_data) as $hh) if (substr($wrapper_data[$hh], 0, 19) == "Content-Type: image") { fclose($fp); return true; } fclose($fp); return false; }
  12. The issue appears to only happen when the URL itself does not return a "Success" header. (404, 403, etc.) When I input "http://somerandomwebsite.com/fake/url/image/watever.png" it failed on the fopen. "PHP Warning: fopen(http://somerandomwebsite.com/fake/url/image/watever.png): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden (2) Perhaps test for the returned header/response?
  13. Don't mind him, [uSER=65371]sniko[/uSER], he'll just block you if you try addressing him.
  14. Would probably help to post a budget. I have a feeling that #3 is going to run you the most time, effort (and assumed cash) out of all that. Just my $0.02
  15. *Sigh* See Pigeon's post above:   Of course. I asked you a simple diagnostic question to see what you have done. Its the same process I do when I troubleshoot my code, and when I help others troubleshoot theirs. I was going to help, even if I'm not a JS expert, but you'll have to find someone else.
  16. What have you done to attempt to make it work? I'm pretty sure I'm not the only one who doesn't like people who "copy and paste, didn't work, ask for help!"
  17. Is that a Shutterstock watermark? FYI: I don't have the greatest net, and it took me 20 seconds just to load the gif entirely. I'd get rid of it.
  18. Oh, my apologies. Made a sleepy coder derp. Replace the $IDs line with: $IDs=array(18,16,15,13,3,4,2);
  19. If I understood correctly, yes. Just for confirmation: $ArrayToTest=$db->fetch_array($query); $IDs=('id1','id2','etc'); if (in_array($ArrayToTest,$IDs)) { //yeah }
  20. One moment... $FieldToTest=$Array; //The array to test $WhatToTestFor=array('foo','bar','etc'); //What to test for if (in_array($FieldToTest,$WhatToTestFor)) { //success }
  21. I know it worked right off the bat in stock MCCraps, and I'm fairly confident in saying that a file rename wouldn't break a script like that. (The file name changed, not the logic, right?) See if you gave $odata['username'] another value somewhere to cause it to derp.
  22. Their name isn't numbers, is it?
  23. $Time=time(); $DeleteTime=$Time-86400; //86400 is 24 hours $db->query("DELETE FROM `table` WHERE `timestamp` <= {$DeleteTime}");  
  24. require('globals.php'); $endtime=140000000; $starttime=130000000; $currenttime=time(); if ($endtime < $currenttime) { //nope }
×
×
  • Create New...