Jump to content

requinix

Administrators
  • Posts

    15,227
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. Well that would be the player itself changing the value, wouldn't it? What player?
  2. The underlying select(3) will only return read sockets if there's something to read. Since with HTTP the client is the first to send data, it would block until the remote server gave up waiting and closed the connection. So yes, you have to select on the write stream because that's what you need to use first. Once you're done writing then you select on the read stream.
  3. I personally don't like using SimpleXML just to convert the XML into an array. For one you lose out on xpath(). What do you need to do with the XML?
  4. Actually any variable can be passed by reference if the function signature specifies it. Like stream_select()s does. @Pannekoek: I know what stream_select() does. I meant that if your code does not produce the results you expect, what results does it produce?
  5. So that's what you expect. What does it actually do?
  6. 1. SHA1 is not encryption. It is hashing. 2. SHA1 alone is not "strong".
  7. Yes. Unless I'm missing something those two should behave exactly the same. Except it's probably all moot anyways. $id_list = implode(',', $ids);
  8. Are you modifying existing WordPress code or writing something for yourself?
  9. I knew I should have checked the manual first.
  10. Possibly. The first one allows you to specify a data type manually while the second uses whatever type the variables are*. The first one provides a limit on string lengths but the second does not. To match that, $sth->execute(array(':calories' => (int)$calories, ':colour' => substr((string)$colour, 0, 12))); * Note that values from GET and POST are strings!
  11. Get rid of the [L]. But are you sure you even need this? If /folder/ actually is a folder and you have index.php listed as a DirectoryIndex then Apache should do that rewriting automatically.
  12. I think it's a known and reported bug that print_r() doesn't show everything, and especially namespaced stuff. Saw it last week or so. If it's there in the XML then you can access it. $xml->path->to->parent->children("media", true)->thumbnail
  13. URL won't break? How would it break in the first place?
  14. You're not listening to me. One AJAX request with the new data and the response includes the ID. The same request. Not another request. No more AJAX. It's over. Stop it. Don't .load() or .get() or .post() anything else.
  15. requinix

    Time

    Unix timestamps are easiest. var diff = - new Date().getTime(); var interval = window.setInterval(function() { console.log("" + diff + " seconds left..."); if (--diff window.clearInterval(interval); } }, 1000);
  16. requinix

    Time

    phpfreaks in general is for helping you do stuff. If you want someone to do it for you then try the Freelancing forum. And be prepared to hand over some money. a) Why does it matter if the user gets the timer to expire? It's just JavaScript. b) Start with the date difference and subtract 1 each second: if the date changes on the client it won't matter.
  17. Blah blah topic blah blah JavaScript Help. http://forums.phpfreaks.com/index.php?topic=363405.0
  18. ...You're allowing people to upload PHP scripts? If move_uploaded_file() says it worked then it probably worked. Are you sure you're looking in the right place for the file? Should be /zips/filename_12-08-02.ext.
  19. Check for errors with nc ip port &1 Make sure you're capturing the output (which you aren't doing right now).
  20. RewriteRule ^([a-zA-Z0-9_-]+)$ user_profile.php?username=$1 RewriteRule ^([a-zA-Z0-9_-]+)/$ user_profile.php?username=$1 Those are the two you'll want to change, but first RewriteRule ^([a-zA-Z0-9_-]+)/?$ user_profile.php?username=$1 they can be combined into just the one. So modify that to include the directory (take a stab at it) and replace it in.
  21. What's the actual, complete code?
  22. Why? Do they have some limits on how many you can send?
  23. No. One POST request that returns the new ID number. That's how these things are supposed to work. Whatever you're doing now except (a) POST and (b) the callback will get the ID number as the data. Plus the relevant changes to the PHP script of course.
  24. 5 point 3 point 8. Not 5 point 38. mysqli and PDO are the best. PDO is more generic and portable, mysqli is the "improved" MySQL extension.
×
×
  • 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.