Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zane

  1. AJAX == Asynchronous Javscript and XML
  2. Zane

    Back online.

    The IRC server is back online again, thanks to thorpe (trq) for taking the time to restart the server for us.
  3. Zane

    Back online.

    The CPU IO rate went wild. Such that the system went idle. It shut everything off But with a squat and a cough The website re-birthed after awhile.
  4. Zane

    Back online.

    I wish i had an answer for IRC. I can't access that part. The hard drive ate too many badgers and became constipated.
  5. Agreed. PHP.net has the only manual you will ever need for PHP. If you're looking for tutorials or code snippets then Google is your friend.
  6. And we're back online... again! It may have taken 3-4 days, but we're back.
  7. There is no PHP 5.10 nor a PHP 5.11 These are the only current versions 5.6.5 5.5.21 5.4.37
  8. Why do you want to use regex when you could just as easily use PHP's plethora of string functions $filename = "some_thing_that.has.dots.in.the_filename.jpeg"; $last_period = strrpos($filename, '.'); if($last_period !== false) $extension = substr($filename, $last_period+1); else echo "No extension found"; And.. there is also a specific function that will grab the extension in one line of code. $extension = pathinfo($filename)['extension'];
  9. yum upgrade Update everything, then sudo yum install php mysql php-mysql php and mysql should be the more current one. You'll know before it installs, when it asks you if you would like to continue installing of what is reviewed above the question. If it doesn't say 5.6, then it's an older version, so you may have to search for the package. Either way, when it's all said an done, either restart apache, php and mysql, or just restart the entire server. I'm by no means a linux expert, but I've picked up bits and pieces along the way, I'm running Centos as well.
  10. and there is most likely, undoubtedly a lot of money involved.
  11. There are also HEREDOCs echo <<<JAVASCRIPTCODE <script type="text/javascript"> var banner = (function(){ $('.banner').unslider({ speed: 1000, // The speed to animate each slide (in milliseconds) delay: 999000, // The delay between slide animations (in milliseconds) complete: function() {}, // A function that gets called after every slide animation keys: false, // Enable keyboard (left, right) arrow shortcuts dots: false, // Display dot navigation fluid: true // Support responsive design. May break non-responsive designs }); $( '#nav li:has(ul)' ).doubleTapToGo(); }); </script> JAVASCRIPTCODE; Unless you're addicted to IDE font formatting, this is something I would do. More times than not though, it's a lot more tidier and organized to put the scripts in external files and include them, as someone already suggested.
  12. So it all boils down to preference and convenience then. Nothing extra-efficient in using it. Here, though, is an example of a usage of those semantics in a very aggravating way. <?php /** * Product list template * * @see Mage_Catalog_Block_Product_List */ ?> <?php $_productCollection=$this->getLoadedProductCollection(); $_helper = $this->helper('catalog/output'); ?> <?php if(!$_productCollection->count()): ?> <p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p> <?php else: ?> <div class="category-products"> <?php echo $this->getToolbarHtml() ?> <?php // List mode ?> <?php if($this->getMode()!='grid'): ?> <?php $_iterator = 0; ?> <ol class="products-list" id="products-list"> This is just a small snippet from Magento's files.
  13. Not to say that this occurs in every php software out there, but I far too occasionally notice that the application is written with scattered php open and close tags, for instance <?php if(true) ?> <?php { ?> Blah blah blah, because it's true <?php } else { ?> because it's not true <?php } ?> To me, it is extremely irritating. Regardless, I see a lot of open source software written this way and I can't help but think that there must be some underlying reason for it. Magento, for example, is written exactly in this manner. The templates are infested with these opened and closed php snippets. Obscurity is not security so I'm ruling security reasons out. Maybe it is more efficient? -- But I couldn't understand why, if so. It seems like that would put more of a drag on the system itself causing php to start and stop parsing continually and excessively, then again, I'm no expert in the field of memory consumption and other operating system complexities. Honestly, in my opinion, it is stupid. i would never write a program that way.. HEREDOCs are much more useful and eye pleasing than that awful <?php { ?> I had the misfortune a few months ago when I purchased an invoicing/customer maintenance system that I didn't know was written for PHP 5.2 or something lower, one that allowed short tags; and thus short tags were used in the same manner as I've described. Is this just plain disorganization or is there some deep-seated inner lining advantage that I'm not aware of?
  14. If you sell a good or service it must be taxed, at least in the US it has to be. Therefore buying a bunch of data [quota] and then selling it would be not much different from buying a bunch of cellphones and selling them. All I can tell you is that the data [quota] that you are selling better be bought at a wholesale price first or you're doing it all wrong. Even if you do manage to buy a ton of wholesale data to sell. the usage of that data will still be subject to the policies put forth by the providers of such data[quota]
  15. where is the php image processing script relative to the directory you're trying to upload to?
  16. If pictures is a directory in your webroot, as your example illustrates, then you can use /pictures Because: / is the root folder (Webroot in your case) ./ is the current folder ../ is the parent folder Also, if you do not put a slash, it is the same as ./ For example, pictures will load from the current directory
  17. It is possible indeed. Create two columns in your user table: one for last attempt time, and another for fail count. When a user attempts to login perform the following logic. Check to see if the last attempt time is greater than 48 hours, if not, check the fail count for >= 5. If the logic passes and does show that there is no "lock", then reset fail count to 0. Then continue with your successful login script.
  18. oh yeah.. you're right 600M... ludicrous.
  19. So trim it down for us. Show us the relevant information.
  20. What do you mean it doesn't work?
  21. what is the output of your print_r statement? That would help
  22. Was just pointing out that it isn't uncommon for websites to block users with Javascript disabled. I provided the healthcare site because it is a government website; a site that should be accessible by all, on anything. Especially for $6M.
  23. There are also several plugins that more people are aware of than ... or disabling Javascript completely rather. I explained everything about how a developer can utilize the hundreds of different event handlers to achieve near optimal activity tracking. I tend to use extremities, hypothetical situations, and analogies to explain myself. While they indeed sound exaggerated and sometime pejorative of certain practices, I'm not the browser police. I'll agree and digress... catering to those with Javascript disabled isn't a bad idea at all, but is it worth all of that effort just to appease a very small percentage of users/sessions? Next you're probably going to bring the idea of catering to XP users, IE5.5 users, etcetera. I'm in no way advocating that people keep Javascript enabled. All that I'm implying is that, well, they're missing out; especially on legitimate websites. I DID mention that the events can be used as a marketing tool, as well as a decent way to phish. Ostracizing those unable to use JavaScript isn't exactly a new concept either. Just look at http://healthcare.gov This doesn't suggest that the programmers were drunk either. Although it was contracted out to a Canadian firm, so you never know. I would like to see your sources on why a developer would be drunk if he/she decided to ostracize JavaScript disablers. Is this a psychological detriment that you read about in Psych 101? Every application will have it's faults, and that's why you're here, to point out all the discrepancies, fallacies, faults and flaws with someone's idea or project in a tyrannical and demeaning tone.
  24. So problem solved? AdFender was the culprit?
  25. Why would you hope so? You looking to take some advantage? I know my rights!
×
×
  • 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.