Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


cpd last won the day on June 7 2013

cpd had the most liked content!

About cpd

  • Birthday 04/24/1992

Profile Information

  • Gender
  • Location
    London, UK

cpd's Achievements


Member (2/5)



  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. Without your PHP we can't assist - a full dump wont help either so narrow it down to 10-20 lines based on the error you receive.
  12. @mtchisepo - its likely a mistake in his post, not actually part of his code.
  13. http://symfony.com/get-started Awesome place to start.
  14. That's the function I couldn't remember and ended up omitting from my post. I'd definitely recommend this over most solutions.
  15. What does var_dump($result->OCRWSResponse->ocrText->ArrayOfString); give?
  • 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.