IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1982.48 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-06-25
[21:22]<ggjg|>i have webstats and need httphost adresses only. i need SELECT httphost FROM stats but only unique httphost strings
[21:23]<vnxsvnv>Storkk: er, yah, that looks good
[21:23]<svjzcc>tehstev, cool, thanks
[21:23]<vnxsvnv>neon|: seriously google this stuff... select distinct httppost
[21:23]<svjzcc>now, how do i iterate through the individual characters in a string?
[21:23]<ggjg|>tehstev: i am googling, thanks :)
[21:24]<vnxsvnv>Storkk: substr... :)
[21:24]<svjzcc>tehstev, ouch, that could be nasty
[21:24]<znmpjpp>hm... I think I've got it
[21:24]<znmpjpp>the d.html was just a copy of a real html in /var/www/blocked/
[21:25]<znmpjpp>and it generates appropriate headers
[21:25]<vnxsvnv>Storkk: substr($str, $index, 1); or $str{$index} i think
[21:25]<znmpjpp>but look at http://stevarino.com/projects/headers/headers.php?uri=http://redloff.bash.pl:88
[21:25]<vnxsvnv>redloff: no cache control?
[21:26]<znmpjpp>tehstev, no 'no-cache' headers!
[21:26]<vnxsvnv>redloff: this is why a live-http-headers browser plugin is nice ;)
[21:28]<znmpjpp>true, but that http://stevarino.com/projects/headers/headers.php?uri= of yours do the trick very well
[21:28]<vnxsvnv>redloff: have to run to the store real quick. back in 5 minutes
[21:29]<znmpjpp>ok :) run carefully
[21:29]<vnxsvnv>so... no scissors?
[21:29]<znmpjpp>nope
[21:29]<znmpjpp>not with the tripple-spin-jump-over-the-street at least
[21:33]<znmpjpp>ok, the http://bash.pl/blocked/ sends correct headers
[21:34]<znmpjpp>but the http://bash.pl:88 which is virtual host (with root directory /var/www/blocked/) does not
[21:34]<znmpjpp>we're getting close
[21:41]<sdyvxw60n6>Can anybody please help me with an OOP-related question? How do I manually serialize (i.e., not using the built-in serialize() function) objects with private properties?
[21:50]<vnxsvnv>smithw6097: __sleep?
[21:52]<sdyvxw60n6>tehstev: No, I have already figured out... Just for the records, I was trying to serialize an object with a private property which was in turn another object of another class. I thought serialize would freak out with this, so I'd have to manually serialize each property which contained an object. Thankfully, serialize does the job just fine.
[21:52]<vnxsvnv>serialize is very good :)
[21:52]<sdyvxw60n6>tehstev: Thank you, anyway.
[21:52]<vnxsvnv>np
[21:52]<sdyvxw60n6>tehstev: I see :)
[21:53]<vnxsvnv>this is my way of procrastination...
[21:53]<gycgs>hello! is there a smart way to parse javascript array into php array?
[21:53]<ajdn>json?
[21:54]<vnxsvnv>sounds like he wants an unjson
[21:55]<gycgs>right
[21:55]<gycgs>some smart preg kludges?! :]
[21:57]<vnxsvnv>actually a php json package probably has what you need
[21:57]<-- dvxn|syzzzyus xzs>http://www.bagdadsoftware.de")
[22:00]<vnxsvnv>what pretty flow charts json's website has...
[22:08]<gj2pznd>can anyone tell me the php equivalent of the perl =~
[22:10]<vnxsvnv>isn't that a regular expression match?
[22:11]<vnxsvnv>oh he left.. :( nm
[22:12]<znmpjpp>tehstev :F
[22:12]<znmpjpp>any thoughts?
[22:13]<vnxsvnv>i think thats the wierdest emoticon i've ever seen
[22:13]<znmpjpp>;]]
[22:14]<vnxsvnv>whats up?
[22:15]<znmpjpp>with what?
[22:17]<vnxsvnv>with your little project
[22:19]<gzrxrdc>redloff: Is your tokenizer thing working?
[22:19]<znmpjpp>GrahamC, almost.. I think
[22:19]<znmpjpp>one problem though..
[22:20]<znmpjpp>GrahamC, look at http://stevarino.com/projects/headers/headers.php?uri=http://bash.pl/blocked/
[22:20]<znmpjpp>GrahamC, and then at http://stevarino.com/projects/headers/headers.php?uri=http://bash.pl:88
[22:20]<znmpjpp>in first case, it sends you're headers
[22:20]<znmpjpp>in second, it doesn't
[22:20]<vnxsvnv>"your"
[22:21]<znmpjpp>yeah, sorry ;]
[22:21]<znmpjpp>I called you a header ;]
[22:21]<gzrxrdc>redloff: Try making a new file on the :88 server and trying that
[22:21]<znmpjpp>headers even
[22:21]<ldzrsgg>hey there, I have some sort of basic question... when the user goes back, I want to avoid the double sending of post values... I tought of doing so by setting the cache control to no cache... but I'm not shure if this practice is recommended or if there's a more elegant way of doing so...
[22:21]<znmpjpp>GrahamC, what do you mean by new file?
[22:21]<gzrxrdc>redloff: A file for only sending those headers, and see what it does.
[22:21]<sdyvxw606n>Is there any way I can use namespaces in PHP?
[22:22]<znmpjpp>hm, ok
[22:22]<ajdn>smithw6079: No, PHP does not support namespaces (yet).
[22:22]<vnxsvnv>Lyrasen: easiest way is to header('Location: foo'); whree foo is the form. this clears the $_POSTed variables
[22:22]<vnxsvnv>smithw6079: nope :)
[22:23]<sdyvxw606n>jome, tehstev: Thank you... Looks like I'm gonna to rewrite a lot of code when it finally does... Oh, well.
[22:23]<gzrxrdc>smithw6079: There is a hack for PHP to support namespaces. You have to compile it yourself, isn't support, and is not installed on very many machines.
[22:23]<gzrxrdc>smithw6079: Which means if you plan on sending the code to any other machines, you shouldn't use it.
[22:23]<znmpjpp>GrahamC, no good: http://stevarino.com/projects/headers/headers.php?uri=http://bash.pl:88/test.html
[22:23]<-- rfgw_yjggsru xrs>http://www.microsoft.com/windowsserver2003/ <- 3,400,000,000+ users can't be wrong")
[22:24]<znmpjpp>where test.html contains only
[22:24]<znmpjpp><?php header("Cache-Control: no-cache, must-revalidate");
[22:24]<znmpjpp>header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); ?>
[22:24]<ldzrsgg>tehstev: thing is, once the form is submitted and verified, I use header location to redirect to another page... still when going back, post is still present.
[22:24]<sdyvxw606n>GrahamC: Yeah. I will use it on another server, but thanks.
[22:25]<gzrxrdc>redloff: I'm getting a 404 error here.
[22:25]<vnxsvnv>Lyrasen: what do you want to happen?
[22:25]<ldzrsgg>the user goes to the preceding page which is blank and clean of post headers.
[22:25]<vnxsvnv>GrahamC and redloff: my script doesn't support ports (oops) :D
[22:25]<znmpjpp>GrahamC, where?
[22:26]<znmpjpp>!!
[22:26]<ldzrsgg>(without using another button than the one supplied by the browser)
[22:26]<vnxsvnv>hang on, let me see if i can fix that.... its been at least 1.5 years since i touched that code
[22:26]<znmpjpp>:)
[22:27]<znmpjpp>GrahamC, where do you get 404?
[22:27]<vnxsvnv>redloff: in the returned headers from my script
[22:27]<gzrxrdc>redloff: On the page you sent me, I'm only getting a 404-error.
[22:28]<vnxsvnv>Lyrasen: i'm not sure what you want to happen? clear the history?
[22:28]<znmpjpp>GrahamC, tehstev: I don't get 404 :|
[22:28]<gzrxrdc>http://stevarino.com/projects/headers/headers.php?uri=http://bash.pl:88/test.html outputs: HTTP/1.1 404 Not Found
[22:29]<znmpjpp>how come I have sth different?
[22:30]<rfvr>I'm getting "[function.file-get-contents]: failed to open stream: Permission denied" for one url while the rest work correctly (to urls on the same domain)
[22:30]<vnxsvnv>GrahamC and redloff: fixed..







