logs archiveIRC Archive / Freenode / #php / 2006 / February / 13 / 1
sketch|work
preg_grep .. if i have something in $delim (it actually = "\""), how can i put that into the match string? "/\$delim.*\$delim/"; ?
bugzElMagnifico
Jymmm? I found a not so updated version of the thing here... want to have a look?
ModestLife
hi
Laban
Hi
ModestLife
i need your help, guys ;-)
Laban
Shoot.
ModestLife
i've an array with several IDs in it -> 0->1, 1->5, 2->3, 3->1 ... and so on. as you see, some ids occur more than once. now, i wanna to know how often, every id occurs in my array and than sort this by its occurrence
erm, bad english ... i hope you understand ^^
Laban
Yepp, understand.
ModestLife
any idea? i'm at loss ... ;-)
         

rares000
is there a way to trace execution of each function as it gets called?
ptlis
What is the purpose of the tilde operator (~) in PHP?
bugzElMagnifico
ModestLife, run through the array, creating a second array with this structure($ar[id]=count) then sort that array
ugarit
ptils: regex equality
ModestLife
bugzElMagnifico: already tried something in this direction ... i'll try it again! thx!
ptlis
ugarit, I just pulled out a reference book, and apparently it's actually bitwize not. Thanks anyway.
Kyle_S
OI OI.
bugzElMagnifico
ModestLife, try a loop with something like : $ar[$id]=isset($ar[$id])?$ar[$id]++:1;
Kyle_S
Silly Q about the new DOM api (ok new to me)
I've sucessfully loaded an xml file via DomDocument->load(); and have my grubby hands on the object. How shall I go about accessing my xml files guts now?
Darkstar
is there a way to use php to check the size of a file after it has been uploaded to the server, everything says not to trust $_FILES['userfile']['name']
err $_FILES['userfile']['size']
Stormchaser
filesize($_FILES['userfile'['tmp_name']);
Souvent22
do a check on the temp file.
yeop, Stormchaser 's code will do it.
Darkstar
sweet, thanks
Jymmm
~~~~~
Stormchaser
Jymmm: :P
MorpheusNyix
Question: Anyone know if its possible to start a wile loop with a functioncall and end it with a function call
IllegalC0de
i got a problem with my MySQL server and i was wondering if anyone here could connect to it its at http://mysql5.streamline.net/phpmyadmin/
cause i cant seem to:/
Stormchaser
(Action) changes the root password on that one
newpers
i'm doing my form validation all via php, the problem is that i have so many option selections. so, i have to test each option for the value and if true then echo selected. this is very tedious. there's no shortcut, is there
claudio`
:-)
         

newpers
w/o setting up a db
Stormchaser
newpers: Make a loop, and compare the options.
newpers: A hint: 'array'
newpers
(Action) is thinking about this :)
Stormchaser
(Action) hears rusty wheels squeel
newpers
heh
Stormchaser
s/wheels/cogs/
newpers
ok,i got it
what a pain. i have like 20 selects and an average of 10 options pers slect
PinceI
what is the best possible way of dealing withspecial chars on filenames like this: !$%&()=@£§{}[]'´`~^«»,;.-_+.áàâã.txt
it is a valid name, by the way
bugzElMagnifico
PinceI, get rid of them?
joh
PinceI: Unicode
PinceI
bugzElMagnifico, yes, or replace or something. i'm looking for a command or a function with commands. i know there are a couple but i'm not sure if there is only one to do it
if you try to upload that file, for instance, it will get locked on your shell
DjDarkPingvin
hy ,how i`m writeing a visiter tracker script ,and i`m getting very few browsers and referrers ,why is that?
bugzElMagnifico
PinceI, you want to strip the special chars from a file name? use a regexp
PinceI
bugzElMagnifico, so i need to know them all, before doing it... no PHP command to do that?
bugzElMagnifico
PinceI, no... do the opposite...
PinceI
bugzElMagnifico, to do with regexp i need to know all special chars, isn't? that's what i were saying
bugzElMagnifico
PinceI, do a negative check. Allow only numbers an letters in names. Hence, anything that is not a number o letter must be replaced
PinceI
ahh ic :)
i see, i mean :P
thank you bugzElMagnifico :)
bugzElMagnifico
No problemo
PinceI
problema :)
bugzElMagnifico
Kein problem?
IllegalC0de
can anyone tell me the strip slashes command please?
bugzElMagnifico
stripslashes?
InterLNK
stripslashes
?
PinceI
stripslassehs addslashes
ak, stripslashes
IllegalC0de
what do i put stripslashes[something here?]
InterLNK
:|
( )
IllegalC0de
stripslashes();
bugzElMagnifico
php.net/stripslashes
IllegalC0de
ok
PinceI
IllegalC0de, you have examples here http://php.net/function.stripslashes.php
IllegalC0de
ok thanks
snow_ru
hi
/**
* Constructor
* @param string A prefix for mark messages
*/

