Domain Search | www.


Related Pages:

If i setcookie to expire in the past the browser should kill the cookie well my script cant find the cookie anymore
Current app im working on has a MM relationship between sherpas and the territories they cover currently the app
Random question someones asked for some example php code which i dodnt have to hand however i could code some







lol

whoops i think i timed out

what is mysql_field_len then?

did anyone get my last question, i dont want to spam

what is the 'field' ?

oh screw it, whats the proper way to not pass variables to a function in arguments (and thereby use the defaults, like if foobar takes 4 arguments, could i do foobar($input1, , , $input4);

Nemesis, you could do that, but i would probably do something like foobar($blah,NULL,NULL,$blah2)

Seventoes, im not against that but would that actually set the vars the function uses to null or would the function take it as unset and use the defaults?

i belive the function would use the defaults

and by defaults, im doing function foobar($arg1 = 'defaultvalue') {

you can't "just leave out" arguments, if you want to do that, pass in an array

ok

and_values ) );

then within foobar, you use array_merge to set up the default values for the omitted options

Would there be any benefit to storing gzipped files such as images and pages that would normally be dynamically compressed and then serving those if the UA allows it? I can see this as being beneficial.

is there a way to make a Linux php host use a SMTP server specified in php.ini instead of invoking sendmail ?

images are already compressed, and i'm not sure that the maintenenece on them would be worth it, because you'd still have to unzip them for agents that won't accept compressed ones
!tell _tfr_ about mail()

i'm actually using a library i found a while ago that does all sorts of stuff

!tell Subman about Arrays

but unfortunately, it ends up composing the message and sending it using mail() :p

does that library support SMTP?

anything that would normally be compressed by the gzhandler. Disregarding the maintenance. I am thinking in theory mostly.

nope

png24 is so cheap host it's basicly bmp.gz

If it is possible to do this, I have not figured out how.

well, you could write a wrapper that matches it's api, and wrap say, pear.php.net/mail (which does support SMTP)

HTML, CSS, Javascript

i don't think there's any benifit in it

I have a question...

do you know of a non-PEAR class that does?

no.

Or you could just use function(foo, bar = optional, baz = qux) as a prototype and the last 2 parameters will be optional
bOr you could just use function(foo, bar = optional, baz = qux) as a prototype and the last 2 parameters will be optional/b

you install the PEAR package, then tell that package to install other packages for you

Okay, is there a way to test it?

remember, pear is just a bunch of php files that don't have to be stored anywhere special

except, you can't specify baz without specifying bar

just drop it into your projects include folder

This script doesn't seem to compress anything - http://pastebin.ca/613476

I could install pear. but I've tried to keep my own framework as self-contained as possible, so it'd work on client's hosting provider

ini_set( 'include_path', ini_get('include_path') . ':/home/f00li5h/.php-cruft/pear' ); # in a common include

2] TehSausage remember, pear is just a bunch of php files that don't have to be stored anywhere

you can include the pear libs in your "distribution" and tar them up at the same time

Is there a function to get 1st, 2nd from an int...like date('jS') but for any number?

thats a 3 line function =\
$lastnumber = substr($number,-1,1); // heres a hint

second...

okay

if it takes you 10 minutes to figure out how to use someone else's modules, you've still saved 10 months not writing the library yourself

it's just a bit weird that since I can't imagine the SMTP code being platform specific someone has gone the extra mile to disable the SMTP stuff on platforms other than Win32

if it takes 10 months to write something, i spent 9 and a half talking on irc XD

how can i covert a script that uses pear, not to use pear?

i just dd twice as much work as i did all day yesterday in the 20 minutes i wasnt on irc

yes, and you still collect the pay cheque at the end

yeah

i don't get paid

it's amazing how much more productive you get when your ISP is having problems :p

i program for fun only

i program for fun/paid jobs

i wrote a 30,000 line console game in some VB rip off language when i had no internet, back when i was 12 or so

yeah... "crap, i guess i'll do some code"

... until you run into some tiny little question that needs the manual

you can download the manual in a tar...

i have the manual on here

yeah, i probably should
i can never remember the parameter order on some functions

i still use php.net

such as in_array() and strpos() and a few more

do $_GET values automatically get url decoded?

that's because they're inconsistant and stupid

because sausage.no-ip.org:88/manual/function.str-pad.php is alot harder to write
than php.net/str_pad

set up an entry in /etc/hosts
php sausage.no-ip.org

lawl

add a vhost, and then you can do php/str_pad (local hosts for the win)

okay i overdid it
actually it was cheese:88/phpman/function.str-pad
but still long

set the docroot for that vhost to phpman ...

:P
i could never get vhosts to work, here i go

lol, who uses Fedora Core 7?

i use 5

idiots.

ahahahahaha why?

TehSausage§: forgot to put "NameVirtualhost *" in your httpd.conf ?

i've been using VirtualHost *:80 for awhile though

http://au3.php.net/source.php?url=/quickref.php
a href="http://au3.php.net/source.php?url=/quickref.php"http://au3.php.net/source.php?url=/quickref.php/a

i'll try it out

thx, I know how to write that (1st, 2nd) just figured there was a native function

hey, apache is still alive, now to add the host

:P

did you find a function?

crap, i put *:80 before php:80

no, just going to write one

$num=1 ; echo date("jS",strtotime('1970-01-'.$num));

$num = 20446

yeah, my solution does have a few small limitations

yeah, I thought about date stuff with the last digit, but seems a bit hacky...whatevs: http://pastebin.ca/613499

www.zimbio.com/PHP/articles/ 30/Generate+English+Ordinal+Suffix+Number
'twas first for 'ordinal numbers php' on google

http://pastebin.ca/613505
er
that was to RobRoy

nice

tab completion ftw sometimes?

boxes, the data isn't getting fed to the second php hosting page correctly. Any ideas?

though if you want it correct, you have to handle 11/12/13 as exceptions as the zimbio.com URL points out

12nd?

tab completion fucks the world

does n3kl
not*
lol

nice link, thx

don't thank me, thank google.

well you gave me the link, so thank you. I thank Google every morning in my prayers. :P

google = god

google == big brother

:

http://pastebin.ca/613511

:P

still a bit shorter than the zimbio.com one

http://www.pastebin.ca/613512 print 0, yet if i replace the line in the while statement with echo $row[1] then it prints the output i want

bleh. version 1.0 with all typos fixed - http://pastebin.ca/613515

oh, we're golfing now? i thought we were just interested in solving the problem

golfing?

