Jump to content

mlin

Members
  • Posts

    91
  • Joined

  • Last visited

Everything posted by mlin

  1. actually, I believe mencoder is dependant on ffmpeg
  2. dev machine right? I like zend core for the browser interface, but couldn't live without the debug server
  3. I vote debian, or anything debian based for that matter (ubuntu, pyro, good os) gNewSense is a great completely free as in speech distro endorsed by the fsf note that ubuntu 8.04 has some serious problems with your main development tool...firefox. I'd stick with gutsy for now, or downgrade ff https://bugzilla.mozilla.org/show_bug.cgi?id=421482
  4. strip_tags does exactly that...use that otherwise if you want more control...use kses (kses kills evil scripts) ask google, kses has good documentation and is really easy to use.
  5. rameshfaj: that looks like a subquery rather than a join. the l and i are aliases to reference that tables your selecting from. they get defined in the from line of the query...ie: logger l, identities i if you replace your 1st query, with the query I posted earlier, you should have everything you need in one resultset. You can then get rid of the 2nd query inside your loop and work with the results as normal. On 2nd look, I do have a couple columns missing from the query I posted for your script. be sure to add referer and time to the select line of the query. Use the aliases. l == logger table, and i == identities table
  6. I've played around with ajax chat a bit, but I don't really have a working solution that I'm happy with. This is gonna be buggy and once you get in the code it should be overly dirty, yet as simple as I could keep it. I had planned on cleaning it up, fixing the bugs and then posting, but here it is... http://linardy.com/chat/ I still haven't even taken my own advice to slow down the setTimeout calls when a user has been idle for a certain amount of time. If I were you, I'd move the setTimeout function call to the callback function and do a bit of work to determine how long until the next call. The more amount of time since the user's last action, the longer the Interval. If they've been idle way too long for your taste...provide some sort of feedback letting them know they've timed out with a link or something to get back and dont set the next interval to happen until the user provides some sort of action (post, refresh, js_link, etc...) I haven't touched the code for a couple months and was just waiting for a bit more time to fool around with it. consider it lgpl and do whatever you want with it. good luck!
  7. Yes, use a join. You'll make your life a lot easier and your app will perform much better. $query = mysql_query(" select l.ip, l.uname, l.date, i.name from logger l, identities i where l.ip = i.ip order by date desc, time desc ");
  8. thebadbad's solution will be faster and better chance of getting the results you want...go with that. Never seen that before...very clever thebadbad
  9. cool, I like to stick with what I know as well. Ginger's solution will work for sure as long as there are no subdir's in the folder as she said. Add recursion to her solution and subdir's won't matter either
  10. Yeah, I just mention'd *nix since if they no longer need office, they might as well abandon winblows for something that owns 99% of server market for a reason. And *nix distros are usually free as in speech, you can do anything you want...even modify their programs. Since when did you have access to source code for stuff that matters on a proprietary system.
  11. check your computer means run virus/malware scans to try to get rid of anything you don't want. Advanced users don't usually think they know what an infected system looks like (zero-day exploits, etc...), but if you know what a Clean system should look like...you can catch most garbage manually using hijackThis (ask google) Or, you could Abandon winblows for a better platform debian, ubuntu, and gNewSense all rock. All free of fee, but gNewSense is completely free as in speech. Have a look around. They're all also easy to dual boot so that you can dev on a *nix system, and still have winblows there for your games.
  12. this line has an error: if(!strlen($_POST['year'] == '4')){ should be: if(!strlen($_POST['year']) == '4'){ see it?
  13. I don't see your output, but trying to keep it as simple as possible: set your column's width to something fixed, and align your cells to the center.
  14. That's quite the question. Try starting from the beginning and asking smaller questions along the way. 1st you'll need registration, then your auth/login script. From there, well...ask us again when you get there
  15. instead of saving the temp config files on your server's disk, consider reading the file to the browser as a dl rather than presenting a link. In the long run it'll be easier on you, and your users (eliminating the click step. The user will submit the form and file will be read to their browser as a download)
  16. as long as you have enough memory, your good to go. But yes, it is possible to run into problems with large files. If it's really an issue, think about using a db for your app rather than flat files.
  17. javascript has the style stuff...umm say you've got: <a onclick='change_style();'>Change Style</a> <div id='styleable'> bunch of text... </div> you can define your js function like so: function change_style() { var div = document.getElementById('styleable'); div.style.font-weight = 'bold'; div.style.color = 'grey'; } so once the link is clicked, the styles of the div id'd as styleable will be changed to bold and grey text. Most CSS can be manipulated dynamically the same way hope that helps
  18. "HTML pages but setting the content type to a word document" that's probably the best answer you can get, but don't work too hard on it since MS doesn't conform to standards therefore word will expect the html to be MS way, not the right way. Install office and keep on going, or better yet, go *nix and create pdf's?
  19. you could try: exec('rm -fr ' . $dir); this is a basic shell cmd so if your install has shell access and permissions to the dir, your set...otherwise, your sol rm = remove -fr are flags for the cmd. f = force, r = recursive hope this helps.
  20. mlin

    modify $_POST

    return will ALWAYS end your function and Return the value you asked it to. Without reading the entire thread...this looks like what your looking for: function get_post_vars() { foreach ($_POST as $v) { $post = $v; } return (isset($post) ? $post : false; } that way you'll go loop through the entire array and return After the loop rather than return on the 1st value. the ternary(spelling?) operators help to quickly return false if post hasn't been set at all due to an empty $_POST superglobal hope that helps but to tell you the truth I think your either overthinking it, or your sacrificing a bit of performance in order to make your code look better to yourself, but not necessarily for the next developer to help you with your app.
  21. binary content transfer encoding? why is this? it's a text file. I would think you'd get the desired results omitting that header...am I wrong?
  22. In the sense your thinking of...no (say that since we've all been there ) Your gonna have to read your file into a variable. Set another var with the content you'd like at the beginning of your file, and concantenate them together, then rewrite the file. $old_file = file_get_contents(...); $new_stuff = '...'; $file = $new_stuff . "\n" . $old_file; //rewrite the file best we get for flat files, but that goes for most scripting languages. Even if there is some magic function in other languages, this is probably the process when you get down to the meat and potatoes. beaten to it again...gotta stop being so longwinded
  23. apache runs as it's own user by default. If you own the directory, but apache tries to write to it, it will be denied. You can either chmod 777 or you can check your httpd.conf file to check/change apache's user/group values. If you change your conf, remember to restart your server before testing.
  24. It means that your using too much memory. Personally I've never run into this issue, but there are ini variables you can use to allocate more memory to php. in your php.ini file, look for memory_limit and up it's value to something that will work for your app is one way you could get around it, but should be last resort. I really think your app could be optimized one way or another to avoid this error. If you can, post the code so we can have a look.
×
×
  • 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.