@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26



Comments:

<0> spyro_boy: then you check that random id on the server to load the required data.
<1> andr386: www.php.net/sessions
<2> does anybody know of any generic login systems that are not tied into a specific app and support multiple authentication mechanisms? (i'd like at least http-auth, cookies, sessionIDs, and by IP)
<1> andr386: oops, www.php.net/session
<1> say, can php handle that?
<0> r00t: i think that it would be hard to find one as every app i have developed all have different requirements.
<2> deadroot: i want one that supports more than one mechanism
<3> Lomat, hm..so, I'd set a cookie to a random number and then also save some kind of entity that can be read by PHP which also has that ID and the username?
<2> Lomat: not THAT different... all you need is a function $user=check_login($REQUEST) on top of every file, and tell if your db table that contains names and p***words
<2> spyro_boy: oh my god, you just reinvented session tables...
<4> mazzanet: Oh sorry, I got disconnected when you started my k**logger! =(
<5> which function I must use to limit one string to 100 chars
<3> r00t, lol.
<6> kuja: haha
<2> Cavallo: substr?



<1> what's with this keylogger stuff?
<0> spyro_boy: read how the php session_*() functions work. They set a cookie to be a random id. Then when the client send that cookie back it uses that id to build a files name. The contents of that files is the session data.
<0> setting a cookie to be username:md5(p***word) is no more secure when sending the p***word unhashed
<2> deadroot: an "exploit" in some antivirus software
<3> Lomat, oh.
<2> deadroot: it terminates all processes that receive "starkeylogger" via port 6667
<3> Lomat, alright. Thanks.
<0> deadroot: http://blog.washingtonpost.com/securityfix/2006/03/keylogger_utterance_spooks_nor.html
<1> r00t: oh. thanks
<1> Lomat: thanks
<4> r00t: You are now eligible for a ban.
<2> i heard about it before that WP article was posted...
<2> kuja: i was not the first one to say it, and nobody died the first time
<2> kuja: so it seemed ok
<4> r00t: Right, which is why I'm not going to tell anyone. But regardless of whether it's an explanation, issuing the command is going to get you banned, No questions asked.
<2> lol?
<4> I wonder which dork removed it from the topic :P
<2> * mazzanet starts kuja's keylogger <-- ban him too then, plz
<4> r00t: That's not the command.
<6> uh no
<4> r00t: You specifically said the command.
<2> kuja: huh?
<7> st@rtk3l0gg3r <-- i'm leet!
<7> :P
<2> ah, i missed that
<2> too bad...
<7> *cough*
<7> back to work
<4> r00t: You know, TML wouldn't have gone quite easy on you :)
<2> i'd rather add "startkeylogger" to server's MOTDs
<4> ..
<6> you can stop saying it now
<4> Are you ****ing stupid?
<2> this has a similar effect, btw: format c: /y
<4> Stop saying it, ****er.
<4> Geez, some people just don't get it.
<2> (NAV will thing your irc log contains a virus if that's written to it)
<8> Life's a bitch :(
<6> kuja: i need a lart.
<6> uh huh...
<8> lol
<2> (lol scripts i copied from random people five years ago)
<7> eh
<7> I _always_ feel like shouting when i see/hear german
<7> and this just proves it once more
<2> JoshX: me too :(
<7> ...
<9> star lee fogger
<8> JoshX, yeah, Germans sounds very angry.
<4> All I know is, German ain't English, so I don't need it :)
<2> kuja: me too
<10> hey guys, i want to show you something :()
<10> :(*
<11> how could I especify with eregi a variable which should contain a-z 0-9 and + sign ?
<11> !eregi("^([0-9a-z-])+$", $var) ?
<9> you dont want to use eregi



<9> preg_*
<4> Use preg_match() and the pattern /^[a-z0-9]+$/i
<9> see i knew someone would clarify
<11> why not erergi?
<4> ace_me: They're less Perlish for my taste, and they're a little slower than PCRE.
<11> ok than
<4> When it comes to regex, you always want the power of Perl.
<4> Well, my pattern is off.
<4> /^[a-z0-9+]+$/i <-- should work
<12> rofl
<11> how to include also the sign + there ? echo "<br>".preg_match("/^[a-z0-9]+$/i",$i); output 1 for $i = "123asd"; and 0 for $i = "123asd+";
<4> ace_me: Look at the second pattern. I corrected it.
<11> ok
<13> how would i go about checking if a variable (representing a filename) has a php extension, and if so, changing this extension to something else?
<2> with preg_match ?
<14> _zz, you can get the extension using pathinfo()
<2> ^(.*).php$
<2> anything php does NOT have a function for...
<14> r00t, no need to use a regex for that though, and yours is wrong anyway
<2> does it have a function for extracting lists of numbered variables from requests? (like name1 name2 name3...)
<2> colder: i forgot to \ the . or what?
<14> r00t, yep. and /\.php$/ is sufficient
<14> well, define extracting ?
<4> r00t: You shouldn't do that.
<4> r00t: You should name request variables name[], name[], and yes, name[]
<2> colder: no, i want to provide the first match part to tack the new extension on
<2> kuja: i don't like putting php-isms in my interface
<2> otherwise that's a nice concept
<4> r00t: Too bad, PHP doesn't have a function that will automatically do that for you, because PHP already does it its own way. Make your own.
<2> i did, i did...
<2> it just seems a bit ugly
<4> foo[] <-- This is NOT a PHP thing.
<4> Many languages use this sort of syntax.
<4> But of course at first sight, one would know that you are probably using PHP.
<2> kuja: but do other cgi systems support parsing such names into arrays automatically?
<4> r00t: It is unlikely.
<13> would it be safe to ***ume that a '.' will only ever appear in a pathname at the very end where the filename is present (as opposed to directory name)?
<15> regex
<14> _zz, you only need the last one. You don't need to care about the remaining dots.
<14> as even a dot in a filename doesn't always mean "start of extension"
<13> colder: i want to change the file extension by expoding the pathname on '.' and then concatenating a diff extension. is there a btter way of doing this
<14> _zz, there is.
<14> you can get the extention using pathinfo()
<13> done that
<14> now, if you want to change the extension, you could for example use a substr()
<16> hello
<14> you could also use a preg_replace(), but a regex here is not needed and probably just overhead.
<13> what's a regex?
<14> a regular expression
<16> I have a question which might sound strange. Is there a way to get details on a video (aspect ratio etc. - specifically if it's NTSC or PAL) using PHP? Is there a library for that?
<14> _zz, consider http://www.regular-expression.info/
<2> Scarlight: popen(mplayer -identify file.avi) ? ;)
<2> Scarlight: very likely not in php natively (but who knows...)
<16> is that in linux?
<4> Yes
<4> If you want to use mplayer on Windows (lol!?!?) then they have Windows binaries as well.
<16> no, I was just making sure.. :)
<2> but it's probably EXTREMELY inefficient, mplayer is a huge binary to load... so don't even try unless you don't need it often
<2> Scarlight: actuallty, i know a better one
<2> Scarlight: google up the php wrapper for bitcollider, that extracts dimensions at least, not sure on framerate
<2> *actually
<14> probably PECL::Fileinfo will also retrieve informations about some video formats.
<2> <2> Scarlight: very likely not in php natively (but who knows...)
<2> :P
<17> hi everybody, is there a function that finds a key in in_array() style ?
<2> even mplayer won't do it for asf files (with -identify, last i tried)
<4> FBdev: array_search()
<16> thank you all :)
<17> kuja cheers ...
<16> I just hope it works for MPEG2 :)
<2> Scarlight: what data do you need exactly? dimensions or framerate?
<2> Scarlight: if it's ONLY mpeg2, there are some more lightweight tools for that... i have an mpeginfo somewhere i think
<16> r00t, mainly framerate, but if the tool has other things it would be nice as well ;)


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

become a cpanplus tester
coldplugging pnp devices
PEAR SOAP session id in url
#css
#fedora
linux wipe ram
ubuntu mount sata
#openzaurus
irssi utf-8 decode
md2_raid5



Home  |  disclaimer  |  contact  |  submit quotes