Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. You can "hide" it by doing rewriting instead of redirecting. And to match only that domain you need RewriteCond. RewriteCond %{HTTP_HOST} =www.domain.com RewriteRule ^/?$ /startpage [L]
  2. Well I guess you'll just have to give up, huh.
  3. Then it's time to stop searching for terms and start stepping through code. Think of it less like searching for where the output happens but at what point in the execution it might. Like I said before, the fact that it's outputted immediately after that HTML comment should be a good clue.
  4. Seems you missed half of that quote: Regardless of how well the code works on other servers, it doesn't work on one of them. So you should be trying to get error messages to find out why.
  5. How the heck would we know? I would guess that "free-shipping-australia-wide" comes from a database, but "Shipping Class" is probably something you can search for. Also note that it's outputted right after a comment.
  6. The request URI will be just a slash, so RedirectMatch ^/$ /startpage
  7. You can't do that directly. Rewriting works by taking pieces of the URL and rearranging them into something you can use with your PHP script. That means all you have to work with (in your example) is "this-is-my-title". You can't conjure up the id=7 from that. However your PHP script can. If you must use "/this-is-my-title" then the simplest course of action is to modify your post.php so that it can take a title as well as/instead of an ID number. /post.php?title=this-is-my-title
  8. isset ternary ?: operator "If the value1 is set in $_GET (ie, the URL) and it has a numeric value above zero then use it, otherwise use 20."
  9. No, PHP can't do it because PHP runs on the server. It would have to be Javascript. Which can't do it either so still no. You probably mean Javascript for the same reasons as above, except this time the answer is yes. What do you want to do?
  10. As expected. What is the HTML for the nonotifications thing? Maybe it's a DIV or SPAN?
  11. The problem is YAHOO.util.Dom.get('nonotifications') isn't locating an object. Go to that page and open up a Javascript console (which Chrome, Firefox, and recent IE can do natively). Then execute YAHOO.util.Dom.get('nonotifications')What does it return? And for the record, what is the HTML for that nonotifications thing?
  12. var notifs = YAHOO.util.Dom.get('nonotifications');"nonotifications". Is that the actual name of whatever the thing is? Not just "notifications"?
  13. The proper negation of the expression X || Y is !X && !Y. Note the &&. Consider "is this animal a cat or dog?" when you have a cat. Yes, it is a cat or dog. The opposite is "is this animal neither a cat nor dog?" but if you express that as "(animal isn't a cat) or (animal isn't a dog)" then you'll get the wrong results because a cat is not, in fact, a dog. You have to say "the animal isn't a cat and the animal isn't a dog".
  14. Copy/paste and change the $server. Oh, and you should be closing the $game connection every time (if it did connect).
  15. Negate that expression: redirect if the UA doesn't match.
  16. Why even remove it to begin with? It's supposed to be there. You see it in your output, and that's presumably why you're removing it, because you're outputting XML in an HTML document. You're supposed to take the XML they return and display it the way you want, and removing the ]]>s will only screw that up.
  17. Cookies are editable so they're not inherently safe, but you can make them safer if you store the data encrypted (as in a real encryption that can only happen and be decrypted on your server using cryptographically secure algorithms and keys and all that). Which is a hassle. If you see a site storing your password in a cookie then you should stop using that site because they're doing something really insecure.
  18. range and shuffle
  19. http://stackoverflow.com/questions/3203100/convert-php-site-to-exe-desktop-app http://stackoverflow.com/questions/9046675/convert-a-php-script-into-a-stand-alone-windows-executable http://stackoverflow.com/questions/3671664/deploy-web-application-as-a-standalone-executable Should be enough to start with.
  20. Depends what you mean by "executable". Something someone can download to their computer and run any time? Like off a USB drive or CD/DVD?
  21. That looks like JSON. json_decode
  22. They're checking for a vulnerability if you have PHP installed as a CGI program. Short version is that you could pass command-line options to the PHP interpreter, and those options there would try to execute that one .txt file. Which is fortunately not malicious but would let them know your server was vulnerable.
  23. You have to put quotes around HTML attribute values. Like you did for the span's id and the text box's type and name.
  24. Modify the query so that it only retrieves one page of results at a time. Use a LIMIT like SELECT ... LIMIT 100, 20which will get 20 results starting at the 101st. If you were showing 20 per page and wanted to get page 4 you would do offset = 20 * (page - 1) = 60 LIMIT 60, 20
  25. public function attributes() { return get_object_vars($this); }is also going to include the private $db you have defined in the class. You don't want it. public function attributes() { return array( "id" => $this->id, "username" => $this->username, "password" => $this->password, "first_name" => $this->first_name, "last_name" => $this->last_name ); }
×
×
  • 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.