advance.
A
Hi Angelo,
Probably it is something along the lines like:
$xpath->query('BookingReference/[...@referencesource="api"]/');
Fairly simple and XPath is way powerful!
Kind regards,
Aschwin Wesselius
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Aschwin Wesselius wrote:
Angelo Zanetti wrote:
Hi all,
I have the following segment of XML:
165432
Now I want to get the value of the BookingReference where the
ReferenceSource = "api". In other words I want to get the value 165432.
I have the following code:
$ItemConfirmation
there are plenty hosting
companies that do have PHP 5 and have a clear security/update policy.
You, yes YOU, are their client paying their sandwich. If you are not
serviced properly, they have to eat one less. Now, go on and brush them
off..
Kind regards,
Aschwin Wesselius
--
PHP Ge
g stuff too. I'm not quite clever at search
algorithms, so if someone could point me to some basic functionality,
that would be great.
Thanks in advance.
Aschwin Wesselius
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
x27;.$hash.'.jpg')) {
.
}
Just my thoughts.
Kind regards,
Aschwin Wesselius
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
fire...
;)
Why not going with a Scottish kilt and have some cooling breeze while
showing off what you're made of? Clan-wars sometimes started with having
the wrong pattern on the kilt talking about the Bloods and the Crips
fighting eachother just for the color is just childsplay.
As
morous note once in a
while ;-).
Aschwin Wesselius
#x27;ll need to also add the observer
pattern.
I think it depends case by case when it will be applied. Not every
'input' suits the wish for an observer. Even sometimes you wish that the
return value is void in some cases.
--
Aschwin Wesselius
What you would like to be done to you, do that to the other
eal fast.
So, it can be done. Except that only two persons know where to find the
code and how to maintain it and it is not documented. I learned a lot at
that company.
--
Aschwin Wesselius
What you would like to be done to you, do that to the other
Jochem Maas wrote:
Aschwin Wesselius schreef:
Nathan Nobbe wrote:
Surely he didn't explain OOP to you... he's anti OOP :)
ya; im waiting to see one of these 'simple' sites thats written
strictly w/
functions and procedural code that does more than support a u
aving some code
multiple times all over the place (hence an argument for OOP). But that
saves me time and a huge headache every day. I like it to maintain it
that way. And maybe the programmer after me has to clean it up too. But
refactoring procedural code is way easier that refactoring OOP c
ve a solution and a programmer should be able
to fit that solution onto a problem.
Is that weird to think that way?
Aschwin Wesselius
What you would like to be done to you, do that to the other
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
'd rather have the job done in time than do it
the 'professional engineering' way.
--
Aschwin Wesselius
What you would like to be done to you, do that to the other
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Shelley wrote:
Hi all,
What do you think is the best way to display string 'abcdef' as 'fedcba'?
$tmp = '';
$str = 'abcdef';
for ($i = strlen($str); $i >= 0; $i--) {
$tmp.= $str[$i];
}
echo $tmp;
--
Aschwin Wesselius
What you would l
Stut wrote:
On 28 Feb 2008, at 11:30, Aschwin Wesselius wrote:
Shelley wrote:
Hi all,
What do you think is the best way to display string 'abcdef' as
'fedcba'?
$tmp = '';
$str = 'abcdef';
for ($i = strlen($str); $i >= 0; $i--) {
$tmp.= $str[$
Stut wrote:
Just because it works doesn't mean it's right.
-Stut
What I meant was that I tested the script and it worked, so I didn't
spot the flaw (wich is obvious and you were right).
No big deal.
--
Aschwin Wesselius
What you would like to be done to you, do th
ut after you've done the explode, than it should work.
So, I don't know what goes wrong.
--
Aschwin Wesselius
What you would like to be done to you, do that to the other
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
e way I picked it up.
--
Aschwin Wesselius
What you would like to be done to you, do that to the other
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
hebang");
include "php://filter/read=trim.shebang/resource=/path/to/include.php";
?>
bit more graceful ;)
Me thinks that when shebang doesn't fit /usr/bin/php (which happens
sometimes) you're doomed.
But it still is a nice example.
--
Aschwin Wesseliu
Robert Cummings wrote:
There's always a tradeoff between speed and memory. Here's the low
memory version:
Sorry, Rob, that function doesn't return anything. ;-)
--
Aschwin Wesselius
What you would like to be done to you, do that to the other
--
PHP Gener
Aschwin Wesselius wrote:
Sorry, Rob, that function doesn't return anything. ;-)
Bugger, it's getting late. Didn't see the &.
--
Aschwin Wesselius
What you would like to be done to you, do that to the other
--
PHP General Mailing List (http://www.php.n
learn more and more about C syntax and solutions,
where a lot of optimization and tradeoffs is made. Memory, speed,
filesystem access etc.
I had to look twice before I understood what you did with the shuffle.
--
Aschwin Wesselius
What you would like to be done to you, do that to the other..
o use such hooks.
Thanks.
Aschwin Wesselius
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Aschwin Wesselius wrote:
Chris wrote:
have you considered installing a local copy of php (and suitable
webserver)
so you can test it there?
I'd also suggest using a revision control system (subversion or git)
and have pre-commit hooks to check the syntax.
It's a bit of work
Also good to investigate are huge loops, huge
arrays that are iterated over etc.
Do this step by step so you are sure which part you are investigating.
Otherwise you have 10 steps, 10 results and you don't know anymore where
to look.
Good luck.
Aschwin Wesselius
--
PHP General Mail
ntrol about virtual paths etc.
As always: TIMTOWTDI, so I'm gonna play with this .htaccess rule and see
if this is better than a 404 handler.
Aschwin Wesselius
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
all the options in depth and may not work like scp does
(which is way more secure).
So I would go with scp in a cronjob, but netcat is still an option.
--
Aschwin Wesselius
What you would like to be done to you, do that to the other
--
PHP General Mailing List (http://www.php.net/)
systems is somehow weird. I think
it is very intensive and like I said if somehow one part of the syncing
'hangs', it can fill memory or bandwidth very quickly.
So, I can't still figure out what has to be done over to these computers
every minute or whatever. The situation is n
= 's ';
}
}
elseif ($seconds > 0) {
$amount = $seconds;
$unit = ' second';
if ($seconds > 1) {
$unit.= 's ';
}
}
return $amount.$unit;
}
$posted = ; // some timestamp in t
. save in database or in folder?
You guys seem to be a little sensitive about the subject ;-)
I think I'm gonna dive into the archives then. To see for myself what
left such a scars upon that subject.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
th1) == file_get_contents($path2));
}
I would say, use a md5 checksum on both files:
function files_identical($path1, $path2) {
return (md5(file_get_contents($path1)) === md5(file_get_contents($path2)));
}
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
iving%20on%20the%20left.htm
But I don't know who started with top-posting which is against the
netiquette RFC.
People sticking with strict HTML, coding standards in PHP, valid XML,
nice pixelf*cked CSS etc. and not posting below a message on a list are
a bunch of hypocrites. Simple
high creek in a 4-wheel drive auto
might think such a thing impossible if they were unaware of 4-wheel
drive.
LOL.... well said.
Aschwin Wesselius
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to test instead in
building the surrounding elements?
Again, maybe I've to dive into archives etc. But that doesn't give me
answers I need I guess.
Thanks in advance.
Aschwin Wesselius
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
for RAD and then writing your own framework..... Must be kidding ;-)
OK, thanks for your input. Some points are really helpful!
Aschwin Wesselius
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
question.
-1 for thinking rhetorical question responses mean jack.
-1 for thinking +2 exists.
*Yawn*
-5 for not keeping this kind of childish behavior of the list (both of you)
Aschwin Wesselius
c.
Voila, all arguments for a good framework. Zend sounds really a stable
and reliable product. I'm gonna setup a testserver and see how far it goes.
BTW, any people having experience with PHP UnderControl?
Aschwin Wesselius
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
toiletseat? ;-)
Why don't you just put a toiletseat behind your desk? Saves the effort
walking down to the restroom.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
e db exist.
This will run via cron
Has anyone done something similar before, willing to assist me with a basic
scope of actions to work on?
Hi,
Do you already have some code? Do you got stuck somewhere?
Aschwin Wesselius
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, v
ey manage pretty well..
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
g amazing, really. If that makes the PHP community as
great as it has become, I want to join and put some effort in this
marvelous activity.
Aschwin Wesselius
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- $r, $u, $stillWithMe
Aaah. so we're just six points before the end of this thread? ;-)
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
tion
it is faster off course
// echo 'Yeah, friday!';
}
}
Something similar worked for me to find out when daylight saving time is.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
obody wins
- $r, $u, $stillWithMe
Cheers,
Rob.
Aha, you lose. You were the first to mention Nazis. :-)
Hey, at least I've learned something today. I thought he was joking
about Godwin's Law and whatever. But it really exists! Nice to know.
--
Aschwin Wesselius
/'What you
s your opinion about (ab)using rewrites / redirects? Do you use it
quick and dirty, or is it some elegant way of controlling flow?
Thanks.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
t not knowing what to do with flow. So, if you know what you want
to handle (control) and what you want the user to see (view), one should
be able to model it without the use of redirects unless it really is needed.
Or is it OK, to redirect and 'simplify' the flow?
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
a user get's to the right destination?
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
uld be 60.000 requests (besides all the images,
stylesheets, javascripts that are being re-requested). Or am I talking
nonsense?
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
HP? Or does anybody has a hint how to
start doing it myself (maybe examples in Python or C which can be ported)?
Again, I'm not after PHPLib or FPDF, since these libraries are either
old or insufficient for what I want.
Thanks in advance.
Aschwin Wesselius
--
PHP General Mailing
irefox, you can use the Yslow extension. This will
show you the bottlenecks of the page loaded (images, stylesheets,
javascripts, total duration, total size etc.).
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
whole string is different and thus unique.
Hope this helps!
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
gging
knowhow on this, not just some handwaving estimates please
Ed W
Maybe still some handwaving, but my colleague forwarded me this link:
http://www.bit-tech.net/bits/2007/10/16/64-bit_more_than_just_the_ram/1
I hope that's still in your interest.
--
Aschwin Wesselius
/'What yo
tions increase with this factor.
I think the memory goes into a square ratio (NxN) instead of just saying
double (Nx2). Again, I'm not a wizzkid with enough math experience. This
is just my simple and humble reasoning.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
ere.
Also, OOP is nice and all (not to start a thread about OOP again), but
putting your config into an object seems a bit overdo to me.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
rs is not something I would
like to build for any customer.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
any third party software installed? Like a BB or a CMS or
whatever?
When these hackers know your site/server is vulnerable they will keep on
exploiting it. Even if it just means SMTP relaying for phishing or a
HTTP directory for putting malware in.
Keep track of your HTTP-logs and see if these
any third party software installed? Like a BB or a CMS or
whatever?
When these hackers know your site/server is vulnerable they will keep on
exploiting it. Even if it just means SMTP relaying for phishing or a
HTTP directory for putting malware in.
Keep track of your HTTP-logs and see if these
Lester Caine wrote:
'If it isn't broken don't fix it' causes a problem when YOU know that
the step change will make future development easier, but the customers
keep asking - 'Can you just add XXX' :(
So they actually ask for a porn site?
--
PHP General Mailing List (http://www.php.net/)
ad. When the load decreases, MySQL is better being able
to keep up with the processes.
--
Aschwin Wesselius
'What you would like to be done to you, do that to the other'
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
short hint on using indexes. But becoming a master
does not come over night. Try the website www.mysqlperformanceblog.com
for more good solid tips on these topics.
Aschwin Wesselius
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
table contains etc.
Besides that, benchmarking your development environment (you do have one
do you?) can gives you a good idea on how your hardware and setup performs.
Aschwin Wesselius
Hi,
Recently there is a webinterface for interpreting the results of XDebug:
http://blog.agoraproduction.com/index.php?/archives/67-XDebug-to-finally-get-a-Web-Frontend.html
Maybe it is for your interest.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
p($matches);
?>
I'm not an expression guru either, but I think it works OK. I had to
find 'link', 'img', 'a' and other tags in HTML and used a more complex
expression for it which worked like a charm.
It's just an example. For you, you have to leave away the 'a' tag in the
$tags array, to get what you want.
Hope it helps!
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
Aschwin Wesselius wrote:
Ryan S wrote:
Hey all!
To say I suck at regex is an understatement so really need any help I
can get on this, I have a page of text with different html tags in
them, but each "block" of text has a or a < class="something">
tag... anybod
Aschwin Wesselius wrote:
Aschwin Wesselius wrote:
Ryan S wrote:
Hey all!
To say I suck at regex is an understatement so really need any help
I can get on this, I have a page of text with different html tags in
them, but each "block" of text has a or a < class="something
the attachments and do not rely on the MIME-type
only. People can spoof that kind of files.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
it an desktop application? Is it console based?
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
defined as a subdomain in the DNS*
I need to include in my index.php the file /home/pages/fckeditor/fckeditor.php
I have:
@define('FCKEDITOR_BASE', dirname(__FILE__));
require FCKEDITOR_BASE . '/../fckeditor/fckeditor.php';
Hi,
Try this '../fckeditor/fckeditor.php'
x27;s ownership is the
site-name, and I want the scrip to be able to determine if it can
delete a file. Thus, the file in question must have its "other"
permissions include write.
Surely, there must be an easier way.
Thanks, Al
Hi,
Maybe this is what you need:
http://nl.ph
e on the page?
Hi,
I said before that the example could be a little bit overkill, but it
gives a quick example how to find any tag(s) given, with any
attribute(s) given and with any text given in between the opening and
closing tag.
And yes, it might be incomplete or maybe not even accurate, but it does
give you a headstart on your solution. There always will be people who
will give you a shorter, cleaner, more beautiful example, but I hope
that it was helpful for you or will be helpful for someone else.
Cheers,
Aschwin Wesselius
Chetan Rane wrote:
Hi All
I am using a PHP Mailer to send mass mails.
How can I Identify how mails have bounced.
Hi,
I guess you have to read some RFC's to get an idea about e-mail protocols.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
Hello list,
Is there anyone having experience with finding "dead code" in their
library / application?
Dead code as in unused variables, uncalled methods, uncalled functions,
undeclared classes etc.
Any help on examples, resources etc. is much appreciated.
--
Aschwin Wesselius
robert wrote:
Not that i can tell. Yahoo and google have a signature: googlebot and
slurp. both of them also check my site over a span of days. that's all
good. The others come from regular isps as far as their IP tells me
and the hits are within milliseconds.
Hi,
Are the URL's legit? Or are
r(s) right now, so I can't give you the
exact name of the package..
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
work instead of the script part is just:
header('Location: 3.html');
exit;
But I'm not sure it works.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
that cross my mind about this:
A simple end of script tag:
?>
But that is really vague of course.
Another would be:
function life(&$user) {
while($user->days_on_earth !== COUNTED) {
$user->do_stuff();
}
$user->disconnect();
}
Endless things possible with pr
Robin Vickery wrote:
2008/6/27 Brice <[EMAIL PROTECTED]>:
A classical :
echo PHP_EOL;
If even your kids don't know your name, since you're always busy hacking
away:
"Rest in peace"
posix_getppid();
Johnny jr.
Susie
Melanie
--
Asc
x27;ll think of something smarter...this is the first thing that came
into my mind.
Btw why is it so important to use autoloading anyway?
Hi,
Has anybody used the PECL extension automap yet and if so, are there
issues with using that to autoload or not?
Greetings,
Aschwin Wesselius
--
PHP
aEdit on a 22" Dell flatscreen.
I'd rather use Linux and probably monospace as small as possible.
In PuTTY I use 6pt Proggy's OptiSmall to hack away in Nano on the
commandline.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
n relate Oceania to, is not such a funny story about
knowing everything about people.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
.
The Fallacy of Premature Optimization:
http://www.acm.org/ubiquity/views/v7i24_fallacy.html
So, let's define premature please
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
your error log or
look at mysql_error() for a reason why.
Probably the mysql extension is not found or not loaded (due to not
being compiled with the right path or the default path in PHP is not the
right one). Happened to me a couple of times.
--
Aschwin Wesselius
/'What you would like to
Eric Butera wrote:
On Mon, Jul 21, 2008 at 7:55 AM, Aschwin Wesselius
<[EMAIL PROTECTED]> wrote:
Probably the mysql extension is not found or not loaded (due to not being
compiled with the right path or the default path in PHP is not the right
one). Happened to me a couple of
Richard Heyes wrote:
Anyone know of an unintrusive code beautifier written specifically with in mind?
Thanks.
Hi,
With 'what' in mind?
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
it.
That's my two cents.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
;t say it's unreadable,
but I can say it about my coworkers code.
So, for now I use PHP_Beautifier and not some IDE tool wich meets only
half way and misses the point.
Aschwin Wesselius
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
files.
I'd like to be able to read as many of the major video formats (AVI, XVID,
DIVX, QT, etc) as possible.
Hi,
Maybe this is something for you:
http://getid3.sourceforge.net
I've used an older version a while ago, but it did some video
recognition too as far as I know.
It'
Aschwin Wesselius wrote:
Rene Veerman wrote:
Hi.
I want to enable video and flash for my CMS, but that requires that i
can
read at least the dimensions of a video file..
ImageMagick's "identify" command supposedly reads AVI and MPEG, but i
can't
get it to work on my a
build your own downsized version of such a library and use it as
you see fit.
On Mon, Jul 28, 2008 at 11:41 AM, Aschwin Wesselius
<[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
Rene Veerman wrote:
Hi.
I want to enable video and flash for my CMS, but that requir
...or will be again
within short notice... ;-)
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
ibt Sie ein Response, und konnen mit fgets() oder fread()
ausgelesen worden.
Wieso, $tmp = fgets($fp); Und weiter Sie konnen $tmp ins $File schreiben.
fclose($File);
fclose($fp);
Vielleicht ist es nicht gar richtig, aber Sie konnen das doch testen.
Viel Spaß mit coding.
Grüße
Aschwin Wessel
ion).
If you have different XSL files, you can have different formatting on
the same data.
But anyhow Simple XML should be what it's called after Simple....
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
SXZHENMTVKEHJZQPYZ
But it seems a bit unhandy and a workaround, if I have to the
settype() thing each time I call a webservice. Is there a simpler way?
Regards
Marten
Hi,
What about $response->key ??? What does that give? It seems to me, that
$response->key will be a public property of the stdClass?
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
look at my browser cache. Maybe I find something.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
ch for the best
solutions either. It's not that my job depends on it, but personal data
is a big loss too.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
Daniel Brown wrote:
On Tue, Aug 5, 2008 at 8:53 AM, Aschwin Wesselius
<[EMAIL PROTECTED]> wrote:
I wouldn't like to loose my stuff, but I can't afford much for the best
solutions either. It's not that my job depends on it, but personal data is a
big loss too.
lready has tried the software and has arguments against it,
fine let them speak out.
But I do feel much against a 'my editor, my framework, my blah is better
than yours' flamewar discussion for the next 3 weeks. So I think I get
your point.
--
Aschwin Wesselius
'What you wo
-)
How far did you get searching the web? Have you read documentation about
VCard formats etc.? Maybe there are even Requests For Comments (RFC's)
about it.
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
up much more
than that. Like somebody else says, the integers take a lot of space, so
beware of typecasting properly..
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
you want to get free from your government, check out these pages and
at least know your rights:
http://www.thinkfree.ca/
http://spiritualeconomicsnow.net/
--
Aschwin Wesselius
/'What you would like to be done to you, do that to the other'/
1 - 100 of 114 matches
Mail list logo