@# 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



Comments:

<0> REMOTE_PORT is a key
<0> so, that will print the value
<1> magewlf: The only time you don't use single quotes on an array key name is when you've got it in quotes. Like if $mything = "this is my port $_SERVER[REMOTE_PORT] and stuff"
<1> that'd be okay. Otherwise, use the ' because if you don't, it
<2> ok
<0> print_r($_SERVER); shows all keys (another name for key is... index...) so now you know :)
<1> it's going to think that REMOTE_PORT is a constant
<1> and not a string
<1> philip: And knowing is half the battle!
<0> heh
<2> ok i got it now
<0> interesting that "a {$_SERVER[REMOTE_PORT]} b" will look for REMOTE_PORT as a constant too :)
<1> magewlf: Seriously though, go read that thing Jymmm linked you to on arrays.
<2> ok



<0> but we digress
<1> And if you need any further help after you've read it, you can come talk to me in #httpcraft , I'd be happy to help you further.
<3> philip we do?
<0> usually
<1> donuts!
<1> and coffee.
<4> How can I send an array in a url?
<3> gillespiem VERY BAD IDEA for oh so many reasons.
<4> mmm...
<4> Ok, How should I do something like that?
<0> gillespiem: create a form, with arrays as input names, send it, and see what it looks like
<0> (just an example)
<3> serilize
<3> less the spelling boo boos
<4> Yeah, serialize and sned that...
<5> philip: it had nothing to do with PHP
<4> The other end is having problems unserializing() it
<1> gillespiem: And if you do, make sure your <form method="GET" or you won't be able to see the variables in the url string
<5> she uses OSX and osx was creating stupid ._filename files that were hidden in my linux box
<3> gillespiem But, the thing is if you are expecting an array back , NEVER EVER trust user input
<0> Dario: wild
<2> Jymmm: how do you display a perons ISP o.o
<3> magewlf ask for a copy of their bill
<2> i mean using PHP
<2> o.o
<3> magewlf so did I
<1> gillespiem: Yeah, what Jymmm said. If you've got a security hole, it *WILL* be exploited. It's not a question of if, but when.
<4> This runs inside...
<1> doesn't matter.
<4> Security isn't the biggest worry here.
<4> But yeah.
<3> gillespiem it doens't matter, if more than one person uses it, that's all it takes.
<2> Ogredude: can you answer my question on how to display a visitors ISp
<1> At one company I worked for, there were several people fired one day because they'd installed BackOrifice on the work computers, and were grabbing p***words, and randomly rebooting machines.
<3> gillespiem Dont you know that company exploits ar mostly 80% inside jobs
<1> magewlf: You can get their IP easily enough. You can reverse-DNS it and sometimes get their ISP name. Or you can build something or other that'll check ARIN to see who the IP was ***igned to.
<4> Yeah.
<2> OK
<1> gillespiem: And a few months later, some other people got fired because they were bringing in DVDs and PS2 games and duplicating them on the DVD-R drives on the work computers.
<1> I think the secret to happy computing is, TRUST NO ONE!
<2> what would: <?php echo $_SERVER[REMOTE_HOST] ?> do ?
<3> !+tias
<6> [TIAS] Try It And See. If you want to know if something works, try it first.
<3> magewlf Did you read the links I gave you?
<2> yeah o.o
<3> magewlf liar
<7> magewlf: ... i mean... use some logic?
<8> magewlf: enclose REMOTE_HOST in quotes.
<2> ok..
<8> $_SERVER['REMOTE_HOST']
<2> http://admin.naau.1.vg/phpBB/index.php?page=vis_info not showing up
<3> magewlf Um, we dont support scripts here, try #phpbb
<2> its not a script
<2> Your ISP: <?php echo $_SERVER['REMOTE_HOST'] ?> thats what i have for ISP
<9> magewlf, thats not your ISP thats the IP of whose ever connecting
<2> i know << its meant to be a visitor info page
<2> <<
<10> hey I have $data and a var within a cl*** ( mycl***) and a method foo within that cl*** too, I do $myinstance->myvar = &$data; and within foo I do $this->myvar = 'TestRef'; but $data doesn't actually change
<10> basically I want $myvar to reference $data, and when I ***ign something to myvar $data get changed too, how can I do that ?
<11> CraZyLeGs: you make $this->myvar a reference to $data, so to change both, you should change $data, and as $this->myvar is a reference to that, it will pick up the change as well
<10> I want the other way around, when I change $myvar, I want $data to change too



