Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. PHP already has plenty of built-in classes have a look at http://php.net/manual/en/book.spl.php
  2. Or class MyPersistingClass { public function __construct() { $this->restoreState(); } public function __destruct() { $this->saveState(); } private function saveState() { //add your fields to the $_SESSION variable //$_SESSION[get_class($this)] = array(..); } private function restoreState() { //retrieve values from the $_SESSION variable's into your fields } } It's generally not a good idea to store objects in sessions because: 1. Your class definition has to be present before session_start() is called 2. It takes longer for session_start() to rebuild the $_SESSION array using objects There has been a discussion on this forums before on this topic and the suggested approach is storing array's.
  3. Google doesn't like hidden div's a better approach may be: body { background-image: url(image1.jpg); background-image: url(image2.jpg); background-image: none; }
  4. Are you sure? http://dev.mysql.com/doc/refman/5.5/en/non-typed-operators.html
  5. If I only got that advice sooner..
  6. First, it's: class="s-item1 active" and not class="s-item1" class="active" Second, what does $class contain? How does it get a value? AJAX?
  7. You can use love2hate's solution to download the torrent to your server. You'll need a proper understanding of the torrent-protocol to actually perform the downloading. The specification can be found on bittorrent http://bittorrent.org/beps/bep_0003.html
  8. https://www.ups.com/upsdeveloperkit/requestaccesskey?loc=en_US (click number 5. Request Access Key)
  9. Exactly, why pay if you already have great FREE sources like phpfreaks.com and stackoverflow.com which both share a good deal of experts providing advice for FREE so basically people would use your service for an extra buck but I doubt someone would be willing to pay because both phpfreaks.com and stackoverflow.com have a very high response rate. Basically everyone here just screws your plan Your market would then exist out of the people that do not get an answer here and these commonly are: "I have a website and I now want people be able to register & login, could you please show me how and write some code? I'm a newbie THANX SO MUCH"
  10. You would use the _referenceMap field for that. class Product extends Zend_Db_Table { protected $_dependentTables = array('ProductLocale'); } class ProductLocale extends Zend_Db_Table { protected $_referenceMap = array( 'Product' => array( 'columns' => 'productId', 'refColumns' => 'id', 'refTableClass' => 'Product' ) ); } For more information see http://framework.zend.com/manual/en/zend.db.table.relationships.html
  11. Signup for Google Webmaster it allows you to create a XML sitemap using the sitemap protocol.
  12. This only partly solves the problem. For example, what if 2 persons give a correct solution? Different maybe but correct either way, and how will the client know which one is better? Plus, if you can't see the answers someone else gave, you also don't know if he already got an answer or not. Answering an already answered question will make you lose money. The client is not online 24/7. Which leads to the next problem, not all clients live in the same timezone as you do which means that if most clients live in a different timezone you are already excluded as by the time you will be able to respond to any problem they are already solved. Which will give your client a feeling of guilt because what if he selected the wrong one as the correct answer? For example, someone answers the question you mark it as solved but just before this act another user posted his answer which after reading is the better answer? Oeps and no way to take back those .25 the client has the best answer but pays the wrong one. And what should be the procedure when the wrong one was credited? Take back those .25? You are not only dealing with a complex idea but also an idea that involves moral feelings. Some may believe they gave the correct answer even if a mod disapproved leading to an angry customer. Yes, even for such small amount of money.
  13. There have been already a serious few that I liked a lot, but if there is nothing to critique why bother posting?
  14. How would someone in the above code inject auth_type?
  15. I can't find the topic right now but this has been discussed before. The main question that comes up is how do you decide who gets paid? Because what if multiple people give a correct answer? Or what if a user elaborates on a solution and gets chosen as correct answer which would mean he actually stole 0.25 because he would not be able to elaborate if that user did not give that answer. As you can see this becomes really complex
  16. Which browser? Chrome has the tendency to crash when you load Flash (more particularly if you open a new tab while in the previous Flash is loading) Dutch: http://tweakers.net/nieuws/65423/flash-bug-die-browser-laat-crashen-is-nog-niet-opgelost.html
  17. So you were thinking of your left foot? Doesn't this actually prove Neil's theory as we are now even discussing it Darn Psychology. IT's IN MY HEAD .. IT's IN MY HEAD .. GREEN CATS EVERYWHERE .. MAKE THEM STOOOPPPP
  18. http://alexking.org/blog/2003/06/02/inserting-at-the-cursor-using-javascript
  19. I heard it would only cost you 2500 dollars to hire a hitman. That should solve it, for now. PS Yeah I am all about problem resolution
  20. No. That makes sure that no single error is reported meaning that altough your application does not function it also does not show any errors in your error log the correct setting is: error_reporting(E_ALL); ini_set('display_errors', 1);//1=development, 0=production You also shouldn't set these in your PHP script but in your php.ini. On your development machine display_errors = On and on your production machine display_errors = Off
  21. 4. Make sure to md5 passwords or any vital information.. if you store it into db. make that sha1 and also include a salt. As md5 passwords can be "guessed" using a rainbow table. 5. Use captcha, it prevents spammers. I recommend reCaptcha
  22. You like? You like? Gotta' love it
  23. OMGZOR!!1! L337 OWNZOR!!1! w00t ... wait .. what ?? :-\
×
×
  • 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.