@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6



Comments:

<0> bitches
<0> nice
<0> comcor, I didn't know you played too
<1> hey people, can someone please point me to a detailed explanation of the preg_replace syntax? all i can find on the net and the php manual is preg_replace .. blah blah.. use "w{#/ewfj[A-Za-z]#RS/3
<1> what do all the slashes and braces mean etc???
<2> search amazon.com for mastering regular expressions
<2> it's worth the 40$
<3> What's the easiest way to replace non-alphanum characters in a string with a char?
<4> what is the function for getting/downloading binary files like zip when using arrays like www.someserver.com/download.php?id=1 called?
<5> hmm...



<6> you want to send a binary file?
<4> I want people downloading file(s) when they use arrays insted of giving them a big url.
<6> and how are the people using an array?
<5> so.. you want to p*** the data as a POST variable
<5> er.. the name of the file
<5> and generate a link in the new page, maybe
<5> ?
<6> YOU WANT LEARN TEH ENGRISH!?!?!
<4> like: download.php?id=1 , then you download from /download/files/1.zip
<5> SCRWE YOU, MY ENGLISH IS GREAT
<6> lol
<5> there isn't one magic function that will do this for you, ninpo
<6> so, you would have like switch($_GET['id']){ case 1: /* send file */ break; }
<6> and in the /*send file*/ you would need to use
<6> @header!
<7> (PHP 3, PHP 4, PHP 5)
<7> void header ( string string [, bool replace [, int http_response_code]] )
<7> Send a raw HTTP header
<7> http://www.php.net/header
<6> and probably
<6> @readfile!
<7> (PHP 3, PHP 4, PHP 5)
<7> int readfile ( string filename [, bool use_include_path [, resource context]] )
<7> Outputs a file
<7> http://www.php.net/readfile
<4> hmm, ok
<5> man, just redirect to the zip file?
<4> well, it looks smoother when using arrays ;)
<6> depends if you want the actual file available publically
<5> he just wants an URL shortener
<6> lol
<5> yeah, fair enough though
<6> then just use tinyurl
<6> or make your own tinyurl implementation
<6> it's not like they are difficult to do
<5> but WHAT IS THE FUNCTION?!
<5> :)
<6> it is the do_what_i_am_thinking_right_now() function
<6> it is not fully implemented yet
<6> but works for most things
<5> does the bot know it yet?
<5> @telepathy!
<7> Failed to find definition for telepathy!
<6> not yet. hopefully i'll get it integrated pretty soon
<6> lol
<6> that would be sweet though
<5> someday, when we can plug our heads in
<3> What's the easiest way to replace non-alphanum characters in a string with a char? (well, rather modify a string so it could be a filename)
<6> probably preg_replace
<3> Hm, probably.
<3> A not-alphanumeric replace to '_' or something.
<3> ^[0-9a-zA-Z], "_" ?
<6> @php $string = 'fda3(^h9fy8932*(hfe'; $string = preg_replace('/[^A-Za-z0-9_\-\.]/', '_', $string); print $string;
<7> Result: fda3__h9fy8932__hfe
<3> nvm, I'll rftm :)
<6> that ill allow _-. in the filename
<6> you can remove those too if you want though
<3> Yeah, I figured what it does, thanks.
<3> Moving to something less-specific, other than experience *cough*, isn't there any book, resource, whatever - where I can figure out common PHP practices, especially related to design/patterns?
<8> just a general programming knowledge will get you that
<6> well things like design patterns aren't specific to a language



<3> I'm working on a pretty big project, and I keep hitting my C++ish head against PHP walls way too often, realising some design patterns don't apply here.
<3> Well, some are.
<3> Or maybe I'm just not implementing them right :)
<3> Or maybe I expect PHP to be more restrictive and less dynamic.
<3> Well, nevertheless, is there any book/resource you'd recommend?
<9> wb Stoned4Life
<10> ty
<10> yeah.. i got software dissed... then.. well.. had to go to an ***embly of some type
<10> anyway.. yeah.. my fopen question was retarded.. i totally forgot the whole fwrite concept.
<10> it's all good now
<9> cool.. this is better day for you
<10> .. i guess
<10> i did get a lot accomplished.. so... sure, why not
<9> i hope so
<9> Stoned4Life, using linux ?
<10> no
<11> laters again.
<12> I need help
<12> how to input data to database ?
<12> $perintah = mysql_query("INSERT INTO auth(username,p***word) VALUES('$username','$p***word')"); ???
<12> but I got error msg
<13> what's the error?
<12> Parse error: parse error, unexpected T_VARIABLE in c:\www\bot\adm\login.php on line 10
<13> well, I don't see a syntax err there. www.pastebin.com your code.
<12> ok
<12> http://pastebin.com/545189
<12> I am using PHP 5
<13> shuould try; or die('could not connect to mysql server '. mysql_error()); instead of the condition
<6> there is no parse error in the code you pasted
<13> i can't see a syntax err eithe
<13> are
<13> r
<6> lol
<13> heh, damn auto complete
<13> i gotta make it smart... some how
<12> create_vibe: working now
<12> thanks
<14> i need to send mail from a remote server, but i don't have access to the php.ini file
<13> why do you need access to the ini ?
<14> no... i needed on the local version, but the remote doesn't needs it
<13> what do you need it for?
<8> !php echo date('r', 1128931810000);
<15> Fri, 29 Jul 1949 07:32:32 -0400
<8> !php echo date('r', 112893181);
<15> Mon, 30 Jul 1973 11:13:01 -0400
<8> !php echo date('r', 1128931810);
<15> Mon, 10 Oct 2005 04:10:10 -0400
<8> !php echo date('r', 11289318100);
<15> Tue, 10 Jun 1919 10:16:52 -0400
<8> uhm
<8> k
<6> evulish: i think you might be rolling it
<6> @php echo date('r', 11289318100);
<7> Result: Tue, 10 Jun 1919 07:16:52 -0700
<6> @php echo date('r', 1289318100);
<7> Result: Tue, 09 Nov 2010 07:55:00 -0800
<8> yeah
<8> but it's supposed to be today
<8> java stores some ****ed up dates
<6> what, the timestamps?
<8> yeah
<8> i guess
<6> they aren't in seconds
<6> :)
<8> then wtf is it :P
<6> milliseconds
<8> yeah.. and chopping a few 0's off it should work
<6> you using Date.getTime()?
<8> these are just stored in a database.. not totally sure what they are
<8> but it works with new Date()
<6> if you create the date object then use getTime() on it, does it give you the same value?
<16> www.696studios.com/index2.php << SESSID is being set, however when i hit refresh (F5) it generates a new session id instead of retaining that session, any reason why?
<13> not with out seeing the code


Name:

Comments:

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






Return to #php
or
Go to some related logs:

ado0os
#worldchat
#chat-world
#vb
YouTube aint nothing but a butt ache
ne bilem ya
#chat-world
#allnitecafe
hızlı kılo evrme
#chat-world



Home  |  disclaimer  |  contact  |  submit quotes