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.49 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-05-29
[00:00]<su2ogn>ic
[00:00]<rfvr>romans5n1: please elaborate
[00:00]<zjdrgstgw>is there a "proper" way? I always just myArray[] = whatever
[00:01]<mjgcnd_2>howecome I lose my session inside an iframe?
[00:01]<rfvr>romans5n1: how do I perform a backreference?
[00:01]<su2ogn>can i use array_push to onto a multidimensional array?
[00:02]<rfvr>yes
[00:02]<su2ogn>array_push($arr[0][0], $val)
[00:02]<su2ogn>like so?
[00:02]<zjdrgstgw>like 2006-05-28T3:58:38-06:00 ... or other common ways of representing dates online... I'd love to have a ready made list of format strings ( such as "F d, Y" ) that I could just throw into the date function, instead of having to remember each time, ok do I need an m, n or M here?
[00:02]<rfvr>Monkey_b: page loaded before you set session vars in the other page? cookies disabled?
[00:04]<rfvr>SubOne: correct
[00:04]<su2ogn>what if the element is not an array
[00:04]<nzzz>setuid_w00t: what you have works for me to get the value.. (sorry about the request/get I havent used it much so I didnt know about it) http://michaelrice.org/tmp/test.phps
[00:04]<su2ogn>like if its the first element i add
[00:04]<su2ogn>will it still work?
[00:04]<rfvr>$arr needs to be an array
[00:05]<sczznczjw>does anyone here know anything about cookies?
[00:05]<zjdrgstgw>alta... inside something like ereg_replace() you could reference the first set of parenthesis as "\\1" in the replace with paremeter... with something like ereg() you can store the matches via the matches paremeter i.e. ereg("match me",$based_on_this_string,$store_matches_here);
[00:06]<rfvr>could you give me an example i.e. using the text I provided please?
[00:06]<glxrsn>Monkey_b: can you show me an example
[00:06]<rfvr>SkareCrow: I know enough. Ask your question and you'll find out what people know.
[00:07]<zjdrgstgw>the preg functions have similar methods... just read the manual (php.net/ereg , php.net/ereg_replace, php.net/preg_match , php.net/preg_match_all, php.net/preg_replace )
[00:08]<sczznczjw>alta, i have asked the question
[00:08]<sczznczjw>http://pastebin.com/743572 Why is it that these cookies aint being set to null when i request them. the only one that actually sets the value to null is the if ($_POST['userLogout'] != "") and that will log you out. but all the other ones will not work correctly...
[00:10]<sczznczjw>if you look at lines 35 + 36 you will see im trying to set the values to null but it isnt doing anything... but.. if you look at line 50 that one works just fine...
[00:11]<zjdrgstgw>preg_match("/how do I get (.*?) from this string/", "how do I get THIS from this string?", $matches); .... $matches[1] == 'THIS'
[00:12]<rfvr>thankyou very much :)
[00:12]<rfvr>SkareCrow: are you sure the setcookie line is being executed?
[00:12]<sczznczjw>yes
[00:13]<sczznczjw>i think..
[00:13]<sczznczjw>its the same exact line as line 50
[00:13]<sczznczjw>and i have stuck in a small echo
[00:13]<sczznczjw>to see if it goes inside that small block
[00:14]<rfvr>the one that works changes the page location which is required for the values to update. Are you checking if the cookie has been set without a browser page reload first?
[00:15]<sczznczjw>hld on
[00:15]<sczznczjw>i dont know why that would matter...
[00:15]<sczznczjw>it is unsetting the cookie
[00:15]<sczznczjw>that cookie shouldnt expire unless someoen tells it to
[00:16]<sczznczjw>so redirecting it wont unset that cookie value
[00:16]<rfvr>the php script doesn't treat the cookie's value as changed until the next page request
[00:17]<sczznczjw>if i redirect that one it tells me that the server is incountering problems redirecting
[00:17]<sczznczjw>in firefox
[00:17]<glxrsn>anyone know of a parser thatll translate xml into variables in php4?
[00:17]<sczznczjw>meaning the script is redirecting over and over
[00:17]<sczznczjw>the script goes into a loop cause its not unsetting the value
[00:17]<sczznczjw> setcookie("warpedUser", null, time() - 7200, "/", "", "0");
[00:17]<sczznczjw> header("Location: scripts.php");
[00:18]<sczznczjw>its not setting it to null
[00:18]<sczznczjw> setcookie("warpedUser", null, time() - 7200, "/", "", "0");
[00:18]<sczznczjw> echo $_COOKIE['warpedUser'];
[00:19]<sczznczjw>this will echo out the value of warpedUser
[00:19]<sczznczjw>whitch is what i set it to by hand
[00:19]<sczznczjw>a9s8df <-- thats what it echoed out
[00:19]<sczznczjw>warpedUser=a9s8df <-- thats my cookie
[00:19]<rfvr>that's because the value of $_COOKIE['warpedUser'] doesn't change until a page reload!
[00:19]<rfvr>try setting FALSE or '' as the value
[00:19]<rfvr>rather than null
[00:20]<sczznczjw>but alta...
[00:20]<sczznczjw>grr
[00:20]<sczznczjw>you dont understand
[00:20]<yvzn2rf>?
[00:20]<sczznczjw>it isnt setting it i have reloaded the page after doing that
[00:20]<sczznczjw>and the script keeps redirecting
[00:20]<sczznczjw>over and over and over and over
[00:20]<glxrsn>no one?
[00:20]<sczznczjw>because the cookie's value hasnt changed
[00:20]<yvzn2rf>dont use null
[00:20]<rfvr>maybe that's because you're using the value null
[00:20]<rfvr>and why I said try FALSE or ''
[00:20]<sczznczjw>null works just fine for the bottom one...
[00:21]<glxrsn>itrebal: know of a parser thatll translate xml into variables in php4?
[00:21]<svgg_vb>moin
[00:21]<svgg_vb>oh, hi
[00:21]<yvzn2rf>nphase: no
[00:21]<yvzn2rf>sorry
[00:21]<glxrsn>hmm
[00:21]<glxrsn>i wonder if i can find an html tree parser
[00:21]<yvzn2rf>DOM, maybe - with some work
[00:21]<sczznczjw> setcookie("warpedUser", "", time() - 7200, "/", "", "0");
[00:21]<sczznczjw> header("Location: scripts.php");
[00:21]<sczznczjw>still goes into the loop
[00:22]<sczznczjw>keeps redriecting over and over cause the value hasnt changed
[00:22]<sczznczjw> setcookie("warpedUser", null, time() - 7200, "/", "", "0");
[00:22]<sczznczjw> header("Location: index.php");
[00:22]<sczznczjw>but that one works fine
[00:22]<yvzn2rf>your trying to *unset* the cookie there
[00:22]<glxrsn>itrebal: all i want is like <this><that>value</this></that> to be $xml['this']['that'] == "value";
[00:22]<yvzn2rf>nphase: simpleXML?
[00:22]<glxrsn>itrebal: php4
[00:22]<yvzn2rf>oh, i dunno
[00:22]<sczznczjw>itrebal. i know this
[00:22]<yvzn2rf>alright
[00:23]<sczznczjw>i doesnt even execute this unless warpedUser is set
[00:23]<sczznczjw>if (isset($_COOKIE['warpedUser'])) {
[00:23]<psnumjpfran2j>Hi, I'm (really) new to PHP. I want my script to only repeat a request a set number of times (5). But I'm not sure how to do it.
[00:23]<psnumjpfran2j>My source is here: http://truth.pastebin.com/743652
[00:23]<sczznczjw>it shouldnt even enter this block after i redirect it
[00:23]<yvzn2rf>SkareCrow: whats your error reporting?
[00:23]<sczznczjw>there is no errors







