logs archiveIRC Archive / Freenode / #php / 2006 / March / 29 / 1
TML
makzu: What's the issue?
philip
itrebal: so, does removing the experimental tag sound reasonable to you?
ver_work
Say I have $hi = array("greet" => "hello", "leave" => "bye"); ($bye array like $hiarray); $2d = array("hiarray" => $hi, "byearray" => $bye); I want to strip down $2d (without knowing hi or bye explicitly) so I can access the internal arrays by $hi and $bye again
I guess the extra layer of dimensionality just confuses things
philip
krisp: please stop asking this question over and over
itrebal
philip: well, i dunno, its not compiling for me (valid, i'm on php6)
makzu
TML: whenever I run it while trying to build this module, I get an error message telling me that AC_PROG_LIBTOOL is an undefined macro
TML
makzu: That should be a harmless warning that you can safely ignore, IIRC
philip
makzu: php.net/anoncvs lists various info of tools required to build php, including version numbers
TML
makzu: Does phpize continue to run, or does it stop?
         

philip
not that i know if this is an issue with you
makzu
TML: it stops.
TML
makzu: What OS/Distro?
ver_work
I guess you could just say $array = new array("hi" => "hello, "bye" => "later"); and how would I take that array and get $hi and $bye out of it without knowing them beforehand?
makzu
Red Hat Enterprise 4 AS
Kevin`
$hi=$2d['hiarray']
philip
ver_work: extract() ?
Annh
hi, question: i have a site that will be used alot (hopefully) and i have a few variables (lets say maby 400k worth) that will almost never change. Question is, what's best and fastest for php, put this in a include file, or put them in a database?
TML
makzu: Check your version of automake against the list philip pointed you to.
ver_work
philip: HAH thank you so much
Exactly what I was looking for
TML
ver_work: Or array_keys()
philip
or foreach and variable variables :)
TML
So many ways. :)
itrebal
i think i'm about to release my PHP Proxy code
philip
maybe we can come up with one that uses eval() :)
Kevin`
php proxy? what's that
itrebal
Kevin`: whats the name of it? a PHP Proxy
Annh
guys, cand you help me out with my question / problem?
p0windah
Annh: no, piss off
Kevin`
itrebal proxy for what
         

itrebal
Kevin`: web-based
Kevin`
'php proxy' could be many things
Ahroun
annh: What is the nature of what you're storing?
makzu
TML, philip: there's my problem. Thanks for the help
Kevin`
so php based http proxy
itrebal
sure
walterwo1
TML: What does TML stand for?
Annh
mainly multidimentional arrays, stuff like properties for different objects (can easily be stored in a mysql db just wandering if i should, or just put them in a file)
Kevin`
connect to it like a normal proxy server?
Ahroun
I'd prolly DB it then
itrebal
Kevin`: no, those are blocked some places.... http://domain.tld/proxy.php?url=...
ver_work
Well I guess along those same lines I was wondering if you can create variable names on-the-fly, something like $(tmp . $counter) = 3; echo $tmp1 returns 3?
when $counter=1
philip
yes you can
Kevin`
ooh neat.. it mangles the urls from the resulting page to go to the proxy too?
itrebal
Kevin`: absolutely
Kevin`
POST supported?
Annh
ver_work: $tmp[$counter] = 3; echo $tmp[1]; will show 3
philip
ver_work: but typically an array is more appropriate ;)
itrebal
yea
Kevin`
nice :)
itrebal
took alot of work, but yes
ver_work
Yeah without using arrays :D
I'm working with a weird API
itrebal
heh i found a minor issue
philip
ver_work: thse are called variable variables
ver_work
OK thanks I'll look em up
philip
ver_work: use { } instead of () there
ver_work
Worked like a charm, ty again :D
I'm digging this PHP business
Stormchaser
(Action) gives ver_work a shovel
itrebal
(Action) gives ver_work a pair of gloves
BearPerson
(Action) gives itrebal a helmet
The_Fed
What does this mean? Warning: stristr(): Empty delimiter.
itrebal
thanks
empty delimeter
delimiter*
The_Fed
Excuse my noobish state, but what is a delimeter again?
itrebal
a thing that delimits
Kevin`
hah
BearPerson
the string you're splitting with / searching for
itrebal
"The "divider" character, often a comma, between separate fields in database records. It is a special character that indicates a record or field boundary within a text stream, rather than being interpreted as an actual part of the text itself."
sylow_
like ; in a csv file
The_Fed
Oh, right. Gotcha
(Action) Needs coffee.
^Migs^
hmmm, vbulletin stores image data directly in the db. I wonder how it does that
itrebal
odd, my proxy stopped doing headers
Stormchaser
what does it do now, itrebal? Footers?
itrebal
Stormchaser: yea
Stormchaser
lol
itrebal
its really pissy about it too
minDscrm
^Migs^ really?
^Migs^
seems like it, for custom avatars at least
clyrrad
philip you still here? I found the problem
minDscrm
vbulletin is a website?
^Migs^
no, commercial PHP forum
minDscrm
ah okay
it's a product then
^Migs^
I'd like to know both how it does it, and why it does
itrebal
^Migs^: that is accurate, and it is a BITCH to backup on a popular website
^Migs^
yeah, no kidding
minDscrm
sounds like it would cause lots of overhead p roblems
^Migs^ not that i know anyting, but you think it stores just the binary data?
^Migs^
I really like how vbulletin is coded, though. It's pretty clean.
it looks like that, minDscrm
I'm just thinking codewise, how you'd extract it, and whether it's really worth it
Stormchaser
Pollita LEFT the channel? That's odd...
minDscrm
i think for organizational purposes storing images in the database is nice.... but i don't know how much of a headache that is... plus your not going to be running any analysis persay on the binary code of the images with the database itself.. hence nulling the usage of a database.
itrebal
(Action) had an entirely database website except for a single index file
minDscrm
but.... maybe it's beyond the 'analysis usage of the database'... like post rock and post punk.. it's kinda, post-database.. heh
itrebal, i think that is rad
emence
how can you append a 0 on a number thats less than 9
like 01
02
and so on
Stormchaser
!+enter\
!+enter
Dragnslcr
http://www.php.net/str_pad
php-bot
Don't use the enter key as puncuation. Think in complete thoughts, then type.
minDscrm
str_pad rules !!
emence
Dragnslcr, thanks
itrebal
minDscrm: it was because of a terrible host, didn't give any filemanager except for terribly slow FTP, so i decided to use database for it
Stormchaser
minDscrm: ninjas rule too, but that doesn't mean, that they'll be included in PHP6 >:)
mikearthur
can someone help me make a PCRE for "[link=Fish]fish are creatures that live in the sea[/link]"?
minDscrm
Stormchaser :) atleast str_pad will
ndnet
if($ninja instanceof Ownage){ echo "Tautology"; }
itrebal
/\[link=(.*?)\](.*?)\[\/link\]/ i think
mikearthur
cheers
minDscrm
PCRE ?
Stormchaser
yes
minDscrm
wtf is t hat
mikearthur
perl compatible regular expressions
itrebal
!+pcre maybe?
minDscrm
aah
Stormchaser
!+pcre
php-bot
[PCRE] Perl Compatible Regular Expressions - See http://www.php.net/pcre
minDscrm
ok
jesus.. there is so much to learn
itrebal
indeed
pyxl
oh yes.
that there is.
itrebal
regex === God if use correctly
Ahroun
but... but... I believe in regex...
sylow_
god is hard to understand, itrebal :)
Coeus82
how do i use pear to install a package on my server rather then from the web
itrebal
sylow_: it was a double meaning :D
sylow_
yeah :-)
retroneo
what does this function do :
function grep_keys($pattern, $array) { $tmp = Array();
while( list($key, $val) = each($array)) {
if(preg_match($pattern,$key)) $tmp[$key] = $val;
} return $tmp; }
itrebal
!tell retroneo about pastebin
ficusplanet
Hey everyone. Does anybody know if Zen Cart is compatible with PHP5? And whether is requires that register_globals be turned on?
Stormchaser
retroneo: You mean you don't know, what your code does?
Pollita
retroneo: It copies all the elements of $array for which their corresponding key matches a regular expression pattern
retroneo
it's not my code, I'm taking over someones project
Stormchaser
ficusplanet: This isn't Zen cart support channel. Ask somewhere else.
itrebal
(Action) has a HUGE table of proxy-logs
Stormchaser
retroneo: You mean you don't know logic?
« 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 next »