Jump to content

cpd

Members
  • Content Count

    883
  • Joined

  • Last visited

  • Days Won

    5

cpd last won the day on June 7 2013

cpd had the most liked content!

Community Reputation

36 Good

About cpd

  • Rank
    ¬_¬
  • Birthday 04/24/1992

Profile Information

  • Gender
    Male
  • Location
    London, UK
  1. I get the impression the question asks how to display content within 30 seconds of some action as opposed to forcing a redirect after 30 seconds? Do you even need to redirect after 30 seconds? Your posts reflect both at the moment.
  2. Validation isn't specific to php, it should be applied whenever user input is accepted. You're essentially verifying the user has entered valid content as opposed to content that could harm your service. Search "defensive code" or "data validation" in google, you'll get a load of stuff.
  3. Your better off using Python as it has a variety of useful libraries such as nupmpy and scikit. You'll want to apply a kernel to the image such as a 3x3 kernel with -1 along the top row and 1 along the bottom. This will highlight horizontal edges and rotating the kernel 90 degrees will yield vertical edges. Combining the two will yield edge detection. The topic gets increasingly complex and to be totally honest, is probably unnecessary for your purpose. If you're always scanning cards of the same size, why not predefine the area and cut that area out?
  4. Everyone should hate it, its just a really big class - pile of (insert very foul word). I'm extremely fond of laravel. Put together such that its relatively intuitive and provides some extremely useful features. Its also quite a mature framework which is generally a good thing.
  5. Try programming a private messenger app. It would come in handy.
  6. Have an array containing each time zone. Loop through it creating DateTime objects and testing if they have a 12 hour hand. Once you've found the timezone break out and display the zone. Using http://us3.php.net/manual/en/datetimezone.getlocation.php you an get a friendlier name as well.
  7. By putting the HTML in your array you're limiting yourself. HTML is abouoti presentation, not business logic, therefore you shouldn't really have it in the php as you've done.
  8. You can route requests for image files to a php script, do whatever you want, then just output the image from php by setting the relevant content type. Htaccess can be used to route requests for the image. This solution only works if you're hosting the images, however.
  9. I think you're asking if there's a cleaner solution as opposed to can you use implode. Personally, I'd store just the URLs and loop with a foreach statement to print them. $dirs = array_diff(scandir($dirlocation), array('..', '.')); array_walk($dirs, function(&$v, $k, $d) { $v = $d . $v; }, $dirlocation); // HTML section <?php foreach($dirs as $url) : ?> // IMG tag with SRC = $url <?php endforeach; ?>
  10. If you're keeping the mapping you can just do $data = $_POST; $data['pswrd1'] = sha1($_POST['pswrd1']); The error is due to wrapping the password variable in your sha1 call with apostrophes. You don't need to as shown above.
  11. Names taken already. Perhaps CPD, if not then ChrisDoc
×
×
  • 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.