Jump to content

Arty Ziff

Members
  • Posts

    67
  • Joined

  • Last visited

Everything posted by Arty Ziff

  1. This could be an Apache question, but maybe not... I have several directories where stuff is served up with an SSL conx. One contains a bunch of user authentication scripts used on pages that need to be "logged in" to access. Another contains pages for "logged in" users. I've been careful such that pages for "logged in" users are not served anything from a non SSL conx. Chrome tells me that this is so, but FF and ID tell me: "contains both secure and non-secure items" What's the best way to track this down, find out what content is not being served up from a secure conx?
  2. Arty Ziff

    Cats

    How many people here have had a CAT for MORE THAN 3 years? 5 Years? 10? I have two cats, one is 12, one 22.
  3. Man, I downloaded one a few years ago, but can't remember where... Keep searching.
  4. Access DB - http://databases.about.com/od/access/a/zipcodedatabase.htm Open Source DB - http://sourceforge.net/projects/zips/
  5. An unlikely thing. The kind of interaction you describe happens in the browser, while php happens on the server. There are a number of sophisticated server-side image manipulation packages, but I don't think you're going to get drawing with a mouse without a *lot* of other technology!
  6. Yes... When using MONTH rather than DAY, MySQL knows the length of the months? Or is it some default segment of time such as 30 days?
  7. What is the best way to add a specific number of DAYS to a DATETIME value? Can it be done with MONTHS as well? Here's what I've come up with (is there a better way?):
  8. I'm curious, what is it that Archive.org does / does not do, that is problematic for you?
  9. I'm not sure where to put this... Ajax? JS? Suppose you have a form input, and the script that handles that input might (for whatever reason - it does a lot of things of the server has a heavy load...) take longer than instantaneous to process, and so the following page load takes longer than instantaneous... Of course you do not want to user plinking away at reload or enter, it could cause issues. I see that many sites (think ecommerce type apps) immediately send you to some page - "Working..." with an animated graphic. The plane ticket sites do this while they search for your price matrix. Am I right to assume that the form input is done via Ajax, and between the submission and when the Ajax routine returns something, some JS puts up some sort of modal?
  10. Of course. And this benefits JS because a smaller file makes it to the browser quicker. So you are telling me there is no benefit in server side scripts by removing white space (other than less storage space used)? Anyway, I'm really more interested in my original question about elseif. Nevermind...
  11. Well, white space removal is one of the techniques that JS compactors use. I assume it makes it run faster. Although obviously running code on the server is different than running code in the browser... Anyway thanks for your comments!
  12. Please note that in my example, I *neglected* to include the if conditions for the elseif / else if, but of course it was an oversight... Now, I guess the reason I ask about execution times is that if one verses the other executed some division of milliseconds faster because for example it required less interpretation by PHP, for a very large application or one that got a lot hits, it could become a matter of efficiency to eliminate all the millisecond slower methods / structures / functions... After all, one wants to be wickedly fast, right? Even things like if(strlen(trim($quickdesc))==0){$error_flag=1;$error_text[9]="<br />Please enter a Short Description.";}? Can you use such techniques to compact your PHP code? Would it load (and thus "run") faster from the user perspective?
  13. This is going to sound perhaps a little pointless, but... Is there any difference between: And... Note the elseif verse else if. Both work, is there a difference in execution time? Is one considered more "proper" than the other?
  14. Roll your own, or install an existing cart? Seriously, consider *not* writing your own. Many code / security pitfalls. I've used both osCommerce and Zen Cart. osCommerce is, i my opinion, a rat's nest. I like Zen Cart, it was easy to set up and easy to admin. With Joomla, I've used VirtuMart and was happy with it. Of course there are many simpler and more complex, it really all depends on what you need to do.
  15. I second WordPress. It's mature code, has a good rep, the admin UI is great, and of course endless plug-ins/mods.
  16. Keeping in mind that I'm doing server side input validations as well (PHP of course), I'm interested in recommendations for JS form / input validation libraries that people here like. I'm aware that for basic validation, it's not a mountain to write my one, and for some specialized input fields, I've done that. But I'm not a big fan of "reinventing the wheel", especially if there are some "mature" libraries already out there... Thanks!
  17. I use something like this to resize dynamically images. Is there a way to wrap this in a function and class that when called returns the image object? <? $src_img = imagecreatefromjpeg('./path/to/image.jpg'); $srcsize = getimagesize('./path/to/image.jpg'); $dest_x = 200; $dest_y = (200 / $srcsize[0]) * $srcsize[1]; $dst_img = imagecreatetruecolor($dest_x, $dest_y); imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_x, $dest_y, $srcsize[0], $srcsize[1]); header("content-type: image/jpeg"); imagejpeg($dst_img); imagedestroy($src_img); imagedestroy($dst_img); ?> For exacmple, right now I could use it to dynamically resize images by having it inline in the HTML: <img src="./image_script.php?img=image_name.jpg"> But if it could be wrapped in a class / function, it could be done without exposing the script to possible exploitation maybe... I'd like to avoid resizing the image and dumping it in a temp directory. That could get huge.
×
×
  • 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.