<11> then make $data a ref to $myvar i.e.
<11> $data = &$this->myvar;
<11> that should do it methinks
<10> $myinst = new mycl***(); $myinst->myvar = $data; $myinst->foo(); // foo acts on myvar
<10> I'm doing a workaround since I can't modify foo, if I could I would p*** $data as a param
<10> so I using myvar as a workaround
<10> I can't do $data = &$this->myvar;
<10> got it ?
<12> how do you format deicmal values?
<13> Renacor: number_format
<3> num_format or sprintf
<14> hey caffinated
<15> roar
<3> mazza[W]
<15> Jymmm:
<16> Awesome.
<16> =P
<15> Jymmm: i've spent the last hour and a half in the hospital emergency ward
<3> ?
<15> had surgery
<15> apparently having 4 1 hour long blood noses isn't healthy
<16> Yikes.
<3> mazza[W] what did they say?
<15> i walked in the door
<15> told the guy what happened
<15> and he goes "oh ****"
<15> and that all i remember before i went into a deep sleep
<3> mazza[W] I keep telling you... NO MORE *** WITH ALIEN CREATURES!
<15> heh
<16> heh
<3> mazza[W] so, what exactly did they do?
<15> burnt the inside of my nose with silver nitrate
<15> seal up the wound
<3> mazza[W]: Well ****, I have some silver nitrate sticks here, I coulda done that for you in 3 seconds.
<15> the wound was really high up
<15> so they did some whacky skin manipulation crap
<3> mazza[W] no problem, mine are 6" long
<3> and I have a hammer
<16> hahaha
<3> mazza[W] (I really do have solver nitrate sticks)
<3> silver
<3> and suters too
<3> err sutures
<3> mazza[W] so, you ok now?
<17> hey, all! a stupid noob question (i think)
<3> dad stupid answer.
<17> can an array be used in a foreach()
<17> no! that's not what i wanted to ask...
<3> dad foreach uses arrays almost exclusively
<3> foreach IS for iterating over arrays =)
<17> i was thinking of select case, but looking at a foreach...
<18> hehe
<18> that was awesome
<18> Jymmm: what about iterating over objects?
<3> sleek we dont do objects in here =)
<18> hehe
<17> what i was actually wondering was if switch ($_POST){ case [foo]->bar; would work...
<13> dad: select takes a scalar
<13> switch($_POST['foo']) { case 'bar':
<17> bummer.
<18> dad: which means... Scalar variables are those containing an integer, float, string or boolean. Types array, object and resource are not scalar.
<19> yo all
<18> lla oy
<19> :P
<19> unusual query - is it possible to list all include()'ed/require()ed files up to that point in time? (trying to track down which file is outputting unwanted whitespace)
<17> sleek: i have a web app with several 'buttons' and to decide what to do, i have several switch statements, and other variables to keep track of what the switch's decided. i was hopeing to simplify it
<18> http://us2.php.net/manual/en/function.get-included-files.php
<20> i have a question how to i load a zend extension on php.ini?
<19> bingo! ta


Name:

Comments:

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






Return to #php
or
Go to some related logs:

#perl
kernel-module-ntfs arizona mirror
#linux
unresolvable dependencies transcode dapper
#math
mplayer dumpstream
#web
#suse
#perl
#php



Home  |  disclaimer  |  contact  |  submit quotes