@# 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 27 28 29 30 31



Comments:

<0> saw +1/-1 and thought i'd spit out 0 for no particular reason
<1> but 'tis not as simple
<0> i'm on alcohol btw
<2> hrm
<3> jiggster: lol... the +1 / -1 is because I _am_ using 0 :)
<0> oh :p
<0> see i wasn't watching the convo
<0> just stepped in
<3> lol :p
<4> kodekrash, hm by zero starts it but when i add 1 too 77 i get 78 and that would be the 79 day of year
<4> so i have to calc -1
<3> BjoeHrn: yeah, maybe you are right...
<3> BjoeHrn: sorry.. kinda writing 3 different pieces of code at once here :op
<2> Any recommendations on how I should keep track of which forum topics a user has visited? Think I should just create a text field in the posts that stores user_id's, and if the user_id doesn't exist consider the topic/post unread, and if the user_id does exist because they visited the topic/post count it as read. Any other idea's?
<3> (and a blog entry)
<2> btw: text field in database, heh..



<3> cyphor: ick... use a secondary table with 2 or 3 integer fields
<3> cyphor: much better that way
<2> hrm
<2> can you further elaborate?
<2> I have a forums table, a topics table, and a posts table...
<3> cyphor: ok, so you can do 5 fields
<3> make it a multiple use table
<2> what would the last 2 fields be?
<3> cyphor: give me 3 minutes to finish this blog entry, and I'll give you some SQL to ruminate over :)
<2> kk
<4> kodekrash, thank you very much
<3> BjoeHrn: it does the trick for you?
<4> kodekrash, yeah it works perfect. but i didnt understand the code so well
<3> BjoeHrn: it's a hack.. .you aren't supposed to.... but I'm blogging it... and explaining the function's logic...I'll let you read it when I'm done :)
<4> kodekrash, is it hard to understand?
<3> BjoeHrn: nope
<4> kodekrash, kay :) when do you think you have blog it?
<3> BjoeHrn: what?
<4> kodekrash, but I'm blogging it <- i mean this :)
<5> do const references exist in PHP?
<3> BjoeHrn: and?
<4> kodekrash, when do you explain it
<6> tenmon: http://php.net/define
<2> kodekrash: I'm back, let me know when you're done.
<7> anyone know how i'd be able to do this?
<7> http://pastebin.com/597559
<8> Er. Wow. Never seen a remove & ban threat in a topic before. Anyways... having some trouble on a windows install of PHP. I've got a single command in a script <?php exit(5); ?> which I try to run... however, the program that runs "php mytest.php" always receives a return code of '1'. Ideas?
<2> what kind of key is a MUL?
<9> Zarb: Hmm .. with some text editor, or tidy may be.
<3> BjoeHrn: http://www.jameslinden.com/?p=50
<6> Ahroun: PHP version?
<8> RandomAvenger: 5.1.2
<8> Precompiled Binary Install.
<3> cyphor: ok, hit me with the variables again? topic, forum, etc?
<10> hi, is it possible to specify the address to that php bind()'s to with a fsockopen() call?
<7> tws, tidy?
<3> cyphor: I have about 5 minutes to help you solve your dilemna....
<11> kodekrash: downgrading to 4.3.6 didnt fix it and i read up that upgrading to 5 doesnt fix it either
<2> cool
<3> cyphor: so you want to track the user's viewing of forums and topics?
<3> command_: bummer for you
<2> yup
<2> I have a forums, topics, and posts table
<2> using id's fid, tid, and pid
<3> cyphor: ah, posts... that's the one I was missing
<3> cyphor: what are the table names for those three things? and the user table?
<6> cyphor: What I do is have a special heap table specifically for storing the last view timestamp of a table or forum
<2> forums, topics, and posts... the user table is called accounts
<2> I have that stuff, but how about knowing exactly what posts they have viewed in a specific topic..
<2> they may log in, look at one and leave..
<6> Ahroun: Sorry, I can't find anything relevant. I'm not even sure if Windows PHP supports exit codes
<2> seems like I'll have to store the user_id's that have visited the post etc.
<9> cyphor: Store the topic ID when they read the topic
<8> RandomAvenger: *nods* I may dig in to the code.
<2> kodekrash, so you think it's a bad idea to add a field to the topic and post tables which holds the user_id's of who's entered/read em?
<3> yes, VERY bad
<2> I believe you, but just for my own learning can you tell me a little bit why?
<3> cyphor: bad data management technique...
<3> cyphor: the topic record should have data about the topic, not related to the topic
<6> cyphor: If you did it that way, how do you detect when a user has finished reading the topic?