sorry
Stormchaser
*blink*
snow_ru
But What is the usage of that comment style ?
It helps ?
Stormchaser
yes
nforbes
It's called javadoc
IllegalC0de
so how do i make it so users cant run sql commands through an input box?
snow_ru
I meant is there any program that automatically recognize it ? ( I want to create an API for all classes in a file
nforbes
http://www.phpdoc.org/ for PHP
Stormchaser
www.php-doc.org
bugzElMagnifico
IllegalC0de, are you sure you want that?
nforbes
Java has a parser packaged iwth it
IllegalC0de
i dont want my users info to be got from the database by someone by typeing in an sql command in say the username login box etc
olger901
is there a way when running an if to clear the screen for example if($_GET['test']=="yup"{
and clear the screen in the code below
IllegalC0de
cause i know it has been done in the passed to some sites
ModestLife
when the keys in my array aren't serially numbered and then i sort it, get the keys re-numbered?
IllegalC0de
olger901: yes
bugzElMagnifico
IllegalC0de, ahh sorry.. I read *can* instead of *cant*....
olger901
IllegalC0de: how?
as I couldn't find it in the manual
bugzElMagnifico
IllegalC0de, this might help: php.net/mysql_escape_string
nforbes
olger901: That's a client-side thing. You'd need Javascript. Check #web
IllegalC0de
$test = $_GET['test']; if ($test == "yup") { the statment }
try that olger901
ModestLife
olger901
thats not what I meant, I mean index.php?test=yup is a page, and if it loads that page, it should clear the previous page
Jymmm
lig can you get any ass, err... I mean glass where your at?
IllegalC0de
oh ok
olger901
so is that possible?
IllegalC0de
olger901: what do you mean by 'clear the previous page'?
lig
Jymmm: Ass - of course... military town there is always some one available... Oh . Oh - you mean glass... Hmm
nforbes
Hm
olger901
clear the contents of the previous page
nforbes
Do I need a hardware abstraction layer or a system message bus?
olger901
I got 2 pages index.php and index.php?test=yup, but when test=yup is loaded it shouldn't display the contents of index.php it's self
which it does
Gorbulas|iBook
hello
Jymmm
lig well, you have a sweet ass, but I'm talking the stuff that you see yourself in
nforbes
pix?!!
lig
Jymmm: why thanks... and I beleive it all has to be imported - glass that is. :D
Gorbulas|iBook
is it possible to set a cookie when sending an image file?
will it get blocked by IE or whatever?
nforbes
Gorbulas|iBook: We're talking about ass here. This isn't a PHP channel
Jymmm
lig well you suck... in a good and bad way.
IllegalC0de
olger901: dont know unless i saw the code for index.php i wouldnt know
lig
Jymmm: well - of course
Gorbulas|iBook
There is a forum where I can only have one image in my signature, but I want to have two, and I want both of them to link to a different page
Jymmm
heh... "Do not use this product if under the influence of alcohol or drugs."
Gorbulas|iBook
eww& more lag on freenode
nforbes
Jymmm: My friend has a hairdryer that says "Do not use while sleeping"
Jymmm
Well, this statement eliminants most of you in here --> The warnings, precautions, and instructions discussed in this manual
cannot cover all possible conditions and situations that may occur. The operator
must understand that common sense and caution are factors, which cannot be
built into this product, but must be supplied by the operator.
Gorbulas|iBook
does anyone know if it is doable?
stedios
anyone use printshop? from broderhund?
Jymmm
nforbes : Do you realize how many have actually placed the hair dryer next to them in bed - it's scarry.
bugzElMagnifico
stedios, That still exists?!
Darkstar
is there a way to get the width/height of $_FILES['userfile']
Jymmm
bugzElMagnifico: Yes.
nforbes
Jymmm: Not really
Jymmm
nforbes remember McDonalds hot coffee
nforbes
Jymmm: But I am aware now
bugzElMagnifico
I used to use that on the old apple ][+
Jymmm
iirc darwin awards.com
(Action) frames lig
Gorbulas|iBook
I know it must be possible to send a cookie with an image file, but I don't know if that will be blocked by web-browsers because advertisers abuse it
maybe #web would know&
« 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 next »