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: 1952.29 MB
Powered by
Channel Info
Network: freenodeChannel: #php |
Search in www.irclog.org
Log from #php at freenode 2006-06-05
[10:09]<zu22gzggac>asdx: $row[0] . "-" . $row[1]
[10:09]<rsmw>Rubberneck: awesome! thx dude
[10:11]<rsmw>where it says <??> will be unsupported in the future?
[10:11]<djjfyrxv>possible php6
[10:11]<nv>it was decided not to remove it in php6
[10:12]<zu22gzggac>moolight: last i heard it was still going to be on in php6 <% will be completly gone though
[10:12]<djjfyrxv>:)
[10:12]<fyr>later all
[10:13]<rsmw>coldfusion uses <??> ??
[10:13]<sugmnv>yea, and i think javabeans or something like that does too.
[10:15]<rsmw>ok
[10:17]<nv>that problem is only academical, chances that you want to process the same file with both php and coldfusion are practically zero
[10:17]<sugmnv>that's the point.
[10:17]<cm2nzmrm>how to join some string, so will be like this: string1, string2, string3 ? http://pastebin.com/759197
[10:17]<mpjgmr>asdx, <? probably will still be supported in php6, but it is possible it won't. Either way, it is a good idea to use <?php instead of <? because it is a setting that can change from server to server. <? will not work on servers with short_tags set to off, and if for some reason your servers admin changes it, your code won't work. But honestly, it really isn't a big deal
[10:18]<eyzau>that is why using
[10:18]<zu22gzggac>CyberMad: "string1" . ", " . "string2" . ", " . "string3";
[10:18]<eyzau><?php isn't a big deal either
[10:18]<mrg__v>Hi.
[10:19]<mrg__v>Do I need to do something special when running two queries with the same resource?
[10:19]<cm2nzmrm>Rubberneck thank you :)
[10:19]<rnmsxypv>hi
[10:19]<eyzau>heh.. my shift key is to close to the enter key
[10:19]<mrg__v>I need to insert something, then select the id of that last insertion, then use that against another query
[10:19]<rnmsxypv>how long does it take to compile php on a pentium 166 Mhz?
[10:19]<eyzau>RedShift: a little while
[10:19]<cm2nzmrm>Rubberneck sorry, there is "for next" i guess your solution is different
[10:20]<rnmsxypv>it's now at zend_operators.lo
[10:20]<rnmsxypv>long to go?
[10:20]<eyzau>i could build a 166mhz computer for you and test it
[10:20]<cm2nzmrm>$joinword = $joinword + $temp_ToCi_Name[$i] + ", "; ?
[10:20]<rsmw>Rubberneck: I did that but I get $row[0] - $row[1]----------
[10:20]<sczznczjw>is there a PHP function to download a file
[10:20]<rnmsxypv>no that's fine thank you :-D
[10:21]<eyzau>SkareCrow: php.net/curl or use php.net/exec
[10:21]<cm2nzmrm>but it return 0 :(
[10:21]<sugmnv>cybermad: re-read rubbernecks answer.
[10:21]<zu22gzggac>asdx: do you not have 10 rows?
[10:21]<sczznczjw>zircu, i dont want to get the contents. i want it to get an image. say if someone gives me a link to an image it will download the image and save it to a file
[10:21]<sczznczjw>folder*
[10:21]<cm2nzmrm>sundev ok
[10:22]<sugmnv>do you see any plus signs in his answer?
[10:22]<rsmw>Rubberneck: I have only 1 row on the db
[10:22]<zu22gzggac>asdx: then why loop though it 10 times ?
[10:22]<eyzau>SkareCrow: curl will do that, oh there is just the simple fopen('http://host/path/to/file', 'r') method as well
[10:23]<sczznczjw>fopen will do this with images?
[10:23]<sczznczjw>i will try it
[10:23]<eyzau>SkareCrow: what is an image? a file...
[10:24]<rsmw>Rubberneck: becasue I will have more rows and I want to show just 10
[10:24]<eyzau>the fopen() requires fopen_wrappers enabled and safe_mode off
[10:24]<cm2nzmrm>thanks Rubberneck and sundev, it should . not +
[10:24]<cm2nzmrm>:)
[10:24]<zu22gzggac>asdx: limit your query to 10 and then do a while loop instead of the for
[10:24]<sczznczjw>i was just here to see if there was a function just for that
[10:24]<rsmw>ok
[10:24]<sczznczjw>i guess i will use fopen and fwrite
[10:25]<rsmw>why while and not for?
[10:25]<rsmw>isn't the same?
[10:25]<zu22gzggac>asdx: no
[10:25]<rsmw>uhm
[10:26]<eyzau>SkareCrow: if you have php5 you can just use file_put_contents()
[10:26]<sczznczjw>and file_get_contents()
[10:26]<sczznczjw>i will try that
[10:27]<zu22gzggac>CyberMad: your going to end up with "string1, string2, string3," if you do it like you have it setup though
[10:29]<rsmw>shit i never used while
[10:29]<azdjzyaas>Just make it a for loop.
[10:29]<azdjzyaas>And forget the for part of it.
[10:30]<azdjzyaas>Then it's a while loop.
[10:30]<rsmw>how?
[10:30]<rsmw>while(true)
[10:30]<rsmw>or something?
[10:31]<-- dvxn|syzzzyus xzs>http://www.bagdadsoftware.de")
[10:31]<azdjzyaas>Yep.
[10:31]<eyzau>there is a page in the php.net/manual describing loops
[10:32]<rfnas>zircu: try to look for "for" syntax and "while"
[10:32]<rsmw>it dosn't work. it loads forever.. <? while(true){ $row = mysql_num_rows($query); echo $row[1]; }?>
[10:32]<rsmw>k
[10:33]<eyzau>alecs: sure it is is in language Reference topic
[10:35]<eyzau>oh, here we go php.net/manual/en/control-structures.for.php and php.net/manual/en/control-structures.while.php
[10:35]<eyzau>better yet just go to php.net/manual/en/language.control-structures.php
[10:36]<vws>Is it possible to get the expire time of a cookie -that we've set previously, from our PHP script?
[10:36]<eyzau>for and while loops are basic concepts, i dont know why you ask me to find them for you
[10:37]<eyzau>tws: not really
[10:37]<vws>asdx: while (true) { } ... What do you expect, eh?
[10:39]<azdjzyaas>asdx: It's waiting for 'true' to be evaluate to 'false'.
[10:39]<azdjzyaas>asdx: You've done for loops. This isn't much diffrent.
[10:40]<rexy_drxrcr>hi
[10:41]<rexy_drxrcr>i'm trying to store passwords on a safe way, i have heard a lot of methods and i think that this one is not that dumb but it's pretty secure
[10:42]<vws>Azhi_Dahaka: Hash the original password and user ID.
[10:42]<rexy_drxrcr>using the username as salt
[10:43]<rexy_drxrcr>i'm trying this:
[10:43]<rexy_drxrcr>$salt = uniqid(); $newHash= str_shuffle(uniqid()).sha1($password.$salt).$salt;
[10:43]<rexy_drxrcr>then store $newHash on db
[10:47]<eyzau>Azhi_Dahaka: that seems resonable, the $salt is a good idea
[10:48]<eyzau>i'm not sure about the str_shuffle() need thogh
[10:48]<eyzau>though*
[10:49]<vws>Isn't uniqid() will generate different value everytime it's called?
[10:49]<rexy_drxrcr>yep
[10:50]<rexy_drxrcr>different, but if starts by some similar characters