<2> it doesn't
<3> cyphor: since tracking which user has seen the topic is _related_ you want to store that in a related table
<3> cyphor: http://www.jameslinden.com/tmp/cyphor.sql
<2> kind of link is that?
<3> cyphor: eh, refresh that
<2> k
<3> cyphor: add an entry to that table whenever someone goes to a forum, topic or post....
<2> ah, very nice =)
<3> cyphor: then, you can do things like 'SELECT DISTINCT(account) FROM tracker WHERE topic=1
<6> kodekrash: That's pretty cool, what did you use to create that? Or was that your own two hands?
<2> awesome
<3> RandomAvenger: I do EVERYTHING in 100% text
<3> cyphor: AND, you can also see if a person visited the same topic/forum/post more than once...
<6> kodekrash is teh hardcore
<7> anyone know what's up with this>
<7> http://pastebin.com/597564
<3> RandomAvenger: damn skippy :)
<2> sweet
<2> thx kodekrash =) appreciate it
<3> cyphor: no problem
<7> oh, http://pastebin.com/597564 only echos "Searching schools in whose name contains"
<7> no vars
<2> yes, that is correct =)
<10> hi, i need to setup a SSL connection with a host, but i need to bind() to a specific IP, i currently use fsockopen() but it does not appear to support this... what can i do?
<6> Yeah, some great programmer in the sky designed life. Unfortunately this programmer made lots of typos.
<2> oh?
<10> is there a SSL library i can use on a regular socket?
<3> hyenur: google.com + php.net -- the answer is readily available
<10> kodekrash: wtf you think i been doing
<12> hyenur: openssl? :)
<3> hyenur: ****ting on a stick?
<3> hyenur: I don't know what you have been doing... why would I?
<3> cyphor: did you see something scary?
<2> kodekrash: no, just being silly...
<10> i hate php
<10> im just going to setup iptables rule to forward this crap
<3> cyphor: that getting the job done for you?
<13> hyenur: stunnel?
<10> no its a php app
<10> that doesnt work because its autheed by ip
<2> I know enough to say that yes, it will do it, really good to I think.. Unfortunately I'm a sql noob, so I'm googling key tutorials..
<10> i cant make it bind to specific ip using fsockopen()
<2> think I just found a good one =)
<10> unless kodekrash wants to share his infinite wisdom
<3> hyenur: everyone else used it all up already :)
<6> kodekrash: They divided by zero
<3> RandomAvenger: BUFFER OVERFLOW!!!
<3> :p
<10> fsockopen() appears to **** pretty bad tho
<2> kodekrash, what did you find a buffer overflow in?
<3> cyphor: dividing by zero :)
<12> kodekrash: since when dif by zero produces buffer overflow?
<3> hyenur: and there is a specific reason you can't use real sockets?
<12> s/dif/div/
<3> domas: since I've been coding for almost 20.18 hours
<3> RandomAvenger: it's not perl syntax... it's preg_match syntax :p
<12> not even preg_match
<12> vim/sed/whatever
<3> true
<10> kodekrash: well i would if i could find a way to do SSL over them
<2> hyenur, I'm guessing you put an IP in as fsockopen target?
<10> hence my question
<10> fsockopen("ssl://..." is whats in the code right now
<2> try IP then specify port?
<3> hyenur: look into http://php.net/stream_socket_client
<10> i want to specify the ip i want to connect FROM
<10> option to the bind() call


Name:

Comments:

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






Return to #php
or
Go to some related logs:

valknut unbutu
Gtk-WARNING **: cannot open display: in linux CentOS 5.0
enlightenment-ROX
kubunta codecs
ati-gatos ebuild xorg-7
#perl
httpxmlrequest
unpacked gentoo
#perl
ubuntu locale unknown option to



Home  |  disclaimer  |  contact  |  submit quotes