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-07-17
Pages: < Prev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Next >
[06:23]<mjvyza1q>KimmoA ne ideas?
[06:23]<alnr>the problem seems to be your expectations.
[06:23]<alnr>just sayin
[06:24]<kyddja>If you are such sh masters, how come you don't know how to do that for loop?
[06:24]<rvsurgrd>I gave you an example, and you complained that it was C syntax...
[06:25]<rvsurgrd>read this page then come back: http://www.tldp.org/LDP/abs/html/loops1.html
[06:25]<alnr>in particular, complaining about having to enumerate a list like "for i in 1 2 3 4 5" seems ... very random. That's how you enumerate lists.
[06:25]<kyddja>sh doesn't support C-style for loops, unless I'm completely mistaken.
[06:25]<kyddja>jpeg: Why don't they show how to make an actual loop?
[06:26]<alnr>who knows? figure it out.
[06:26]<alnr>who's 'they'?
[06:26]<alnr>what are you reading and complaining about?
[06:26]<kyddja>What do you think?
[06:26]<kyddja>Perhaps making a for loop in sh?
[06:27]<ayzzsvnz_>Who the hell started all this sh shit?
[06:27]<alnr>what are you reading and complaining about?
[06:27]<kyddja>OK. Obviously you're totally uninterested in actually helping.
[06:27]<alnr>it's a simple question. what are you reading?
[06:28]<ow9w9792>is there any serializer() will produce binary
[06:28]<kyddja>The man page and four billion crappy Web guides?
[06:28]<alnr>and yes, I'm rapidly losing interest. good luck.
[06:28]<rrrddns>is there a function that 'flattens' a recursive array?
[06:28]<kyddja>You never had any interest in anything other than being a wiseass.
[06:29]<tdqwo>$result = shell_exec('ipfw show');
[06:29]<tdqwo>$parsed = explode(\n,$result);
[06:29]<tdqwo>is there an easier way of doing that
[06:29]<tdqwo>(the explode doesnt work)
[06:30]<tdqwo>i know
[06:30]<gavaasx>quotes around the \n
[06:30]<tdqwo>ok
[06:30]<avjaxnfd>double quotes
[06:30]<gavaasx>$parsed = explode("\n", $result);
[06:30]<rrrddns>"\n"
[06:30]<rrrddns>is that the result you're looking for?
[06:32]<mjvyza1q>what's a very simple way of opening a url from command line?
[06:32]<rvsurgrd>curl
[06:32]<tdqwo>yes cjaymes
[06:32]<rvsurgrd>lynx
[06:32]<rrrddns>in what operating system? what browser?
[06:32]<mjvyza1q>lynx url?
[06:32]<rvsurgrd>lynx is a basic text based web browser
[06:32]<mjvyza1q>a very customized version of linux use by godaddy
[06:33]<gavaasx>haha
[06:33]<tdqwo>ok next question: is there an easy way of breaking up the data within the following string: 11001 13026 949661 count ip from any to any uid tm218 out
[06:33]<rvsurgrd>dotirc32, lynx is a web browser, available on a lot of *nix based OS, as it is handy
[06:33]<tdqwo>(the spaces are not always the same)
[06:33]<tdqwo>so i dont know if i can explode it
[06:33]<wuewe>what defines failure/s
[06:33]<mjvyza1q>what the syntax for it
[06:33]<rvsurgrd>lynx [web address]
[06:34]<mjvyza1q>no quotes?
[06:34]<rrrddns>Tm218, you probably want a regex to run the lines through
[06:34]<rvsurgrd>if your trying to do it in PHP, then look at the PHP Curl functions
[06:34]<mjvyza1q>what i wanna do is to actually run that command from php
[06:34]<tdqwo>good idea cjaymes :)
[06:34]<rvsurgrd>Tm218, use a regex to chunk a line up on whitespace
[06:34]<mjvyza1q>oh
[06:34]<tdqwo>ty
[06:34]<rrrddns>something like /(\S+)\s+.../
[06:34]<rvsurgrd>dotirc32, do you want the content of the page requested?
[06:34]<wuewe>i want to test an assignment, ie assign a value to the result of a function AND test that it was assigned OR failed; what do i need to return from my function? is it (a) return -1 ; (b) return ; (c) return false ; (d) ???
[06:35]<wuewe>(no i haven't got a multi-choice test in front of me)
[06:35]<v2r2dd>Hello guys
[06:35]<mjvyza1q>atsugnam no
[06:35]<mjvyza1q>atsugnam i just want the page to be run byt itself
[06:35]<rvsurgrd>xur1z, to test for the assignment, try doing: if($result = function_name()){}
[06:36]<rrrddns>maybe...! is_null(($x = $y))
[06:36]<mjvyza1q>atsugnam what um trying to do is to find a work around for not having thread in php
[06:36]<wuewe>atsugnam: thx, yes that's what i'm doing (with an ldap lookup) - but what should the function return to fail correctly
[06:36]<rvsurgrd>dotirc32, if you want to then just pass the content of the page back to the user's browserr, then use curl, it's simpler to do that...
[06:36]<rvsurgrd>don't return anything
[06:36]<wuewe>atsugnam: should it be false, or -1, or NULL, or just 'return;' ?
[06:36]<wuewe>the last then, not even return NULL;
[06:37]<mjvyza1q>atsugnam what i want is a thread like functionality in php any ideas how to accomplish that
[06:37]<rvsurgrd>or, follow some standards, use out of band signalling, eg, return an array if successful, and a string or int if not....
[06:37]<wuewe>thx, that's what i've been doing but wanted to confirm. i can't find this in php docs cos i don't know the term to search for :)
[06:37]<rvsurgrd>xur1z, test it out
[06:37]<rvsurgrd>I'm not 100% sure on the behaviour in that
[06:37]<rvsurgrd>not really dotirc32
[06:38]<wuewe>atsugnam: yes, it works, but i wanted to confirm with someone who knew; i know there are some gotchas where -1 == false etc. don't want an SQL result tripping it up.
[06:38]<mjvyza1q>ok
[06:38]<wuewe>cheers atsu
[06:38]<rrrddns>isn't there a < > operator in php?
[06:38]<gavaasx>!=
[06:38]<2zyzgvudjz>hi
[06:38]<rrrddns>no, the 'line' operator
[06:39]<rrrddns>I dunno what it's really called
[06:39]<2zyzgvudjz>what function do you use to report an error?
[06:39]<v2r2dd>i got a question what would be the easiest way to do this so i have a SEF URL HTTP://test.com/news/2/3/120, if i do this then none of my pictures or CSS links work because they try to look in the Dir of /news/2/3/120 for the links. How could i make them look in to the root Dir whit out suing absolute paths
[06:39]<gavaasx>briantumor: use exceptions if yr using php5
[06:39]<2zyzgvudjz>php following java trends now?
[06:40]<rrrddns>so, in perl I would use the line operator so: @file = <FILE>;
[06:40]<gavaasx>briantumor: uh, sure?
[06:40]<wuewe>vbabiy: you want to use some mod_redirect magic to find the images in your directory
[06:40]<mzzcl>vbabiy: Use /foo.css /foo.png etc .. the / refers to your DocumentRoot
[06:40]<rrrddns>briantumor, considering I can't think of one trend that java started, I guess
[06:40]<rvsurgrd>xur1z, read the comments on the return page on php: http://au3.php.net/return
[06:41]<wuewe>thanks atsu! wicked
[06:41]<v2r2dd>MarkL, can you explain that more
[06:42]<rrrddns>huh







