Jump to content

Koobi

Staff Alumni
  • Posts

    419
  • Joined

  • Last visited

    Never

Everything posted by Koobi

  1. if you're not too fond of doing it manually, i believe FC has  a program called "Frog"? Or you can even use yum I believe. That way you can do it via a GUI...although you would learn more if you did it by hand in which case you would find this thread very useful: [url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]Call To Undefinded Function mysql_connect[/url]
  2. though this topic is in the PHP Help section, it seems more suited in the Miscellaneous section so i'll move it there. I use [url=http://www.vim.org/]Vim[/url] it's unbelievably flexible...you can build almost ANYTHING into it and it's still lightening fast. you can even use your local vim to edit a file directly on the remote server...which is quite different from SSH'ing into a remote machine and editing if you do that sort of thing...because this feels a lot faster since changes are commited when you save only. honestly though, i don't think anything can beat vim's functionality. try it out...it might take a little getting used to but once you know how some of it works...well i'll just let you find out for yourself :) Related topic: [url=http://www.phpfreaks.com/forums/index.php/topic,54859.0.html]Which PHP-Editor do you think is the best?[/url]
  3. not being able to read _POST info could be due to your php.ini settings because there are some options where you can do things like overwrite _POSt variables. how did you install PHP?
  4. how did you install PHP? pre-compiled binary? or did you try installing it yourself? tell me what package/methods you used to install, whichever the case may be.
  5. percentages for dimensions is good but for things like font's use 'em' instead because it's more accessible for disabled users who use varying user agents for their browsing purposes.
  6. [quote author=Crayon Violent link=topic=99525.msg392088#msg392088 date=1152123609] replace this: $text = stripslashes($text); with this: $text = stripslashes(str_replace("\r\n", "\n", $text)); koobie i thought fopen and fwrite were already binary safe by default? [/quote] not on win bases as far as i know. unfortunately i can't test that out for myself at home. would you be able to verify that for me if it's not too much trouble for you? adding the "b" to the mode parameter should do the replacing itself without the need for str_replace() if i'm not mistaken.
  7. PHP can create PDF's but i'm not aware of any way in which it can read and render it. doc's are a no go.
  8. oh ok then you can do something here. sorry i misunderstood your first post. in this case i think the safest thing to do would be to have an intermediate page that redirects the user to their requested page. so your user wants to go from one.php to two.php and the moment he leaves one.php, you want the script to execute. the link he clicks would take him to intermediate.php and this script's job is to redirect the user to the requested page based on certain conditions. these conditions could be the execution of your query for example. so you would have a session variable that tracks URL's and the moment this changes, you would execute this query of yours and then redirect him from this page (i.e. intermediate.php) to two.php hope that made sense.
  9. you mentioned using file_get_contents() do you have the code for that? make sure your URL is ok. echo the URL and check if it's valid
  10. this would be a client side trigger so you would have to use JavaScript. i would not use this approach though. many things can go wrong...the user could close the browser or kill the browser process on his OS, the browser could crash, the ISP could drop his connection. too many uncertainties in my...but who knows, maybe someone knows something i don't and this is possible but as far as i know, i don't think this is a good solution.
  11. ok thanks. but please define "it didn't work" what exactly hapenned? can you reproduce the error message you recieved?
  12. care to show me the file_get_contents() snippet you used? That should work for you. It's better that you use htmlspecialchars() before you stick the data in a <p> tag though. i don't know why you want to display the raw data of a .pdf or a .doc file...you do realize that all the text will seem garbled, right?
  13. [quote author=karthikeyan_coder link=topic=99539.msg392035#msg392035 date=1152119164] [quote author=xyn link=topic=99539.msg392027#msg392027 date=1152118188] Why not use the md5 formatt to encrypt passwords? md5($_POST['password']) [/quote] Do md5($_POST['password']) and split it as per your string length count.... with ... split($md5_output,$req_length); Thank you, Karthi Keyan. [/quote] that wouldn't be accurate...because an MD5 hash value can differ by just one character so if you have two similar MD5 values and you trim it, and if the single character that distinguishes them was trimmed, the two values would be identical.
  14. as far as i know, there are two things involved here. one is how your web server decides to serve those files. the other is how your browser is configured to accept the files. your web server can  be configured to send a .txt file as plaint/text and if your browser is configured to download a file with a MIME type of plain/text then that's what it will do. by the way, you can also configure your web server to serve a .txt file as audio/mp3 but it won't work as you expect...just wanted to let you know its possible. is this what you wanted to know? i think i might have misunderstood your question.
  15. i wouldn't say md5() is as secure anymore. hash collision can occur depending on the prefixes you use. why not try sha1() instead? maybe you could do something like this...off the top of my head: [code=php:0] <?php     //assume $oldPass is the md5() value of his old password in your database     $string = date('U') . $username . $oldPass;     echo 'New password is: ' . sha1($string, true); ?> [/code] You might want to use the algorithms the others have posted in this thread becuse mine is relatively simple but i would avoid md5()...but it's generally ok to use MD5 unless you know some REALLY nasty people who would REALLY want to get back at you for something :)
  16. i don't remember...but i think this might be a platform problem. are you on windows? in any case, change this: [code=php:0] $file1 = fopen("text1.txt", "w"); [/code] to this: [code=php:0] $file1 = fopen("text1.txt", "wb"); [/code] to make it binary safe (it's in the manual on the page about fopen if you want to read more about it)
  17. you could use regular expressions to grab the anchors. if the HTML file was valid XML, you could have used PHP 5's XML functions if you were using PHP 5 but unfortunately it's not valid XML. i believe this expression would work, haven't tested it out...been out of touch with RegExp for quite some time but some of the members on this board are very good at it so hopefully they can help you out better if i'm wrong. [code] '|href="(.*)+"|im' [/code] you could use that in conjunction with preg_match() to grab the data you want into an array.
  18. hehe yeah i don't know what the admins had planned for the karma issue. actually i think it was decided at the beginning, it was probably missing because they're still in the process of tweaking the site.
  19. [quote author=Crayon Violent link=topic=99076.msg390858#msg390858 date=1151904679] a) I..bah, i'll just skip to this part here: [quote] so since we seem to have the main topic sorted out, let's give this thread a break Smiley [/quote] Since I will agree that this is overall the best course of action, in recognition of your sage-like advice, I award you one karma point  ;) [/quote] well hey since the karma system has been added anyway, and you had some valid points and you seem to be dedicated to this board, one karma to you too :)
  20. a) look at your reply to my post. you quoted me on my post. i read that part of your post since that is what is relevant to me. why would i want to read your reply to the other guys post when it does not concern me? b) when i say i didn't read the entire post i didn't mean i didn't even glance over it to make sure things are ok, i just did not process it. don't take things so literally. it's not a matter of posting the same thing twice in this situation because you posted quoting me so i have to reply to your question with my own opinion even if someone shares my opinion because i would have to state my opinion. so since we seem to have the main topic sorted out, let's give this thread a break :)
  21. [quote author=KingPhilip link=topic=99076.msg390829#msg390829 date=1151903130] So I might have been a little rude too, sorry. Oh, and if you didnt notice, Karma is back ;) [/quote] yep :) it's back but like i said, it's the admins decision. i was just stating my opinion in this thread and somehow it got taken way out of proportion.
  22. [quote author=KingPhilip link=topic=99076.msg390822#msg390822 date=1151902022] Like I said in the beginning, I feel like most people are here are rude. I'm sorry, but I really don't want to come back here because of your attitude. You might not take me seriously because I don't have posts on this forum, but dont mistake me for not being mature or responsible. I've had plenty of times working under pressure, with no time, limited supplies and I can pull out just fine. Do I tell the people that are looking up to me that I don't have time for them? No, I don't, I at least [b]TRY[/b] to make time. I don't know if I'm going to come back here ever again, because it seems like some of the staff are complete donkeys (if you know what I mean.) [/quote] i'm sorry that you feel that way but that's your opinion. i feel that you are being rude by assuming that i'm not taking you seriously because of your post count. i don't even look at a persons post count and as far as i'm concerned, your post is judging me without even knowing me. look at my post count and compare it to the post count of the other mods? see the difference? now why would i judge a person by their post count? and don't talk about time. you have no idea what hours i have to put it and i wont talk to you about time because i have no idea what your lifestyle is like. people have commitments apart from work and a social life. some people have other commitments that require constant attention. it may be a personal matter. and i'd rather spend more of my time helping on the forum than reading a thread in the miscellaneous section of the forum that was just a discussion to begin with...which may have been another reason why i chose not to read this entire thread...but since you're in the mood to judge a person without knowing the facts, i don't expect you to realize that :) by the way, i happen to think donkeys are very fine animals :)
  23. [quote author=Crayon Violent link=topic=99076.msg390816#msg390816 date=1151899921] wait so koobi are you saying that you, as a mod, shouldn't have to read posts before responding to them, because you aren't paid? that doesn't sound like proper mod attitude... edit: i'm not trying to start some kind of fight here..that's just the impression i just got. please clarify if that's not what you meant? [/quote] nobody reads every post on every thread. i have no time these days. i read the part of the discussion you quoted me on. if you want me to read a part of your post which you quoted someone else on, then you should say so. why would i want to read the part of the post you quoted someone else on? my discussion is with you, not with the other person you qouted the post on. if it's a critical thread of course i'd read the entire thread but this is just a discussion about karma...which i think has gone a little too far...
  24. [quote author=KingPhilip link=topic=99076.msg390798#msg390798 date=1151893712] Ok, I would like to jump in right here. This is a little offtopic but, I'm going to be completely honost here: I've always seen most people on PhpFreaks as rude, because when I was learning I would search around, not find my question, so I would ask. I seemed to get responses like "Oh someone already asked that, look around," but I did... I work with customer support on another site, the one thing I make sure to do is address each problem, and read the post completely. If I know I don't have time to read it all, I'll wait until I do. Saying stuff like[quote]unfortunately i didn't have time to read your entire post so i'll just reply to what you quoted me on.[/quote] just gives the impression to me like you don't have time for this site. Yes, we all have outside lifes... well, for the most part, but you don't ever tell the customer that. Anyways, I think something like the Karma mod for SMF would be nice, maybe just the user that put up the topic could say "Was this user helpful in this topic? Yes/No/Undecided." It serioulsy can't be that hard to make your own mods for this site, I mean come on its [b]phpFreaks[/b]!!! Basically, something like the karma mod would be nice imo :) [/quote] customer support is your job where you're paid to do respond to each customers query and it's your duty. if you could ask your boss to pay me to read each and every post here i'd be glad to :)
  25. glad it worked. do you understand how it works though? it's mainly thanks to the str_pad() function. in the future try and make a new thread for a new topic because it would benefit users after you who might search for a similar problem :)
×
×
  • 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.