codegolf.com # view it

The PHP concatination operator is ".=", not "+="

maybe i'm not OOP-minded enough, but writing a class for this sounds a bit overkill to me

+= is for numbers, .= is for strings

interseting that php hosting has a different operator for numbers and strings there, but not in comparison
s/interseting/interesting/

:

Seventoes, i cant believe i didnt see that

lol, np!

hi, how can i get the name of the function which has called my function?

cjk, i would just pass it as an argument :-/

Seventoes, i really cant in this case

well, afak, thats not possible

anyone know what I could do about a "ld.so.1: httpd: fatal: relocation error: file /usr/apache/libexec/libphp5.so: symbol sapi_module: referenced symbol not found" error?

Anyone know why this doesn't show anything. I don't even get any response headers - http://pastebin.ca/613525

you need to recompile stuff
why are you doing that? let the httpd do it

I want to.
Testing.

both apache and php, or just php... 'Cause I've been trying to compile host php right for 5 hours now....

Anyone have a regex that rewrites URLs?

there's no point, apache is written in C, and actually knows how to do content negociation properly, you don't.

Whether it is pointless or not, I still want to do it.

thanks. /me adds another word to his library

Nitro tha CiMien

function getOrdSuffix($n) { $sfx=array(1='st',2='nd',3='rd'); return $n10&&$n20||empty($sfx[$m=$n%10])?'th':$sfx[$m]; }

what's the difference between a "--with-apxs" install and a "--with-apache" install?

Myrth getOrdSuffix(111) ?

guys

you can unquote the values of $sfx, use shorter names for everything, and remove the call to empty too

what is correct? : document.form1.submit.(); document.form1.submit(); ?

strict compliant

#web

document.form1.submit();

golf is never strict compliant

what's golf

DanyWalker, you might wanna check ##javascript

##javascript, to be exact

how do people not know this?
codegolf.com explains

#web is 6 characters shorter than ##javascript :P

non strict ruins my day

yours does not handle "111"

ok

it's golf. the only things that matter are that it gives the right answer, and that it uses the least characters

function getOrdSuffix($n) { $sfx=array(1='st',2='nd',3='rd'); return ($n=$n%100)10&&$n20||empty($sfx[$m=$n%10])?'th':$sfx[$m]; }

okay, you win.

feel free to use a pastebin and whitespace.

submit tests so you can prove your code works, kpls

look at it, why does it need testing?

because i'm not convinced it works in every case
$n %= 100

yeah, i wouldve used substr there
but thatshould still work right

wasn't sure it exists, was too lazy look on php.net... remember needed something like that and it wasn't implemented

11 only comes every 100

yeah, which is an infinite amount of failure.

function getOrdSuffix($n) { $sfx=array(1='st',2='nd',3='rd'); return ($n%=100)10&&$n20||empty($sfx[$n%=10])?'th':$sfx[$n]; }
nah
won't work
ok back to work
:P
hey how are decimals handled for ordinal suffixes?

they aren't
you can't have a rank of 22.6

=]

11.21st ?
or 11.21th ?

no, that makes you 23rd

how can i get regex to match where a variable has a domain? (ie $var = "heres a var with a link: wwww.example.com")

joe-f: is it a uri, or just a domain?

http://regexlib.com/

just a domain

joe-f: google for forum code

nothing after the suffix '.com', '.net'... etc

i came 2.5th in a race _
jeez, wtf

ahh nice regexlib site..

read as "i came second-and-a-halfth" ?

joe-f: is there a reason you can't get the data in a marked up format?

i read two point fifth

no

