| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9
Comments:
<0> and tired <0> i need doritos <1> why are you using the username instead of the id? <0> yes, why? <1> i mean, i'd think you'd only want to translate id->name at the very end for a human to read, if you did it at all <0> WHY?? <0> MUHAHAHAA <0> :/ <2> pizza_milkshake: wouldn't that make for more queries? <1> nope, it would be easier actually for the db <1> you just pull the ids out of post once with no join <1> and then translate the id->name in another single query at the end, if it's even necessary <1> also, you can do all this with one query <1> i'm sort of confused as to what you're doing but it seems like overkill <1> your code produces array(ip=>array(user1,...userN),...) ? <2> nah, array(user=>array(user, userN),...)
<2> like say user A logs in with ip 1 and ip 2 <2> user B logs in with ip 2 and ip 3 <1> ok <2> user C logs in with ip 3 and ip 4 <1> ah, user mappings based on ip <2> i want users a b and c all in one array <1> so A->B and B->A <1> but what is the key to access that array? <2> it's just the first username in one of the values of $u <1> like you have A=>(A,B,C), B=>(A,B,C), C=>(A,B,C) ? <2> that's the point of lines 17->28 <2> it's looping through $u to see if each item in u is a key in $end, if not, it creates a new array <2> hm <2> it looks like this thing is gonna take about 40 minutes to finish <1> so, say you had post(user,ip) (A,1),(A,2),(B,1),(C,2),(D,3) what would your output be? <2> pizza_milkshake: i'm dropping the ip address because i don't care about that <2> er <2> nm <2> it would be array(A=>array(A,B,C),D=>array(D)) <2> haha. i don't think a 5000 second timeout will be enough :( <1> so how do you map C->A? <2> because it's doing a query like SELECT username FROM table WHERE ip = 2; <1> what do you do with this mapping? just print a report? <2> yeah <2> it ends with an impressive print_r() <3> whats the easiest way to check witna if if a form has been submitted isnt it if ($submit) { ... } <3> lol didn't use $_POST['submit'] thats the problem <4> pizza <4> How come this line doesnt work for my previous problem? <4> elseif (preg_match('/^[A-Za-z0-9@\-\._]+$/', $_POST['sender'])) { print("Message"); } <4> I cant send ANYTHING now <2> haha. my mug made it on a website. <2> http://livestrongpc.com/share/view.php?photoID=59d1b <2> with a grammar error! <4> not how I imagined you to look like heh <4> Can you help me out there please grant? <5> what is your previous problem? <4> the email verification! <4> heh <5> yeah, no **** <5> what's the problem <4> people putting in BCC lines in the from field <5> [11:47:47] <4> How come this line doesnt work for my previous problem? <4> elseif (preg_match('/^[A-Za-z0-9@\-\._]+$/', $_POST['sender'])) { print("Message"); } <5> how are they entering them? <4> the email address? <5> well, you can't just check the From field <5> you need to check the To field too <4> why's that? <4> No, the To field is hard coded <1> Sausage_: http://pastebin.com/629474 <5> then how are they entering the bcc into your form? <4> by putting in as malicious line in the from field. <4> as = a <5> what is the print("Message")? <4> To tell them a message when they try and put in a dodgy piece of code <5> no, if that's true then it's okay <5> you have your logic backwards <5> throw a ! in front of the preg_match <4> See i dont understand regex, I thought the code was to stop the other malicious code, thanks spx <2> only 900 queries left!!
<3> I got a problem... I got a $var with a string and want to replace all <br> with a newline char. I got str_replace("<br>\n","\n",$var); but it doesn't replace <1> Sausage_: http://pastebin.com/629496 <1> that one is more efficient <1> does less work <2> select distinct would make it even faster, wouldn't it? <2> as user a could use ip 1 800 times <1> GROUP BY takes care of that <2> oh, didn't see that <1> ;-D <1> time php -q piza.php <1> pizza.php even <2> oh sweet jesus <2> doesn't totally work <2> a username here exists in two different arrays <1> mine or yours? <2> yours <1> it finished? <2> mine hasn't finished yet :P <2> yeah <2> it was instant <2> real 0m1.173s <2> user 0m0.060s <2> sys 0m0.091s <1> ah ok, probably some wrong ***umption <1> lessee, what could it be... <2> i think i see <2> say they come in this order: A 1, B1, A2, C1, D1 <2> AB and CD will get their own array <1> the ordering of the resultset is important for mine <2> er no <2> that's not possible <1> mine should order by ipaddress <2> A1, B1, A2, B3, C3 <1> actually, mine needs to order by userid also <2> that would create (A,B), B(C) <2> i don't thin kit's possible to sort it properly <1> try ORDER BY ipaddress ASC, user.userid ASC <2> i wish it were easier than a whois query to find the owner of an ip <1> you'll need to write whoowns <2> if my script dies before it finishes, i'll cry. <2> it's on 4340 out of 4630 <2> but i know it's nearing the time limit <2> i wish i ran time with it <1> Sausage_: that's why you need to write more efficient scripts :/ <1> did you try mine with the new ORDER? <2> not yet <2> hm, looks like it works <1> neato <1> anytime you find yourself doing 1 + N queries there is almost certainly a better way <2> heh yeah <2> i just didn't feel like finding it <1> so mine took 1.1 sec? <2> yeah <1> and did what you want? <2> but i don't even understand why sorting by userid would make a difference <1> i do <2> userid has zip to do with the ip address or what two users are alike <2> unless they registered users back-to-back <1> but it does have something to do with how you store the data in the array <1> because A=>(A,B,C) <1> if you get B before A <2> ohhhhh <1> so you need to guarentee you see A before B :) <2> 4563/4630! <2> 60 left! <2> 50! <2> 10! <1> haha <2> oh, and it didn't even work!! <2> fuuuuck <2> whyyy <2> oh <2> jesus christ.
Return to
#php or Go to some related
logs:
#chat-world #allnitecafe Hai boleh bekenalan #allnitecafe #allnitecafe #india #allnitecafe #allnitecafe #allnitecafe #allnitecafe
|
|