Jump to content

JeremyCanada26

Members
  • Posts

    55
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

JeremyCanada26's Achievements

Member

Member (2/5)

0

Reputation

  1. I want to link to a movie but I'd like to create an onrollover slideshow effect so that when the image that links to the movie is mouseover, it slowly slideshows each of the 4 images that I specify.
  2. I'd like to know if there is a way to detect a head instead of the more specifc face. Maybe cut out the rest and be left with a transparent .png of just the head, that would be cool if it's possible.
  3. I'm curious for a web app game that gets 5,000 users monthly, about how many of those users actually attempt to hack the game in some way? I know it's kind of strange to talk about hacker numbers, but maybe someone out there knows.
  4. function checkIfSuppliedImageDataIsValid() { //first, check that the byte_array isset, then make sure it's not empty, then make sure it contains valid image data if(isset($this->byte_array) && !empty($this->byte_array) && imagecreatefromstring($this->byte_array)) { //passed in byte array is good return true; } else { //missing or invalid return false; } } The above function is what i'm settling for, although I also see there might be another way to do it manually but I'm not technical enough to know how. Taken from the png RFC page, http://www.faqs.org/rfcs/rfc2083.html, section, 3.1. PNG file signature
  5. Thanks fugix, yes that empty() function is awesome. I wonder if it's possible to check if the $byte_array contains valid PNG data?
  6. I have two questions regarding $byte_array. 1. Is there a general way to check if a $byte_array contains any data? 2. Is there a way to confirm if the $byte_array contains an actual PNG image?
  7. I'm trying to regex match a search phrase that can be any letter or number and be either one word or more than one word, also between 2 and 100 in length. function checkSearchPhrase() { if(isset($_POST['sp'])) { //matches any single word or more if(preg_match("/^[A-Za-z0-9]{1,100}$/", $_POST['sp']) == 1) { return trim($_POST['sp']); } else { return false; } } else { return false; } }
  8. Does anyone know how I can convert linux epoch number such as 1292878800 to the UTC format? Ricky
  9. i still haven't figured out a good solution on how to factor in the value of -5 or -6 into the mix yet
  10. Is there any way for me to do this using the -6 or -5 value that I already have along with the users data? Ricky
  11. I'm interested to know how other people keep track of time and also how they display time correctly back to the users. I'm using a third party API that I can tie into that actually gives me the userID of a user, their full name and the timezone for that user. After checking a few users data, this is an example data of what I'm working with. userID: 234213412 first_name: foo last_name: bar timezone: -6 Basically when a user visits my web app, I create a new account for them and store the above data. Currently, I'm just fetching the result from time() and converting it into MySQL DateTime format and storing that into my database. //get the current time as an integer $php_timestamp = time(); //formats the time according to MySQL DateTime type $this->mysql_formatted_time = date('Y-m-d H:i:s', $php_timestamp); I would think the current way that I'm doing this is not very good because there is a possibility that I could introduce load balancing servers into the mix and they might not be located in the same region. Also, I would have no idea how to factor the time and modify it according to the timezone value.(in my above example, -6) Can anyone help me decide what method I should use to keep all of my servers timestamps in sync and how to display the time to the end user so that it looks correct to them?
  12. I'm using amazon web services(amazon ec2). So my firewall is on their end. They do have an API available for add/removing IPs though so that's good.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.