BUY \|Iaqra at [http://f00li5h.info/store]!!

you can't be 1st and 2nd

not with one entry

but then, you're 1st and 2nd, not 1.5th
XD

joe-f: I found this in my forum code: $t = eregi_replace("^((http|https)://(([A-Za-z0-9~&=;\?%_.#/\-])*)([a-zA-Z0-9/]))", " [url=\\1]\\1[/url]",$t);

2-ish

ofcourse

ahh awesome let me test it

domains can not begin or end with a -

need to implement -ish suffix for decimals

also, i'm allowed to include a :$port in a url

is there a good tutorial for specifying a custom filter to stdout?
lets say I want to replace all 'z's going out (raw html) into 'y's. can I do this?

blocks

am I right in guessing filter can do this?

i think you want to manipulate the output buffer for that

what's the best way to do that?

the manual deals with that

http://au2.php.net/manual/en/function.ob-get-flush.php perhaps

Can you guys test out my new site i wrote in php (i'm brand new and started this little project yesterday) http://speaker219.ath.cx:8080/message/

do you guys have any experience with php://filter ?
it seems like that was designed to do this
but im not sure
this buffering stuff looks like it's a read only sort of thing
no way to replace zs with ys

DDustin,once you get the buffer you replace the letters then echo the buffer

ah ok, yes this could work
I wonder if there is a way to do it more silently
without forcing all output code between two blocks
a global "I want ALL output no matter what" sort of thing

Anyone know how I can clear 2 bits of a byte in PHP? Theyr'e supposed to be 00 anyways, but want to clear them just in case.

with &

XD

If I hae a user logged into WinXP Pro, can I setup passthrough authentication to gain access to a php/browser controlled database?

with &
it can be done, but i've no idea how though

you could do what you want to do globally with a ob auto append/preappended script in your php.ini

duh...for some reason I was thinking NAND or XOR

and can turn bits off, or can turn them on

I haven't done much bitwise stuff, figured | would turn them on though

I just fixed a whole bunch of bugs at http://speaker219.ath.cx:8080/message/ , please keep testing

you should write unit tests, instead of bugging us

what's a unit test :O

www.lastcraft.com/simple_test.php

fopen(msgs/Sausage.txt) [function.fopen]: failed to open stream: No such file or directory in /opt/lampp/htdocs/message/admin.php on line 53
wow, already :P
who else has a username on there?

you write code that tests that the rest of your code works. somewhat like c's assert

logged in as ../passys/Sausage
and it gave me my password back
Your messages:
1231337
you has some work to do

how do I do a auto append/preappend script? have a tutorial/

try google for that one

I have been without luck

you just set it in your php.ini, or with a php_value in a .htaccess

I have to modify .htaccess as well? o_O
now I'm confused

or

oh ok
my bad

I believe that meme has expired

which?

what function do I use to just stop the excuetion on a file?
like:

it

if ($somthing){
stop excuteing;
}
else{
}

exit

die

or that

what?

thanks foolish

what is the proper way to escape a filename string for copying on the filesystem?

php.net/exec

strip /\?:; etc. then check if it's a directory,

f00li5h:sorry was busy 'my bad' is on my personal list of sayings that are no longer funny..

when was 'my bad' ever funny?

i am doing that - but the file fails on file_exists because the string is not escaped (i think that is why)

no, easier way is let the OS decide what to strip

so, i am doing a copy for 5959493$%(^(^.doc to whatever.doc - it doesn't find the first name

file_exists is a different story

well, what about for a copy
like i am passing the string to exec

see php.net/exec on escaping for a exec cp

ok, looking now

i'm sort of lost on where the problem is now
a file_exists() is a different thing

I just fixed a whole bunch of bugs at http://speaker219.ath.cx:8080/message/ , please keep testing (i fixed the bug in write.php whoever did that

pay testers, or write unit tests

escapeshellcmd($oldfilename);

anyone know of any links to sites that people have used php to load an docBook xml file?

Seems like something you'd 'just do'.

why would you want to do that?

i need to pull values out of several docBook files and load them into one.

how many are we talking here?

well over 100

Loop over files, perform xpath query?

ok looking into xpath

lol wut?

what is wut?
speak english, if you dont know english very well there are ways to get help

gah!
how do you debug functions that wrap all output?

debug?

as in echo out variables and stuff

you write unit tests, with meaningful failure messages, then you read the message

heh

function shouldn't ever output stuff, they should return the stuff

one method is via xdebug

I was more joking, but thanks for the walkthrough I guess

i see

back

is there any way to only open a few bytes of a file with fopen?

fopen doesn't read any bytes of a file. That's the job of fread or fgets.
So... yes.

What I am trying to do is see if a URL can be reached. Problem being the place its reaching cant have any custom files so I am currently stuck just catching the error of a fopen if it cant open the index file. Is there a better way to do this?

hi, how can i test if my extensions are loaded?
like mysql.so gd.so curl.so

phpinfo should tell you all your extensions

The elusive extension_loaded function.

of that :P
or*

phpinfo() is your friend
or via the command line php -i

hmm, yes i know
extension_dir=/usr/lib/php4/20050606+lfs -- is that valid?
or should it still be "./" ?
but the extensions are not in "./"

i would wonder what ./ is
your absolute path is more correct
but is there anything in that path
look at /usr/lib/php4/ and see what is there
you do have a abnormal install so you kind of are on your own in figuring things out
php by default will not do such a thing

abnormal install i think..
that was from a debian package
but i'm using mod_chroot
to let it run in a chroot

how are you installing php?

from package

i would suggest first to seek a debian channel or linux channel to help
we can not support every distro of windows and how it should work
err.. distro of php

lawl

Hi. I have a date string '2007-07-11' and I want to convert it to 'Wed 11th Jul 2007'. I couldn't find the appropriate date function. Can anyone help pleas?

thats because there isnt
you're not supposed to convert dates to dates,

hello
hey, how is the operator called?

isn't an operator

as in $var =EOC

it signifies the start of a heredoc

that's right, a heredoc

http://sausage.no-ip.org:88/dev/dw/heredoc

what is it then? if not an operator?

there cannot be anything else on the closing line, including whitespace, except a semicolon if you need one

and after the semicolon, can I put a comment?

granted, but is there a way I can make the date string into a date object, that way I can display the date object the usual way?

or something else?

i wouldnt push it
XD

and what about the semicolon... is it really optional?

semicolon is there because statements have to end with a semicolon, and thats the only thing you are allowed to put after it
if it was a function call, ); would be on the next line

is there a way I can make a date string into a date object, that way I can display the date object the usual way?

date = string, it could be formatted any way
you have to parse it yourself

thank you

strtotime() might work with some formats though

date object?
what is a date object presented in the 'usual way'?

there is no usual way

ok, perhaps this isn't the right channel for this, but since I am doing some PHP work, I wondered if you could help.. I'm thinking about licensing my own PHP work under the Modified BSD License, and also including other's licensed work (one such piece is licensed under the Apache License 2.0) - would this work out?

you make dates however you want them to look

^majik^: you wont be able to get a solid answer here
^majik^: but considering bsd and apache license
i know a little about bsd license, i think your end question is justified,
i would sugguest you contact a lawyer

I was afraid of that :p

with bsd and apache licenses you are safe in most cases
they are open licenses
consider that windows used BSD licensed code for winsock.dll for the long time

Hey ya'll. If I'm trying to compare a string -- and if it doesn't compare do I do this:
if $blabla !== $blabla

why does gd.so make phpinfo() more verbose?

why does adding a page to a book make it longer? _

..

yes you are here

You need an exclamation mark that way you let everyone know you are actually excited about my presence.

you just need to ask your question to make your presence known

who said i have a question.

then dont just type ..

you're right, that's a blatant waste of pixels.
i apologize.

not really
talking to you is a waste of pixels

URL )

how would i get the href of that element?
i used $url = $row-td[1]['href'];
, but it failed
oh, i missed an a, didn't i.
$url = $row-td[1]-a['href'];
beautiful.
thanks

i like how you thinking out loud made you see where your problem was

odd question. i am using a hosting provider that changed hardware for my site. I am using php+mcrypt with gost in a script. gost has seemed to stop working.... but phpinfo shows it compiled against mcrypt. any ideas where to start troubleshooting?

happens all the damn time. as soon as you ask the question, the answer smacks you upside the head.
in fact, i find myself asking myself questions in empty channels, just to get the answers.

gost?

MCRYPT_GOST crypro algo
crypto*

i wish more of you came around, it sometime just takes that thought of typing things out to realize the problem

well, i'd like to think i'm not an idiot

is mcrypt even available on the new server?

was compiled with '--with-mcrypt=shared

nevermind you said it is there

but i think they removed it. has to be hosting fault

i am not familiar with that encription
i would first look at what is needed for _gost to work
mcrypt is a general libary that should support what ever the system can do

it's part of mcrypt

it is a part of the os

seems that php was compiled with the flag.. but the mcrylt library as not available to libk against

mcrypt in php can only do what the OS can do

it's a shared lib. not usually installed byd efault

if i had a string like ThisIsAString i could split it like 'This Is A String' i tried something like preg_replace('/([AZ])/i',' $1',$key) but no go
ok that sentence made no sense

magick/exception.c:845: ThrowMagickExceptionList: Assertion `exception-signature == 0xabacadabUL' failed.
what should i do with that?

i would first look at what _gost depenencies (sp) are
the new system you are on basiclly doesn't have that support

nothing besides mcrypt

no you misunderstand

yeah. have it fogired out. hosting provider's fault

in order for mcrypt to support _gost a library of ghost has to be installed

implode(' ', preg_split('[AZ])/i' , $string))

_ghost is IN mcryopt

i dont have the php man around but it should work

php's mcrypt is dependent on what the OS can do, i cant just pic any mcrypt_* thing and use it, the OS has to know what to do
i would contact your provider and say i need GOST encryption supported in php

no. mcrypt is a shared library to provide crypto functions. it supports over a dozen. when mcrypt is installed and php is linked against it. all the algo's are available

if they ask what the hell you are asking about, they dont know what they are doing if they provide mcrypt
have you been reading what i have been saying

actually i'm not sure that will work...

lol. check here. http://php.net/mcrypt

mcrypt can only support what the OS support
s

it has nothing to do with the OS

rolfen, no it didnt through errors left right and center

you want to argue with me i'm trying to tell you how to fix your problem but you ignore me
fine.. think that way

i already know how to fix it.

darn i dont have php on this box...
or maybe i do... lemme check

then fix it already
dont waste my time

i solved it on dev box already. hosting provider screwed up

then contact your hosting provider and have them fix it
i dont understand why you ask for a question you already know how to resolve

already did. but you are trying to tell me that a shared lib is dependant on the OS

just contact your provider already
there is no need for me to prove you wrong

lol

good luck

schnoowork you there? i fixed it
you have to add a dash between the a and the Z
like this A-Z
and drop the i modifyer
like this
'/([A-Z])/'

ahh yeah it was the i which was messing me up, but forgot that meant caseless
thanks

np :

how do I set the headers for the reply on php mail function?'

www.php.net/mail tells you

/n";

be sure not to put user data in that data

\n *

hello
-- names not what u think
is anyone here?

nope

ok
ive been stuck on an php/sql problem for a couple days now, and I cant seem to figure it out.
im trying to get all the tables in an sql databse dumped into an array. I cant seem to get it though. i keep getting "Resource id #3" instead of any table names.

you should use mysql_fetch_array

b-job, that's because you're probably dumping the return value of mysql_query()
You should use mysql_fetch_row()

ty, ill try it... and yes, thats what i was doing

so does anyone here use fusebox?

now instead of "Resource id #3" i get "Array"

b-job, well, I'm not sure you're using it correctly
I'd read up on a simple php/mysql tutorial

Is there an enum-like type in php?
I am trying to make an error object and I want to set the error levels as something of the sort.

no, you have to enum things manually

does anyone have any idea why php would be creating the same session id regardless?

because you're sending a cookie with that ID in it?

hrm

hey, what do you guys use for php editor?

sigh. now a new problem. joy.

vim is your friend

syntax highlighting problem in jedit is driving me batty

argh

vim

so that's it. cookies from two different sites are getting tagged thesame.

odd, did you set the cookiedomain?

these aren't apps I've written (whee). what would I look for?

setcookie

hrm.

Why is safe_mode going to be dropped in 6.0? What will replace it? How do I stop php from executing things?

deny access to the functions that execute things?

Isnt that why safe mode does?
s/why/what/

it tries to do more

does anyone have any experience with xmlhttprequests and php sessions?
specifically, i'm initiating a request from a local file to a server login page, which sets a session variable and redirects to another page, but the session doesn't seem to make the redirect

Yeah I know, but what is going to help with this stuff if they will just remove it in 6.0 and replace it with nothing?

using php as an apache module for multiple untrustworthy users.

CaT[tm]: Im using it as cgi.
CaT[tm]: and it can still execute stuff without safe_mode on
sorry

if you're using it as cgi and you are using cgi with suexec then you don't really need safe_mode at all

CaT[tm]: why not?
CaT[tm]: it effectively gives php users a shell.
Its better than mod_php yes, but it still gives them a shell.
With which they can browse around the file system, execute system commands, blah blah blah.

so turn off the functions that allow users to execute things

CaT[tm]: and again, isnt that the role of safe mode.

no
see above

Are there any lightweight frameworks available for PHP?

I fear you are reading into my words what you wish to see in them rather then what I am saying. as such this is a pointless and circular conversation now.

CaT[tm]: Looking at http://nz2.php.net/features.safe-mode, it lists disable_functions as part of that page. Surely that means its part of safe mode.
Or is there some other way to disable functions?

try the config option that disables functions.

disable_functions ?

liu

Sorry?
Oh.
tla
It is disable_functions, which is part of safe mode.
What are you trying to get at here?
I am wanting to know how to stop php from executing shell commands for when 6.0 comes along ( which has no safe mode ) and you are saying to use a feature of safe mode?
bI am wanting to know how to stop php from executing shell commands for when 6.0 comes along ( which has no safe mode ) and you are saying to use a feature of safe mode?/b

anyone happen to know if there's any easy way to replace all instances of \' in a mysql database with ' ?

So, does anyone with any sysadmin experience have any idea to lock down php so it cant execute things outside of /home/foo/web or such like?

rtfm?

I _have_ read the manual.
It always mentiones safe mode.
I dont want to rely on safe mode because its being removed in 6.0

oh

*sigh*

then...um...I don't remember

Does nobody in here seem to care about security?

you would have to do it outside php
limit in operating system level

how do you suggest.

I pass the buck on that one to the sys admin

make a jail, run virtual machines, use SELinux

freebsd's php.ini seems to be pretty locked down
as I recall...it's been a WHILE though

freebsd php installation is crap imho

Jails are not really a solution
Not for a shared system.
100's of jails ar not cool.

run fcgi ?

I do.

do you give shell access to people?

well the correct solution is not to host hundreds of sites on the same machine...

much cheaper to have 100s of machines

no.
CaT[tm]: Yeah whatever.
they arnt BIG sites.

hmm

You are delusional if you think the majority of sites are NOT on shared systems.

I didn't say that
I'm just saying it's not a great idea

Well thats really a big help here :p

which I'm sure everyone can agree with, given how much of a pain it is to secure them...

Sorry boss, we need to go and fork out 100k or so for a box per vhost.
Yah, right.

hmm

err
I'm not suggesting that at all

do they remove open_basedir in php6 ?

and boxen don't cost 100K, not even close

open_basedir is safe mode independent

waawaamilk 100's * cost of box = lots.
but that just works with fopen and such.
Not system and co.

are you allowing system commands ?

you're hosting hundreds of people paying $2.99 a month
or free
there's no real money there...

what about if user uploads evil.binary.bin to your system executes it via system() ?

user shouldn't be allowed to upload evil.binary.bin to your system... much less executing it

but if its shared hosting
youre telling users that there is not going to be file uploads?

value" I need to get all of these aray items into a mysql table any thoughts on easily doing this.

$teh_value) { mysql_query("INSERT........ "); }

there is 30 items in the aray each value corisponds to an sql field in 1 entry
there are 3 possibilities for the items included as I am parsing emails from a form that has changed a couple of times

why is the data going not directly into the database - why use a file ?

yeah well, exactly

the first pass used an email account to store data. I am updating that to a databased systm so currently items go direct to the database I have to parse in all past items from that email account

As I already mentioned, I want to stop execution of any binarys

you need some capabilities from operating system

Hmm.

noexec a dir or something

a session?

thats not going to work.

why do you need to allow system() ?

I dont
I dont want system
or anything that can execute binarys
or scripts, or whatever

disable_functions ?

anyone experience a phantom 301 redirect and the loss of post data?

noexec wont work because /usr and such has to be executable.

This directive allows you to disable certain functions for security reasons. It takes on a comma-delimited list of function names. disable_functions is not affected by Safe Mode.

Warning
Safe Mode was removed in PHP 6.0.0.

was?

So I have to figure out if disable_functions is _part_ of safe mode, and/or if its going to be in php6
yes.

gah. what would cause http://site/path1 and http://site/path2 to try and use the same cookie?

CaT[tm], that's what it's supposed to do
a cookie is shared across an entire site

but they're different software.

it doesn't matter

they run as different users on the system
and their attempts to access the same session file breaks due to permissions

but the browser is what stores the cookie information
and it does that from what site it stored the cookie from
so when it sends a request to a site and has a cookie that hasn't expired yet, it'll send it

CaT...just give each paths different cookie names to look for.

err you mean give each cookie different paths?
oh wait

no, but that would probably work as well

I finally read that right.

there is a path param.

yeah
I take it we are referring to the same deal?

na, i was talking about
$_SESSION[path1] and $_SESSION[path2]
but you can try the path param.
probably a better way to approach it actually.

http://www.php.net/~derick/meeting-notes.html#safe-mode -- it looks like disable_functions is a no go in php6.
a href="http://www.php.net/~derick/meeting-notes.html#safe-mode"http://www.php.net/~derick/meeting-notes.html#safe-mode/a -- it looks like disable_functions is a no go in php6.
Damn it.
Why is php so damn hard to might nice and secure :/

anyone have any experience with php sessions and xmlhttprequests?

its not

yes

how do you do it then.
Right now my big problem is trying to stop php from trying to execute things on a system level.

so, i'm trying to do this login via xmlhttp

and?

i'm calling from file on my local machine to a server, which is going to a login page, and setting a session variable
then, after some logic, it does a redirect using header(location:...)
and the redirected page no longer has the session

I can connect to mysql via the command line, but when I try to connect with mysql_connect the script either loads all the data parsed before the mysql_connect command and the rest is just ignored as if it was commented, or the page tries to load for about 15 seconds and then the save dialog pops up as if the browser didn't know how to handle the filetype
anybody ever heard of anything this crazy before?

you have a page in localhost and it calls a remote site with xmlhttprequests
?

yes

xmlhttprequest doesnt play nice cross-domain

well, it does just fine when you're issuing requests from localhost
at least, excepting sessions....

Anybody have a clue?

so this definitely isn't typical, right?

no, doesnt sound like very typical
check webserver error log

i've never used sessions with xmlhttprequests

do you see errors there?

you mean the apache log?

sessions work just fine with xmlhttprequest
apache error log

let me check

but i think the problem is with accepting third party cookie

I know that this is going to be seen as advertising, but I just put out on the wild my Sourceforge-like site that exclusively uses Subversion for it's version control system and is written in PHP

that was my guess ...

it is availible at http://sharesource.org/

pretty annoying though

not really
its a security thing

well, not really

well, yes it is

the whole cross domain security thing is generally both ignored and not that relevant when you're dealing with localhost

no rza nothing in the error log

i could see if i was setting a cookie in localhost, and then not allowing mysite.com to see it
but this should be setting the cookie on mysite.com, and reading it from mysite.com -- the request is just coming from localhost (and the request itself works just fine anyway)

the same thing could be exploited to send millions of advertising cookies
(if it worked)
and i dont think browser coders make exceptions like "if connecting to localhost"
IE7 does ?

well, it does

security zones or something

um, i'm using webkit myself
but firefox does it too

what is the point of this?
making a desktop application?

when executing code from file:/// the sandbox security mode is ignored
essentially
anyway, thats why widgets can access any site they want

interesting

and i don't see the security risk to send "millions of advertising cookies"
band i don't see the security risk to send "millions of advertising cookies"/b

sites that assume they run off / on a website deserve stabbitting
useless goddamned monkies.
erm. not sites. s/w. meh

lol, was going to say :P

guys

it's annoying being annoyed.

im trying to import a csv file but phpmyadmin is giving me an error
http://pastebin.ca/613823
anyone?

morning

G'day

20 in php.ini or phpmyadmin's config

ok thanks

great. now it can't set cookies anymore

anyone know where theres a good gd image resize script around?

lumgwada, i already allocated in php.ini
still giving me the same error

first... restart apache! second... it's possible to limit memory within the application itself iniset('memory_limit') = blarh you need to hunt it out...

ok thank you

if PHPSESSID is present but set to an empty string, should session_start() fail?

CaT[tm]: no.

hrmph. I'm trying to figure out just why no sessionid is being generated.

anyone know of a good image resizing script? im suprised there isnt one out there

Theres an ok one in www.phpclasses,org

Can you describe your requirement clearly?

phpthumb.sourceforge.net
I'll send you example code if you choose to use it.

I need a lightweight PHP framework.

then code one

In my opinion, you can write it by yourself

basically a framework is a layer consisting out of wrappers and handlers

DigitalisAkujin, sample code on how to use it?

yea, it's very easy

how?

http://phpthumb.sourceforge.net/demo/demo/phpThumb.demo.demo.php

how many demos do you need in a url?

demo is only good for viewing options example (program has a lot of options)

lumgwada, at least 4 apparently

i just need to resize an image, and save it somewhere

http://rafb.net/p/sUaJwW36.html
$dir['submissions_inc'] . $FILENAME is the file (pretty sure u can use $_FILES['Filename']['tmp_name']
$dir['submissions_inc_thumbs'].$FILENAME is the destination

sigh.

CaT[tm]: waef, check the logs.

session_start(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in blah

CaT[tm]: setting custom session id?

how do I specify a proxy and port for pear to use? can I put it somewhere in the pear.ini file?

CaT[tm]: do you use session_name ?

!+pear

[PEAR] PHP Extension and Application Repository, a library and distribution system for reusable PHP components. ##PHP does not support PEAR, please see #pear, efnet/#pear, or http://pear.php.net/support.php.

ok.
I think I can say it's no longer my problem but one for the developers

thanks

well if you use session_name($var); and $var get's defined badly it's easily solved

I just checked the logfiles and the error was being logged but not displayed before I made some changes to the devel box. afterwards it was being displayed
the ppl working on this php code can now go and fix it.

brb coffee

anyone happen to know off hand the bounds/limits for strlen on htmlentities not including the & or ;? as in the names themselves? 3-5 chars? (i'm making a regex)

Since no one in Flash will answer me I was wondering how to stretch a flash (In html) to 100% size?

!tell Kai_wp about g8

Are you sure someone here couldn't just give me a quick answer?

http://google.com/search?q=flash+100%25+width

Kai_wp, you could just link to the swf in stead of the html file...

first hit gives an awnser
learn to use google
it saves yourself and the rest of us a lot of hassle

So what do you guys think of http://sharesource.org/

I did use Google but none of the stuff was working. XD

right..

That's what they all say XD

well the first hit for me showed a working example; so either you are lying or you just don't know how to use google
looks like a nice project

Yeah, well, you should try it, because it gets way better inside :P

I use the first one, the CSS fails.

nah thanks; I've got my own servers :-)
you didn't got by the 'CLICK HERE FOR AN EXAMPLE' button ?

Does it matter if its in a frame?

any easy way to tell if php is installed with apache? (besides writing a .php file)

if it's not cloaked
?=PHPE9568F34-D428-11d2-A769-00AA001ACF42
append that at the end of any url on the site and it will return a logo

ohh cool

but then again, you'd need a php file XD
either look at the httpd.conf for any signs of php or check the server header

crap. no php
can php be added to apache 2.x easily?
as a module or something?

very easily

aha!

download the latest version, and add 2 lines to your config, then restart

wow ok.

those 2 lines should look like..

ok downloading

LoadModule php5_module "path/to/php5apache2.dll" and AddType application/x-httpd-php .php .some .more .ext

ñîñèñêà

hmm. this is linux so i suppose ill have to build a .so or something

sounds logical

Hey.
PHP frameworks?
Anybody?

framework for what?

Basic database application.

...

But I want a framework that doesn't get in the way.
I want to write PHP, not framework.

go make no sense in that corner -----

I want a framework that lets me write in PHP
And not have to have a huge learning curve

php has no learning curve
http://php.net/tutorial

I already know PHP
I want a framework that makes things easier.

then DIY

I agree

if you need php to be any easier

I'm not good enough to make my own framework I overengineer too much

then you need to read that

What?

google php framework
you'll find many

has anyone here used prado

depending on your needs... select which one is appropriate, if you want something simple and fast.. i recommend codeigniter

Syntax error on line 199 of /etc/httpd/conf/httpd.conf: Cannot load /root/ispconfig/httpd/libexec/libphp5.so into server: /root/ispconfig/httpd/libexec/libphp5.so: undefined symbol: ap_user_id
TehSausage that was a prebuilt .so, perhaps it is incompatible ?

i dunno XD never had to compile anything

$strsql="select * from tdepto order cdeptonombre"; $res=mysql_query($strsql,$db); --- the query result have 20 records... i want fill a select.... how know the first record?

you want to fill a selec?
whats that

option select

oh
well you have to fetch the results and loop that into option/option's

yes
i need know the first, record....sample: if ($row[0]==firstrecord){ echo "option selected value='$row[0]'$row[1]"; } else {echo "option value='$fila[0]'$fila[1]"; }
understand me, my problem is firstrecord...

yeh I understand you
but $row[0] - that allready is the first record?
hence the 0

no 0 is the first column not?

oh right; variable names

$row = mysql_fetch_array
that will return first row

thats not the question
you have to keep a counter
$cnt=0; while (..) { $cnt++; if ($cnt == 1 ) // first row

ok
testing

but why would y ou want that anway?
the first one in a selectbox is already selected

if you only want the first row, why not use LIMIT in your sql query?

well he wants a selectbox

yes

he is taking the first row only, the rest is from a file??

no, check his selected thingy
I think he wants the first one selected
btw; the proper HTML syntax is: selected="selected"

how do i apply ActiveRecord pattern to my database ... basicaly I want my object to know about my database column .... is there any artice online.... or any google keyword to search ???

Dynom ok

isn't that more of an DB question ?

you tell me
to me its an ActiveRecord question but just im using php at the time .. I came here

i don't understand your question, you want to write an active record implementation?

anyone know how to add allow hosts for phpmyadmin? (additional subnets)

eclipse

faisal_d :: I want to extend a Model class say UserModel and I want class User Model look up the users table and automatically figure out what are the columns of table.... then create a private variable for every one of them

Hi, how would i make a php login page without using sessions, just like a password gate, but there is a username and password
??

Zuwer use apache

?

gogole
google even

like a .htaccess file

yeah

ummm...

http://google.com/search?q=apache+authentication

well, its not to stop people from going to it, just so that you have to log in to use this feature on my site

hello i'm trying to compile php with dbase ext. but it will not compile the exten . i do ./configure --enable-dbase --prefix=/home/user/php ; make ; make install but the exten. will not compile .. what dependinces this extnesion requred ?

your question isn't very PHP related so far Zuwer
whats the exact error

no errors

O.o

it compile php but no extensions

how about mysql_list_fields?

o

well, im using php to get the info from the other page and compare it against the info in mysql
how would i do that

and i get the php bin in the prefix but nothing .so

not listed with php -m?
meeting; brb

no

Yo does anyone know where I can find out what session information zen cart sets during a customer log in?

can someone show me a string that mac's generate php evaluates $_SERVER['HTTP_USER_AGENT'] for safari browsers?
*when php, sorry

mozilla/xx (WebKit; etc)

oh so safari is built on FF's engine?

no
it's built on webkit

oh

nearly all browsers use Mozilla/X.X

what does the OS string look like?

designerman, outputing with print_r($_SESSION) doesnt tell you?

Mozilla/5.0 (Windows; U; Windows NT 5.1; en) AppleWebKit/522.12.1 (KHTML, like Gecko) Version/3.0.1 Safari/522.12.2

god damn am i stupid, thanks

i was close

TehSausage, yeah, i got windows and linux over here so i can test those, i just dont have mac

i'll get my friend to get his

http://x.jaywebdesigns.com checks OS, Browser, and Width
i found a bug w/ javascript in Opera on linux too

Why not just Google it?

if you have linux dual head or more, it adds them all up, different res's and all

7] iMac600 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/522.11 (KHTML, like Gecko) Version/3.0.2

TehSausage, cool, much thanks
Mace[work], it helps to have a real string i can just comment out w/ the rest

There are plenty of "lists" of this sort of thing out there

yeah, its to late for me to google
im on a time limit too

Dynom?
$strsql = "SELECT * FROM textension WHERE iextensionnumero={$_POST['txtNoExt']}"; $res=mysql_query($strsql,$db); ---- how know if $res is empty or the recordcount ?

it's not recordcount, but the array of records
empty or result, not sersult conunt
*result
*count xE

ok
empty

if you want to know if there is any result

ye si know if exist a result

you can use mysql_num_rows($res);
if 0 there are results

0) {

ok
if the query is empty then:
if (mysql_num_rows($res) == 0) {
right?

right

thanks

you want to be checking for "=== false" too - when the query is invalid. Will save you hours of searching for a bug later down the line.

0 )) { // valid \\//\ }

i have a quick stupid question

anyone here use codeigniter?

questions aren't stupid

just ask it

i have a two dimensional array that i want to declare

that's ok we have Dynom

yes

email

hey how do i combine the select results of two select queries using the same columns

coburg@email.com

Dynom if i want the empty result if ($res && ( mysql_num_rows($res) == 0 )) its ok right?

It seems like CodeIgniter would be perfect for what I need to do in my current project.

what's the best way to do tha ?
that

join your flavored DB support channel

i just gone blank

It will save me a lot of time, I think.

that's a multi-dimensional array? like like one dimension to me !

i'm talking about throught php

I don't really like "magical" frameworks like that though

re

indeed... i completely love it

*through

yes it is

That's my problem with frameworks like CodeIgniter

why not $array[$suburb] = $email ?

say $res=mysql_query($sql,$conn)

It doesn't let me write PHP applications, it wants me to write CodeIgniter applications

not true

then i have the result of another query

array('username'='Couger', 'email'='mail@couger.info')); ?

and i wanna append the results

most frameworks ask you writei n a ceratin way, or name db tables in certain manner... but code igniter doesn't have that

doing it in a db is probably faster tbh

faisal_d, CodeIgniter has a lot of stuff I don't need I think

i will try

what do you mean i form the query string in php and display the results in php

checkout array_merge and family

php.net/array_merge maybe - would have to see the data

Seems like CodeIgniter doesn't have any Unit Testing capability ;(

the data is probably a 2d associative as well as key array

Can anyone recommend a good technique for finding the distance between two zip codes?

http://codeigniter.com/user_guide/libraries/unit_testing.html

var_dump the array's and pastebin them

oh

yes, hold on.

the array is the result of a mysql query Mace[work]
so will it work for two mysql_query result arrays Mace
the cols are the same in either case

array_merge? yes, presuming you have called the correct mysql_fetch_assoc and mysql_fetch_array functions

but is'nt mysql_fetch_array() to get an array of all the elements of each single row
??

however because the column names are the same, chances are you'll be over-writing the names. Can't see how that wouldf be though because you're saying some are assoc's and some are numerically indexed - so I'd have to see the data

greenberet007, why not redefine db fields in your sql query?

know I think thats the way mysql_query gives the results

select table1.x as a, table2.x as b from table1, table2 ??

listen to faisal_d

CodeIgniter doesn't have very good unit testing.

and look up alias'ing in SQL queries

$res=mysql_query( "select * from table where something something",$conn);

Who am I kidding I don't do test driven development anyways

then i do another select with a different where clause
then i wanna append the results
that's not my question

Couldn't find what I was looking for, must have been lost in my last bookmark clean up, did stumble accross this though: http://www.hotscripts.com/Detailed/58055.html

greenberet007, why you need to append the result?

okay next silly question , how do i iterate through a 2 dimensional array ?

because i have to display them 5 at a time

http://www.pjenkins.co.uk/blog/index.php/2007/04/04/uk_post_code_distance_calculation/

can you re explain in a nutshell? you do query 1, then you do query 2, then what?

$value) --- $key would be the first level, $value would the second level

then i wanna iterate through the results of both together with mysql_fetch_array()

thanks Mace

never mind I'll try to get through it through sql

Hello all, I am using the lastRSS library (lastrss.oslab.net) to fetch rss feeds from other sites. My web host is a shared linux and I am using the cronjob utility at cpanel to run the rss fetcher php script every one hour. No problem. My question is, I would like to implement something in real time for example, a blogger update his blog and my script somehow get notified and fetch their rss immediately. I think this is possible cause I've seen some site have th

greenberet007, what is wrong with where=first_condition and where=second_condition in your sql?

Your text was cut off at "... cause I've seen some site have th"

sorry where variable1= ... and variable2=...

well select * from table where a and b and c and d is my first query
and second is
select * from table where a or b or c
or d
can i combine these too into a single query
*two

yes, it is possible.

mysql UNION

Mace[work], [continued]: I think this is possible cause I've seen some site have this capability but I just don't know how. Anyone can point me the right direction?

do you know PHP?

well any other get through MarcosBL

is this valid code? define("FOO", 0); if ($bar) {$this-FOO = 1} else {$this-FOO = FOO}
that is, will $this-FOO be a local var?

lht, it's called trackback or ping, and depends on the blogger CMS, but yes, can be done

it's a terrible idea regardless of whether it's valid code or not.

well any other get through MarcosBL - sorry, don't understand :?

haha fail

i'm trying to say mysql UNION clause can combine two different querys into one set of results

i thought you told me mysql union

MikeSeth, urmm.. yes.

why s it terrible, and do you know if it is valid?

all right i'll check mysql union on google

I dont know whether it's valid, but let's for a moment presume that it is. Are you willing to bet the stability of your code on literal character case in the source code?

it won't be, because $this can have an attribute called FOO

well, then you receive a request, read an RSS source within a certain timeout, store the data, and return a response. Stupid but works.
that is exactly my point.

so is this better? $this-foo = FOO;
or should i do something like $this-_foo = FOO;

if you're on php5, you can use a real private variable, instead of using _

the former is acceptable, as you're using a define for a constant. The latter is PEARism used to denote private variables

MarcosBL, thanks googling 'trackback' now.

no problem man

that's just a PEARism? i though everyone did that

how do i select distinct from a union of two selects

ok, then $this-foo =FOO; will do fine i guess.

i am calling a php file from within a php script which in turn calls pgp. i am using a custom ini which has safe mode off so putenv() works... on cli as apache it works... and when you go to http://www.domain.com/file1.php it works - but when you go to https://www.domain.com/file1.php the error log shows: sh: line 2: /echo: No such file or directory and sh: /php: No such file or directory any ideas?

hello, is there a way to generate php code in php, I mean I have a function that takes 1+ arguments, and I want to create the argument list from a string

are you calling php with the full path?

MikeSeth, thanks, I keep that in mind.

no, its a part of PEAR standard. "But but but we WANT private properties?! - Hello this is PHP4 spe... - BUT BUT BUT WE *WANT* PRIVATE PROPERTIES!!!1!"

what if the union returns some same results hwo do i get rid of them
uwhat if the union returns some same results hwo do i get rid of them/u

hmm, no... i am calling it php -c /path/to/custom/php.ini -f file2.php

heh
there is no _fnord

make it /path/to/php -c ...

ok, brb

i think PEAR has "private methods" too

know what i use for private variables? private... go away php4

we've been over that
oh, and meow

f00li5h

simoncpu

nothing
i'm just bored
i just like typing random people's names
just to annoy them

lol, rly? me 2! rofl lol

bwahahahahaha

git.

hg
weeeeeeeeeeeeeeeeee
wekwekwekkwekwe

GHAHGHAGHAHGAHGHAGHAHGAHGAHGHGHA

oh hey!

houmenta! w00t!

ahahahaha
huomenta sir!

we've just had a meeting a while ago about a potentially large product
i want to lobby for REST-based solution based on Agavi

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

if ($flags & FLAG) right?

i hope it would push through

FLAG being a binary mask?

yeah
i'm not good at logic

i serve larry now.

is that syntax allowed in php ? (the if($flags & FLAG) ?)

Perl is madness.

neat only thought it was c/c++/java

it is afaik

pff, talk to me when you can slice a hash

if it isn't i'll soon find out when my flags don't work XD

i've called it with full path but still returning: sh: line 2: /echo: No such file or directory

your shebang seems incorrect

I have sliced hash this very morning.
yes, it is

my what?

give code
you never did

I did. I even heated the knife.

if you get: sh: ..
it's your shellfill thats fucked

so I was right, wasn't I?

MikeSeth, ïûù

I see funny characters

it's russian, did you forgot mother language?

$foo = array_named_slice( $array, Array( list, of , keys ) ); @foo = @array{ list, of, keys }; # oh, and i don't have to write a function

it probably is, but I still see funny characters

haha, you need to buy russian AZBUKA and repeat everything from sources

no, I mean I dont have russian fonts in this console

hah

and that is a cause for celebration because..? ;D

because it makes api's about 100 times less cumbersome to pass things to, for one
it's a simple enough task, why can't i just do it?

oh you mean like with Lisp generic functions?

i don't speak with a lisp
s/with a//

I wonder: if I participate in a holy war, does that make me a holy warrior

nope, it makes you a troll

http://rafb.net/p/F8jnLo28.html if i call that code over http it works - over https it doesn't work... returns: sh: /echo: No such file or directory

var_export( $_ENV ); and diff the results

whats a good channel for photoshop help?

or perhpas your shell is different for https, try sticking a SHELL in your environment too

whats the first line of the shellscript

also, i think you should use a 'piped open' instead of echo

head -1 file.sh

s/piped open/ proc_open /
there is no file.sh

it's not a shellscript .. file1.php calls file2.php with custom ini (full paths now) it's calling a php file that does a exec

finally, after putting & in 100 different places, the arguments are send as references +_+

proc_open

I'm retrieving a XML with CURL and I would like to erase some tags, which method is the best? str_replace ?

looking at just this, can you think of any ways to improve? http://sausage.no-ip.org:88/tick.php

hostnameip/hostname

the inc file runs main() then starts an infinite loop, functions are called as close to (x)ms as possible, making up for lag, Tick:leep puts a tiny usleep() in the loop

satistfaction!

OH GOD MY BOWELS

what are you satisfied by?

anyone have some slick ways of getting around the 30sec time limit per script?
i don't have root on the box

in the days of creationist disdain to common sense and generally appalling state of intellectual honesty, being a troll is a privilege!
fix your script?

MikeSeth, it requires sockets which i don't have control over

good point
did you try making your scripts run for less time?

you're tasked to fix a script that you can't change, on a box that you can't configure?

since 10 seconds is the max a web user is likely to tollerate anyway

f00li5h, ya this runs in the background

etc...

php on the CLI?

f00li5h, yes

mean?

Lumpy^, urlencode, htmlentites

like safe url

Lumpy^: how can a url be unsafe?

thanks for your help - the issue is now resolved. safe_mode was still on over https but off over http

http://foo.com/terrorism.php?threat=USA&attacker=unseen

thanks again

you could just sanitize (url encode) the url

do you know a function?

it could have HIV on it. Don't ever lick URLs you don't own, you don't know where these things been
it could have HIV on it. Don't ever lick URLs you don't own, you don't know where these things been

i wish you'd warned me earlier

I have $ip = strstr($new, 'hostname'); but the file contains more declared hostnames, howto continue getting the values?

is that an XML file?

yes

k3ph, you should take a look at php builtin functions for dealing with XML, our use a tird part php class for it
*third

oh, in fact its a curl which gets a xml

hi guys, would someone mind helping me to understand the following code, please? $words = preg_replace('/(")/', $phrase, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); Specifically, I don't understand the forward slashes in the pattern

same thing, just curl the file, and parse the XML using php builtin functions

MarcosBL, I see, thanks

hal, #regex

those are the "delimiters"
they're there because php wants them to look like perl regexes, when they're not. also, you can include modifiers after the delimiters

MarcosBL, the forward slashes are interpretted literally in regex

not those ones

k3ph, php.net/xml - look at the comments too


Related Topic:

If i setcookie to expire in the past the browser should kill the cookie well my script cant find the cookie anymore
Current app im working on has a MM relationship between sherpas and the territories they cover currently the app
Random question someones asked for some example php code which i dodnt have to hand however i could code some