|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 25 Jun 2003 00:18:25 -0000 Issue 2137
php-general-digest-help
lists.php.net
Date: Tue Jun 24 2003 - 19:18:25 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 25 Jun 2003 00:18:25 -0000 Issue 2137
Topics (messages 152594 through 152677):
Re: WEB HOST NEEDED!!!!!
152594 by: Brian McGarvie
152595 by: Jay Blanchard
152637 by: Wendell Brown
152641 by: Mark Tehara
152671 by: erythros
Re: Encoding
152596 by: Jay Blanchard
152631 by: dorgon
Re: Expensive WEB HOST NEEDED!!!!!
152597 by: Marios Adamantopoulos
152604 by: Robert Cummings
152621 by: Jerry M. Howell II
152646 by: Steve Magruder
Re: Write, Zip and Email
152598 by: SLanger.spirit21.de
152600 by: Manuel Lemos
Re: correct encoding for emails
152599 by: Manuel Lemos
152605 by: Harry Wiens
152618 by: David Nicholson
152620 by: Manuel Lemos
Re: client side cache
152601 by: Cesar Cordovez
Re: apache mod_php memory leak, need help.
152602 by: Ray Aspeitia
Re: WEB HOST
152603 by: Paul Chvostek
weird switch behaviour
152606 by: cg
152610 by: Robert Cummings
152624 by: Slava
Re: <?xml version="1.0" encoding="UTF-8>
152607 by: Doug Essinger-Hileman
Javascript in PHP
152608 by: Info.Best-IT
152609 by: Harry Wiens
152613 by: Chris Hayes
152616 by: Chris Hayes
152649 by: Info.Best-IT
Re: preg_replace problem
152611 by: Wendell Brown
Send BCC mail with PHP
152612 by: Russell P Jones
152615 by: David Nicholson
152617 by: Chris Hayes
Gd Lib PHP.4.3.2 Gentoo
152614 by: Sancar Saran
152635 by: Sancar Saran
my first PHP...posting in forms
152619 by: Wilbert Enserink
152622 by: Robert Cummings
PHP parser extension?
152623 by: anzenews
152625 by: Ford, Mike [LSS]
152628 by: Robert Cummings
152643 by: Lars Torben Wilson
Re: free dynamic MENU
152626 by: Jim Lucas
images..
152627 by: Edward Peloke
152654 by: Jason Wong
emalloc() error being thrown {LONG}
152629 by: Jay Blanchard
Re: topic_maps with php
152630 by: dorgon
newbie question
152632 by: Blake Schroeder
152634 by: Jay Blanchard
C-DLL in PHP!
152633 by: macs_aut
Re: emalloc() error being thrown {LONG} - MORE
152636 by: Jay Blanchard
calling functions in classes using text and graphic links
152638 by: Daniel Rychlik
152639 by: Chris Sherwood
152645 by: Daniel Rychlik
Re: return all non-tag characters
152640 by: Pete Morganic
Freeing memory WAS emalloc() error being thrown {LONG} - MORE
152642 by: Jay Blanchard
socket_fd_alloc
152644 by: Lucas Lain
Reg Exp help needed
152647 by: Sparky Kopetzky
152652 by: Don Read
Re: free web host needed.
152648 by: Daevid Vincent
Re: identify not only browser, but even browser windows
152650 by: dorgon
php caches mysql connections to same host
152651 by: dorgon
152653 by: dorgon
152673 by: Robert Cummings
Are there any PHP functions for creating graphs and/or charts?
152655 by: Dan Anderson
152656 by: Jay Blanchard
152668 by: Joseph Szobody
Session problem
152657 by: Karina S
152658 by: Dan Joseph
ereg_replace and quotation marks
152659 by: Paul Nowosielski
MSWord attachment with mail()
152660 by: Alberto Brea
152661 by: Esteban Fernandez
152662 by: Chris Hayes
152663 by: Chris Hayes
152669 by: dorgon
Using variables from includes
152664 by: Ben
152667 by: Leif K-Brooks
152670 by: Ben
152674 by: Leif K-Brooks
152675 by: Ben
please, php vpopmail windows
152665 by: David D
Re: MSWord attachment with mail() (III)
152666 by: Chris Hayes
exec, passthru calling /usr/local/bin/php4 problem
152672 by: Devin
how to get the date of this Saturday all the time?
152676 by: poetbox
152677 by: Jennifer Goodie
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Stop posting these messages!
And save up money! :) and do what the rest of us do!
"Denis 'Alpheus' Cahuk" <denis.cahuk
guest.arnes.si> wrote in message
news:5.2.0.9.0.20030624140740.00bffc00
pop3.arnes.si...
> Like I said, I need a web host.
> It MUST support PHP, mySQl and sending emails, optional.
> It shouldn't have any ads (pop-ups, ads), but I will allow if it has
> watermarks (SMALL! watermarks).
> It should be TOTALY FREE!
>
attached mail follows:
[snip]
Like I said, I need a web host.
It MUST support PHP, mySQl and sending emails, optional.
It shouldn't have any ads (pop-ups, ads), but I will allow if it has
watermarks (SMALL! watermarks).
It should be TOTALY FREE!
[/snip]
Denis I am going to make a small suggestion, please Google for this
information. Apparently many of the answers that have been given to you
on this list are not acceptable. Do some research. There is no such
thing as totally free.
HTH!
Jay
attached mail follows:
On Tue, 24 Jun 2003 14:09:30 +0200, Denis 'Alpheus' Cahuk wrote:
>It should be TOTALY FREE!
I've got you covered. I will happily offer all of the items you
request. No advertising or anything, full php, front page, mysql, 500
Meg disk space.
I do charge $500 per month if you want upload privileges, a login and
in your case the necessary monthly application of Troll-Be-Gone....
attached mail follows:
http://www.futurepathsnz.com/webhosting.html
Cheap hosting.
http://www.aoteahosting.com/
Moew Cheap hosting
Free isn't the word. Free is for scabs
----- Original Message -----
From: "Denis 'Alpheus' Cahuk" <denis.cahuk
guest.arnes.si>
To: <php-general
lists.php.net>
Sent: Wednesday, June 25, 2003 12:09 AM
Subject: [PHP] WEB HOST NEEDED!!!!!
> Like I said, I need a web host.
> It MUST support PHP, mySQl and sending emails, optional.
> It shouldn't have any ads (pop-ups, ads), but I will allow if it has
> watermarks (SMALL! watermarks).
> It should be TOTALY FREE!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
he should ask for a pony too while he's at it...
"Jay Blanchard" <jay.blanchard
niicommunications.com> wrote in message
news:C8F323573C030A448F3E5A2B6FE2070B0101F853
nemesis...
[snip]
Like I said, I need a web host.
It MUST support PHP, mySQl and sending emails, optional.
It shouldn't have any ads (pop-ups, ads), but I will allow if it has
watermarks (SMALL! watermarks).
It should be TOTALY FREE!
[/snip]
Denis I am going to make a small suggestion, please Google for this
information. Apparently many of the answers that have been given to you
on this list are not acceptable. Do some research. There is no such
thing as totally free.
HTH!
Jay
attached mail follows:
[snip]
So you don't know what encoding I should use?
At 19:39 24.6.2003 +0800, you wrote:
>On Tuesday 24 June 2003 19:07, Denis 'Alpheus' Cahuk wrote:
> > My surname (Čahuk, I write it Cahuk) is writen with a C and a \/ above it.
> > What encoding do I need so that every1 will see it?
>
>Can we just call you Denis?
[/snip]
Well, you have not said what language needs to be encoded for. You can Google for "[insert language here] encoding" to find out.
HTH!
Jay
attached mail follows:
pleeeease
ISO-8859-2 is the one you'll need.
Denis 'Alpheus' Cahuk wrote:
> So you don't know what encoding I should use?
>
> At 19:39 24.6.2003 +0800, you wrote:
>
>> On Tuesday 24 June 2003 19:07, Denis 'Alpheus' Cahuk wrote:
>> > My surname (Čahuk, I write it Cahuk) is writen with a C and a \/
>> above it.
>> > What encoding do I need so that every1 will see it?
>>
>> Can we just call you Denis?
>>
>> --
>> Jason Wong -> Gremlins Associates -> www.gremlins.biz
>> Open Source Software Systems Integrators
>> * Web Design & Hosting * Internet & Intranet Applications Development *
>> ------------------------------------------
>> Search the list archives before you post
>> http://marc.theaimsgroup.com/?l=php-general
>> ------------------------------------------
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
I need a web host too
It MUST support PHP, ASP, JSP/Servlets, MySQL, SQL Server 2000, SQL Server
7, Oracle 8 and Oracle 9. It should have a minimum of 1,000,000 pop-up ads,
but I will allow it if it has xxx pictures, big pictures though.
And and before I forget, I WANT TO PAY 1,000 a day for 1 Mb of space and 8Mb
of RAM.
GET REAL there no such thing as FREE HOSTING!!!!
-----Original Message-----
From: Jay Blanchard [mailto:jay.blanchard
niicommunications.com]
Sent: 24 June 2003 13:20
To: Denis 'Alpheus' Cahuk; php-general
lists.php.net
[snip]
Like I said, I need a web host.
It MUST support PHP, mySQl and sending emails, optional.
It shouldn't have any ads (pop-ups, ads), but I will allow if it has
watermarks (SMALL! watermarks).
It should be TOTALY FREE!
[/snip]
Denis I am going to make a small suggestion, please Google for this
information. Apparently many of the answers that have been given to you on
this list are not acceptable. Do some research. There is no such thing as
totally free.
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
attached mail follows:
Do we really need all this pessimism?? I have the exact host he needs. It
supports PHP, MySQL, and sending emails. It has absolutely no pop-up ads
and no watermarks. There is no advertising whatsoever. And the best part...
it is ABSOLUTELY FREE!!
<smallPrint>
ABSOLUTE FREE[tm] hosting is available only to those members of an elite
group of suckers that make monthly curtesy donations of $1000. Account will
be activate upon receipt of first donation.
</smallPrint>
Cheers,
Rob.
Marios Adamantopoulos wrote:
>
> I need a web host too
> It MUST support PHP, ASP, JSP/Servlets, MySQL, SQL Server 2000, SQL Server
> 7, Oracle 8 and Oracle 9. It should have a minimum of 1,000,000 pop-up ads,
> but I will allow it if it has xxx pictures, big pictures though.
>
> And and before I forget, I WANT TO PAY 1,000 a day for 1 Mb of space and 8Mb
> of RAM.
>
> GET REAL there no such thing as FREE HOSTING!!!!
>
> -----Original Message-----
> From: Jay Blanchard [mailto:jay.blanchard
niicommunications.com]
> Sent: 24 June 2003 13:20
> To: Denis 'Alpheus' Cahuk; php-general
lists.php.net
>
> [snip]
> Like I said, I need a web host.
> It MUST support PHP, mySQl and sending emails, optional.
> It shouldn't have any ads (pop-ups, ads), but I will allow if it has
> watermarks (SMALL! watermarks).
> It should be TOTALY FREE!
> [/snip]
>
> Denis I am going to make a small suggestion, please Google for this
> information. Apparently many of the answers that have been given to you on
> this list are not acceptable. Do some research. There is no such thing as
> totally free.
>
> HTH!
>
> Jay
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php
--
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the |
| stuff of nightmares grasp for your soul. |
`---------------------------------------------'
attached mail follows:
> > -----Original Message-----
> > From: Jay Blanchard [mailto:jay.blanchard
niicommunications.com]
> > Sent: 24 June 2003 13:20
> > To: Denis 'Alpheus' Cahuk; php-general
lists.php.net
> >
> > [snip]
> > Like I said, I need a web host.
> > It MUST support PHP, mySQl and sending emails, optional.
> > It shouldn't have any ads (pop-ups, ads), but I will allow if it has
> > watermarks (SMALL! watermarks).
> > It should be TOTALY FREE!
> > [/snip]
You must be kidding. You probably will find one that supports one or two
of these features for free but anyplace thats free will probably have
banners and mabe even watermarks. Most anyone can probably send you to a
cheep place as prices have droped since I started but what your asking
is for someone not to make a living? Kinda unreasonable. Anyways, I try
and avoid these threads as they waste mucho bandwith but here I am :)
--
Jerry M. Howell II
attached mail follows:
Jerry M. Howell II wrote:
>>> -----Original Message-----
>>> From: Jay Blanchard [mailto:jay.blanchard
niicommunications.com]
>>> Sent: 24 June 2003 13:20
>>> To: Denis 'Alpheus' Cahuk; php-general
lists.php.net
>>>
>>> [snip]
>>> Like I said, I need a web host.
>>> It MUST support PHP, mySQl and sending emails, optional.
>>> It shouldn't have any ads (pop-ups, ads), but I will allow if it has
>>> watermarks (SMALL! watermarks).
>>> It should be TOTALY FREE!
>>> [/snip]
> You must be kidding. You probably will find one that supports one or
> two of these features for free but anyplace thats free will probably
> have banners and mabe even watermarks. Most anyone can probably send
> you to a cheep place as prices have droped since I started but what
> your asking is for someone not to make a living? Kinda unreasonable.
> Anyways, I try and avoid these threads as they waste mucho bandwith
> but here I am :)
I don't work for them (<g>), but I recently found a web hosting service that
all but provides the moon for only $49.95 a year (and they're located in the
US!). Check out www.domehost.com - so far, so good for me - and their early
support with getting everything working was fantastic.
Steve
--
Steve Magruder Consulting - http://consulting.stevemagruder.com
attached mail follows:
> I believe that there is a pure PHP
> class (does not rely on external programs) which allows you to work with
zip
> archives.
You can find it in the sources of phpMyAdmin its called zip.lib.php. It
should be located in the libraries folder.
Regards
Stefan
attached mail follows:
Hello,
On 06/24/2003 07:36 AM, Twsc Hq wrote:
> Is it possible to write to files on a server via a browser, then zip those
> files up and email them to the user?
>
> Detail:
> I want to enable my website visitors to customize a php script with their
> details, all via field inputs. Write that personal info into the script
> files << upto here it's easy >> but how does the server zip the package up,
> email the package to the visitor and reset the values for the next user?
Usually you call the zip program from your PHP script. You may want to
look at several classes here that do that.
http://www.phpclasses.org/browse.html/class/42.html
As for sending it by e-mail, you may want to take a look at this class
for composing and sending messages with attachments:
http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
Hello,
On 06/24/2003 07:47 AM, Harry Wiens wrote:
> i'm coding a mail handler in php. i live in germany, and in germany we have
> "umlaute" (ä,ö,ü). I don't know how to display them right, or how i have to
> convert the text. sometimes, not always when i display my mails in php i
> have "L=F6sungen" but it must be "Lösungen". What do I have to do, to
> display everything correct?
You need to use q-encoding to use non 7 bit ASCII characters in the
headers and quoted-printable encoding in the text body parts.
You may want to try this class that already does that for you making it
easy to compose and send messages in any idioms:
http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
The problem is not sending or composing the email (what your class is for),
but displaying all the recieved messages.
Btw how do i use "quoted-printable encoding" ?
mfg.
Harry Wiens
"Manuel Lemos" <mlemos
acm.org> schrieb im Newsbeitrag
news:20030624124936.6424.qmail
pb1.pair.com...
Hello,
On 06/24/2003 07:47 AM, Harry Wiens wrote:
> i'm coding a mail handler in php. i live in germany, and in germany we
have
> "umlaute" (ä,ö,ü). I don't know how to display them right, or how i have
to
> convert the text. sometimes, not always when i display my mails in php i
> have "L=F6sungen" but it must be "Lösungen". What do I have to do, to
> display everything correct?
You need to use q-encoding to use non 7 bit ASCII characters in the
headers and quoted-printable encoding in the text body parts.
You may want to try this class that already does that for you making it
easy to compose and send messages in any idioms:
http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
Hello,
This is a reply to an e-mail that you wrote on Tue, 24 Jun 2003 at 14:41,
lines prefixed by '>' were originally written by you.
> Btw how do i use "quoted-printable encoding" ?
I'll admit now that I have not read the relevant RFC so I am open to
corrections.
From examining existing e-mails I recieved I determined that quoted
printable appears to do this to the message body:
$body = preg_replace("/([=?_])/e","strval('=' .
strtoupper(dechex(ord('\\1')))) ",$body);
i.e. =, ? and _ symbols are replaced with an equals sign, followed
by the ascii code for the character required (in uppercase hex).
HTH
David.
--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/
Professional Web Development by David Nicholson
http://www.djnicholson.com/
QuizSender.com - How well do your friends actually know you?
http://www.quizsender.com/
(developed entirely in PHP)
attached mail follows:
Hello,
On 06/24/2003 10:50 AM, Harry Wiens wrote:
> The problem is not sending or composing the email (what your class is for),
> but displaying all the recieved messages.
Ok, you said mail handler and it was not clear if you were handling the
process of sending or receiving.
> Btw how do i use "quoted-printable encoding" ?
http://www.php.net/quoted-printable-decode
> "Manuel Lemos" <mlemos
acm.org> schrieb im Newsbeitrag
> news:20030624124936.6424.qmail
pb1.pair.com...
> Hello,
>
> On 06/24/2003 07:47 AM, Harry Wiens wrote:
>
>>i'm coding a mail handler in php. i live in germany, and in germany we
>
> have
>
>>"umlaute" (ä,ö,ü). I don't know how to display them right, or how i have
>
> to
>
>>convert the text. sometimes, not always when i display my mails in php i
>>have "L=F6sungen" but it must be "Lösungen". What do I have to do, to
>>display everything correct?
>
>
> You need to use q-encoding to use non 7 bit ASCII characters in the
> headers and quoted-printable encoding in the text body parts.
>
> You may want to try this class that already does that for you making it
> easy to compose and send messages in any idioms:
>
> http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
attached mail follows:
Hi!
I used to have this problem until I started using in all of my scripts
the following:
<?php
$t = time("U"); // this is the time in seconds from 1/1/1970
$url = "whateveryouwant.php?t=$t";
// place here something like:
printf("<a href='%s'>Click here to go to what ever</a>", $url);
>?
Whith this, the cache of your client will 'think' it is a different page
and force it to load it.
Cesar
Jean-Christian IMbeault wrote:
> Aljosa Mohorovic wrote:
>
>>i have problems with client side cache, how can i disable it?
>>i use this, but it still caches pages.
>
>
> What are your problems exactly and what is the client?
>
> Remember that the client might not be honouring your caching headers and
> if that is the case there is nothing you can do about it. i.e. it may be
> an ill-behaving client which isn't following standards.
>
> Jean-Christian Imbeault
>
>
attached mail follows:
Just another note,
it seems that for every page access, there is exactly 680k of memory
that accumulates.
Any php developer know of any odbc function that takes up 680k of
overhead that might not be getting cleaned up?
Thanks,
Ray A.
>Hello,
>
>I hope someone can help me or point me in a good direction.
>
>I have a database driven website, all ODBC to postgresql, that
>little by little eats up resources on apache.
>
>The child processes will start off at 30Mb of virtual memory and run
>up around 230Mb each child. (see below ps output) before they start
>dying.
>
>It does not even take 700 accesses per child to max out memory.
>
>I then start getting funny errors like access denied to file or
>could not open socket, or file not found.
>
>I read all to documentation and as far as I know, php should release
>any defined query resources once the script executes.
>
>I already code with odbc_close($conn); on all my pages. It is not
>feasible to use odbc_free_result() on every query, due to the
>complexity of scripts, but the documentation for odbc_free_result
>says you shouldn't have to.
>
>That is the only thing that I can think of that could be draining
>this much resources. Is there any good way to find out what is
>eating up the memory. Anyone else run into this.
>
>I'm running apache 1.3.27 with php 4.3.2 (happened in version 4.3.1
>also) on mac OSX SERVER 10.2.4
>
>Thanks in advance,
>
>Ray A.
>
>
>PS OUTPUT
>---------------------------------------------------------------------------
>root 468 0.0 0.3 30992 2152 ?? Ss 4Jun03
>1:30.04 /usr/sbin/httpd
>www 1743 0.0 1.2 222600 10032 ?? S 8:00AM
>2:16.31 /usr/sbin/httpd
>www 1767 0.0 1.1 220560 9592 ?? S 8:01AM
>1:58.56 /usr/sbin/httpd
>www 1806 0.0 1.1 215800 9588 ?? S 8:13AM
>1:46.92 /usr/sbin/httpd
>www 1876 0.0 1.1 210360 9532 ?? S 8:44AM
>1:56.10 /usr/sbin/httpd
>www 1878 0.0 1.3 224304 10904 ?? S 8:44AM
>2:13.93 /usr/sbin/httpd
>www 1879 0.0 1.2 219880 9912 ?? S 8:44AM
>2:10.85 /usr/sbin/httpd
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
On Tue, Jun 24, 2003 at 01:43:02PM +0200, Denis 'Alpheus' Cahuk wrote:
>
> THe host is good, but buggy.
> I cant install pre-made scripts (like the phorum or phpBB) and I can't
> access to phpMyAdmin and cant change my password anymore, and cant even
> cancel
I *did* say it was under construction. I haven't yet written the
scripts to cancel or do automatic software installation yet. They're on
the menus so folks can see what's coming. You should be able to get
into phpMyAdmin, but it can take a minute for your password to be
updated after you confirm the account.
--
Paul Chvostek <paul
it.ca>
it.canada http://www.it.ca/
Free PHP web hosting! http://www.it.ca/web/
attached mail follows:
I am testing a var in a switch statement,
switch($type)
{
case "HIRE":
statements;
break;
etc....
default:
echo "In Default";
break;
}
I can echo $type directly above the switch statement, confirm it contains
the string "HIRE", but the switch takes the default every time!!
what is going on??
thanks
attached mail follows:
Try the following:
echo '['.$type.']';
to rule out the possibiliy of spaces around the word.
Cheers,
Rob.
cg wrote:
>
> I am testing a var in a switch statement,
> switch($type)
> {
> case "HIRE":
> statements;
> break;
> etc....
> default:
> echo "In Default";
> break;
> }
> I can echo $type directly above the switch statement, confirm it contains
> the string "HIRE", but the switch takes the default every time!!
>
> what is going on??
>
> thanks
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the |
| stuff of nightmares grasp for your soul. |
`---------------------------------------------'
attached mail follows:
Try it:
switch($type)
{
case HIRE:
statements;
break;
etc....
default:
echo "In Default";
break;
}
"Cg" <colingresty
yahoo.co.uk> wrote in message
news:20030618131802.18152.qmail
pb1.pair.com...
> I am testing a var in a switch statement,
> switch($type)
> {
> case "HIRE":
> statements;
> break;
> etc....
> default:
> echo "In Default";
> break;
> }
> I can echo $type directly above the switch statement, confirm it contains
> the string "HIRE", but the switch takes the default every time!!
>
> what is going on??
>
> thanks
>
>
attached mail follows:
On 24 Jun 2003 at 4:33, Philip Olson wrote:
> No. (btw, be sure to quote your strings). In reading
> the table found here:
Thanks. That is a mistake I make frequently. The "good" thing about
that is that if there is an error the first thing I look for is
whether I have quoted my strings. ;-}
> http://www.php.net/ini_set
>
> You will notice short_open_tag has this level:
>
> PHP_INI_SYSTEM|PHP_INI_PERDIR
>
> And according to the documentation, most namely the
> documenation found here:
>
> http://www.php.net/configuration.changes
>
> It can be set in the following (in Apache) or similar
> depending your web server:
>
> .htaccess
> php.ini
> httpd.conf
>
> Closest you have is .htaccess But, if you don't want
> to worry about it, just use echo as someone already
> suggested, instead of embedding it. Something like:
>
> echo '<?xml version="1.0" encoding="UTF-8">';
>
> Btw, the question proposed in this thread is also a
> documented FAQ here:
>
> http://www.php.net/manual/en/faq.using.php#faq.using.mixml
Thanks, again. As someone just starting to learn php, I'm also just
starting to learn where answers to my questions can be found.
Doug
attached mail follows:
How can I get a script to work on a page that has HTML generated by PHP and
a javascript with functions called by an checkbox?
javascript:
function PrintScript(){
$js = "function CheckBox1()";
$js .= "{var box1 = window.document.ctype.wr;var box2 =
window.document.ctype.pfo;var box3 = window.document.ctype.pr;";
$js .= "if (box1.checked == true ) {box2.checked = false;box3.checked =
false;}";
$js .= "}";
$js .= "function CheckBox2(){var box1 = window.document.ctype.wr;var box2 =
window.document.ctype.pfo;var box3 = window.document.ctype.pr;";
$js .= "if (box2.checked == true ) {box1.checked = false;box3.checked =
false;}";
$js .= "}";
$js .= "function CheckBox3(){var box1 = window.document.ctype.wr;var box2 =
window.document.ctype.pfo;var box3 = window.document.ctype.pr;";
$js .= "if (box3.checked == true ) {box1.checked = false;box2.checked =
false;}}";
return $js;
}//end function
This function is called by a Display() function and here is the final out
put in HTML:
<head>
<title> Independent Fact Finders Inc. </title>
<meta name="description" content="Independent Fact Finders Inc.">
<META name="keywords" content="Legal, background checks, background, check,
records, paralegal, lawyer, attorney">
<meta name="allow-search" content="yes">
<meta name="audience" content="all">
<meta name="robots" content="all, index, follow">
<meta name="revisit-after" content="14 days">
<meta name="Rating" content="General">
<meta name="Language" content="en">
<meta name="distribution" content="Global">
<meta name="Classification" content="Legal">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="iffinet.css" type="text/css" />
<script>function CheckBox1(){var box1 = window.document.ctype.wr;var box2 =
window.document.ctype.pfo;var box3 = window.document.ctype.pr;if
(box1.checked == true ) {box2.checked = false;box3.checked =
false;}}function CheckBox2(){var box1 = window.document.ctype.wr;var box2 =
window.document.ctype.pfo;var box3 = window.document.ctype.pr;if
(box2.checked == true ) {box1.checked = false;box3.checked =
false;}}function CheckBox3(){var box1 = window.document.ctype.wr;var box2 =
window.document.ctype.pfo;var box3 = window.document.ctype.pr;if
(box3.checked == true ) {box1.checked = false;box2.checked =
false;}}</script></head>
<body TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table width="100%" align="center" cellpadding="0" cellspacing="0">
<tr nowrap>
<td class="tdHorHeader" width="100%" align="center"
valign="middle"></h1><strong>
iffinet.com</h1></strong>
</td>
</tr>
</table>
<div align="center">
<table cellpadding="0" cellspacing="1" width="712" align="middle"
valign="top"><table width="712" height="211" border="0" cellpadding="10"
cellspacing="5">
<tr>
<td class="tdtop" width="230" height="205" align="right"
valign="middle"></td>
<td class="tdtop" width="230" height="205" align="center"
valign="middle"></td>
<td class="tdtop" width="230" height="205" valign="middle"><h1>
Independent Fact Finders Inc.
</h1>
<h2>
Our site, Iffinet.com, is currently under construction. We will be
operational soon.
</h2>
</td>
</tr>
</table>
<table width="100%" bgcolor="#660000" align="center" cellspacing="1"
cellpadding="2">
<tr><td>
<form name="crimetype" method="post" action="">
<input type="checkbox" name="WR" value="1" onClick="return CheckBox1();">
<input type="checkbox" name="PFO" value="2" onClick="return CheckBox2();">
<input type="checkbox" name="PR" value="3" onClick="return
CheckBox3();"></form></td>
<td>1</td>
<td>1</td>
<td>Tim</td>
<td>C</td>
<td>Best</td>
<td>1972-10-02</td>
<td>1111 fb</td>
<td>NOLA</td>
<td>LA</td>
<td>70114</td>
<td>0</td>
<td>happy to be here</td>
<td>0</td>
</tr>
<tr><td>
<form name="crimetype" method="post" action="">
<input type="checkbox" name="WR" value="1" onClick="return CheckBox1();">
<input type="checkbox" name="PFO" value="2" onClick="return CheckBox2();">
<input type="checkbox" name="PR" value="3" onClick="return
CheckBox3();"></form></td>
<td>2</td>
<td>1</td>
<td>Molly</td>
<td>M</td>
<td>Best</td>
<td>0000-00-00</td>
<td></td>
<td></td>
<td></td>
<td>0</td>
<td>0</td>
<td></td>
<td>0</td>
</tr>
</table></table></div><table width="100%" align="center" cellpadding="0"
cellspacing="0">
<tr nowrap>
<td class="tdHorHeader" width="100%" valign="bottom" align="right"><p
class="maintext">Site Development and Graphic Design by
<a class="maintext" href="http://www.best-it.biz" target="_blank">Best
IT</a></p>
</td>
</tr>
</table>
</body>
</html>
This doesnšt work but it illustrates what I would like to do (a little)...
/T
attached mail follows:
i think you have to add "\n" after each row of java script code.
.... $js .= "}\n";
mfg.
harry wiens
"Info
Best-It" <info
best-it.biz> schrieb im Newsbeitrag
news:BB1DBFB5.91E2%info
best-it.biz...
How can I get a script to work on a page that has HTML generated by PHP and
a javascript with functions called by an checkbox?
javascript:
function PrintScript(){
$js = "function CheckBox1()";
$js .= "{var box1 = window.document.ctype.wr;var box2 window.document.ctype.pfo;var box3 = window.document.ctype.pr;";
$js .= "if (box1.checked = true ) {box2.checked = false;box3.checked false;}";
$js .= "}";
$js .= "function CheckBox2(){var box1 = window.document.ctype.wr;var box2 window.document.ctype.pfo;var box3 = window.document.ctype.pr;";
$js .= "if (box2.checked = true ) {box1.checked = false;box3.checked false;}";
$js .= "}";
$js .= "function CheckBox3(){var box1 = window.document.ctype.wr;var box2 window.document.ctype.pfo;var box3 = window.document.ctype.pr;";
$js .= "if (box3.checked = true ) {box1.checked = false;box2.checked false;}}";
return $js;
}//end function
This function is called by a Display() function and here is the final out
put in HTML:
<head>
<title> Independent Fact Finders Inc. </title>
<meta name="description" content="Independent Fact Finders Inc.">
<META name="keywords" content="Legal, background checks, background, check,
records, paralegal, lawyer, attorney">
<meta name="allow-search" content="yes">
<meta name="audience" content="all">
<meta name="robots" content="all, index, follow">
<meta name="revisit-after" content="14 days">
<meta name="Rating" content="General">
<meta name="Language" content="en">
<meta name="distribution" content="Global">
<meta name="Classification" content="Legal">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="iffinet.css" type="text/css" />
<script>function CheckBox1(){var box1 = window.document.ctype.wr;var box2 window.document.ctype.pfo;var box3 = window.document.ctype.pr;if
(box1.checked = true ) {box2.checked = false;box3.checked false;}}function CheckBox2(){var box1 = window.document.ctype.wr;var box2 window.document.ctype.pfo;var box3 = window.document.ctype.pr;if
(box2.checked = true ) {box1.checked = false;box3.checked false;}}function CheckBox3(){var box1 = window.document.ctype.wr;var box2 window.document.ctype.pfo;var box3 = window.document.ctype.pr;if
(box3.checked = true ) {box1.checked = false;box2.checked false;}}</script></head>
<body TOPMARGIN
<table width="100%" align="center" cellpadding="0" cellspacing="0">
<tr nowrap>
<td class="tdHorHeader" width="100%" align="center"
valign="middle"></h1><strong>
iffinet.com</h1></strong>
</td>
</tr>
</table>
<div align="center">
<table cellpadding="0" cellspacing="1" width="712" align="middle"
valign="top"><table width="712" height="211" border="0" cellpadding="10"
cellspacing="5">
<tr>
<td class="tdtop" width="230" height="205" align="right"
valign="middle"></td>
<td class="tdtop" width="230" height="205" align="center"
valign="middle"></td>
<td class="tdtop" width="230" height="205" valign="middle"><h1>
Independent Fact Finders Inc.
</h1>
<h2>
Our site, Iffinet.com, is currently under construction. We will be
operational soon.
</h2>
</td>
</tr>
</table>
<table width="100%" bgcolor="#660000" align="center" cellspacing="1"
cellpadding="2">
<tr><td>
<form name="crimetype" method="post" action="">
<input type="checkbox" name="WR" value="1" onClick="return CheckBox1();">
<input type="checkbox" name="PFO" value="2" onClick="return CheckBox2();">
<input type="checkbox" name="PR" value="3" onClick="return
CheckBox3();"></form></td>
<td>1</td>
<td>1</td>
<td>Tim</td>
<td>C</td>
<td>Best</td>
<td>1972-10-02</td>
<td>1111 fb</td>
<td>NOLA</td>
<td>LA</td>
<td>70114</td>
<td>0</td>
<td>happy to be here</td>
<td>0</td>
</tr>
<tr><td>
<form name="crimetype" method="post" action="">
<input type="checkbox" name="WR" value="1" onClick="return CheckBox1();">
<input type="checkbox" name="PFO" value="2" onClick="return CheckBox2();">
<input type="checkbox" name="PR" value="3" onClick="return
CheckBox3();"></form></td>
<td>2</td>
<td>1</td>
<td>Molly</td>
<td>M</td>
<td>Best</td>
<td>0000-00-00</td>
<td></td>
<td></td>
<td></td>
<td>0</td>
<td>0</td>
<td></td>
<td>0</td>
</tr>
</table></table></div><table width="100%" align="center" cellpadding="0"
cellspacing="0">
<tr nowrap>
<td class="tdHorHeader" width="100%" valign="bottom" align="right"><p
class="maintext">Site Development and Graphic Design by
<a class="maintext" href="http://www.best-it.biz" target="_blank">Best
IT</a></p>
</td>
</tr>
</table>
</body>
</html>
This doesnšt work but it illustrates what I would like to do (a little)...
/T
attached mail follows:
I missed the 1st post but could this be related to form name being 'crimetype'
and the javascript tryin to access the form 'ctype' ?
At 15:55 24-6-03, you wrote:
>i think you have to add "\n" after each row of java script code.
>.... $js .= "}\n";
afaik the ; handles that but indeed i would let the functions start at the
beginning of a new line.
>"Info
Best-It" <info
best-it.biz> schrieb im Newsbeitrag
>news:BB1DBFB5.91E2%info
best-it.biz...
>How can I get a script to work on a page that has HTML generated by PHP and
>a javascript with functions called by an checkbox?
><script>function CheckBox1(){var box1 = window.document.ctype.wr;var box2 =
>window.document.ctype.pfo;var box3 = window.document.ctype.pr;if
>(box1.checked == true ) {box2.checked = false;box3.checked =
>false;}}
[....]
><form name="crimetype" method="post" action="">
><input type="checkbox" name="WR" value="1" onClick="return CheckBox1();">
><input type="checkbox" name="PFO" value="2" onClick="return CheckBox2();">
><input type="checkbox" name="PR" value="3" onClick="return
>CheckBox3();"></form></td>
attached mail follows:
additionally, you named the fields WR PR and PFO
while you refer to them as wr, pr and pfo.
>Date: Tue, 24 Jun 2003 16:04:17 +0200
>To: info
best-it.biz, php-general
lists.php.net
>From: Chris Hayes <chayes
antenna.nl>
>Subject: Re: [PHP] Re: Javascript in PHP
>
>
>I missed the 1st post but could this be related to form name being
>'crimetype'
>and the javascript tryin to access the form 'ctype' ?
>
>
>At 15:55 24-6-03, you wrote:
>>i think you have to add "\n" after each row of java script code.
>>.... $js .= "}\n";
>afaik the ; handles that but indeed i would let the functions start at the
>beginning of a new line.
>
>
>>"Info
Best-It" <info
best-it.biz> schrieb im Newsbeitrag
>>news:BB1DBFB5.91E2%info
best-it.biz...
>>How can I get a script to work on a page that has HTML generated by PHP and
>>a javascript with functions called by an checkbox?
>><script>function CheckBox1(){var box1 = window.document.ctype.wr;var box2 =
>>window.document.ctype.pfo;var box3 = window.document.ctype.pr;if
>>(box1.checked == true ) {box2.checked = false;box3.checked =
>>false;}}
>[....]
>><form name="crimetype" method="post" action="">
>><input type="checkbox" name="WR" value="1" onClick="return CheckBox1();">
>><input type="checkbox" name="PFO" value="2" onClick="return CheckBox2();">
>><input type="checkbox" name="PR" value="3" onClick="return
>>CheckBox3();"></form></td>
attached mail follows:
Yeah, that's a problem! I corrected it and now it comes out like:
<html>
<head>
<title> Independent Fact Finders Inc. </title>
<meta name="description" content="Independent Fact Finders Inc.">
<META name="keywords" content="Legal, background checks, background, check,
records, paralegal, lawyer, attorney">
<meta name="allow-search" content="yes">
<meta name="audience" content="all">
<meta name="robots" content="all, index, follow">
<meta name="revisit-after" content="14 days">
<meta name="Rating" content="General">
<meta name="Language" content="en">
<meta name="distribution" content="Global">
<meta name="Classification" content="Legal">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="iffinet.css" type="text/css" />
<script language="JavaScript">
function CheckBox1()
{
var box1 = window.document.ctype.wr;
var box2 = window.document.ctype.pfo;
var box3 = window.document.ctype.pr;
if (box1.checked == true ) {
box2.checked = false;
box3.checked = false;
}
}
function CheckBox2()
{
var box1 = window.document.ctype.wr;
var box2 = window.document.ctype.pfo;
var box3 = window.document.ctype.pr;
if (box2.checked == true ) {
box1.checked = false;
box3.checked = false;}
}
}
function CheckBox3()
{
var box1 = window.document.ctype.wr;
var box2 = window.document.ctype.pfo;
var box3 = window.document.ctype.pr;
if (box3.checked == true ) {
box1.checked = false;
box2.checked = false;
}
}
</script>
</head>
<body TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
But the script I call from onClick="return CheckBox2()" from a checkbox does
not execute. Is there something in the header info keeping JS from running?
I'm stumped.
/T
on 6/24/03 9:04, Chris Hayes at chayes
antenna.nl wrote:
>
> I missed the 1st post but could this be related to form name being 'crimetype'
> and the javascript tryin to access the form 'ctype' ?
>
>
> At 15:55 24-6-03, you wrote:
>> i think you have to add "\n" after each row of java script code.
>> .... $js .= "}\n";
> afaik the ; handles that but indeed i would let the functions start at the
> beginning of a new line.
>
>
>> "Info
Best-It" <info
best-it.biz> schrieb im Newsbeitrag
>> news:BB1DBFB5.91E2%info
best-it.biz...
>> How can I get a script to work on a page that has HTML generated by PHP and
>> a javascript with functions called by an checkbox?
>> <script>function CheckBox1(){var box1 = window.document.ctype.wr;var box2 =
>> window.document.ctype.pfo;var box3 = window.document.ctype.pr;if
>> (box1.checked == true ) {box2.checked = false;box3.checked =
>> false;}}
> [....]
>> <form name="crimetype" method="post" action="">
>> <input type="checkbox" name="WR" value="1" onClick="return CheckBox1();">
>> <input type="checkbox" name="PFO" value="2" onClick="return CheckBox2();">
>> <input type="checkbox" name="PR" value="3" onClick="return
>> CheckBox3();"></form></td>
>
>
attached mail follows:
On Tue, 17 Jun 2003 07:25:00 -0400, Vincent Bouret wrote:
>I want "A dog jumped over a ladder" to become "<xyz>A</xyz> dog jumped over
><xyz>a</xyz> ladder".
How about this...
$str = "A dog jumped over a ladder";
$str = preg_replace( "/(^| )(a)( |$)/i", "$1<xyz>$2</xyz>$3", str );
attached mail follows:
Is there any way to send mail blind carbon copy via PHP? Or do I need to
write some script that cycles through and sends a separate email for each
individual?
Im trying to write a script for personal use that allows me to send emails
straight from my active desktop, but I would like to allow bcc...
Russ
attached mail follows:
Hello,
This is a reply to an e-mail that you wrote on Tue, 24 Jun 2003 at 15:04,
lines prefixed by '>' were originally written by you.
> Is there any way to send mail blind carbon copy via PHP? Or do I need
> write some script that cycles through and sends a separate email for
> each
> individual?
> Im trying to write a script for personal use that allows me to send
> emails
> straight from my active desktop, but I would like to allow bcc...
> Russ
Using the mail function you can specify additional headers, just add a
header "Bcc: add
re.ss"
David.
--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/
Professional Web Development by David Nicholson
http://www.djnicholson.com/
QuizSender.com - How well do your friends actually know you?
http://www.quizsender.com/
(developed entirely in PHP)
attached mail follows:
At 16:03 24-6-03, you wrote:
>Is there any way to send mail blind carbon copy via PHP? Or do I need to
>write some script that cycles through and sends a separate email for each
>individual?
>
>Im trying to write a script for personal use that allows me to send emails
>straight from my active desktop, but I would like to allow bcc...
>
>Russ
add an additional header called BCC, see the Fine Manual on
www.php.net/mail , i htink it is the 4th parameter
attached mail follows:
Hi,
Is there any problem on Php 4.3.2 GD lib ?
My code works fine on Php 4.3.1 but not work 4.3.2
here code
<?php
Header ("Content-type: image/jpeg");
$text = "some text";
$s = 20;
$fontfile = "/usr/X11R6/lib/X11/fonts/truetype/arial.ttf";
$size = imagettfbbox($s,0,"$fontfile",$text);
$dx = abs($size[2]-$size[0]);
$dy = $s-1;
$xpad=9;
$ypad=9;
$im = imagecreate($dx+$xpad,$dy+$ypad);
$white = ImageColorAllocate($im, 255,255,255);
$black = ImageColorAllocate($im, 0,0,0);
$blue = ImageColorAllocate($im, 0x2c,0x6D,0xAF);
ImageTTFText($im, $s, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black,
"$fontfile", $text);
Imagejpeg ($im);
ImageDestroy ($im);
?>
Thanks for help...
Sancar "Delifisek" Saran
attached mail follows:
I change system from apach2 to apache it fixed...
Sancar Saran
attached mail follows:
hi All,
I got this simple form. Input is submitted using POST to another script. In this other script the variables/values pairs are used.
I tested these scripts on several ISP's, no problem everything goes fine.
Now I migrate the scripts to a different ISP, and voila, the input fields are not transported. Everything is empty.
Anybody has any idea why this is? is this a PHP configuration thing? Maybe something to do with GPC order??
Any idea's are most welcome!
thx Wilbert
-------------------------
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
info
pdd.nl
-------------------------
attached mail follows:
Register globals is probably off. This is old news, keep
up to date by reading hte release documents.
Cheers,
ROb.
Wilbert Enserink wrote:
>
> hi All,
>
> I got this simple form. Input is submitted using POST to another script. In this other script the variables/values pairs are used.
> I tested these scripts on several ISP's, no problem everything goes fine.
> Now I migrate the scripts to a different ISP, and voila, the input fields are not transported. Everything is empty.
>
> Anybody has any idea why this is? is this a PHP configuration thing? Maybe something to do with GPC order??
>
> Any idea's are most welcome!
>
> thx Wilbert
>
> -------------------------
> Pas de Deux
> Van Mierisstraat 25
> 2526 NM Den Haag
> tel 070 4450855
> fax 070 4450852
> http://www.pdd.nl
> info
pdd.nl
> -------------------------
--
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the |
| stuff of nightmares grasp for your soul. |
`---------------------------------------------'
attached mail follows:
Hi!
I hope this is the right newsgroup for posting this... PHP.dev doesn't seem
to be alive anymore?
Is there some extension or anything that would allow me to hook my code to
PHP parser? Even lex and yacc for PHP would be great...
What I want to do is this: lets say tou want to extract all comments from
PHP code. Sure, you can search for '/*' and '*/', and take everything in
between as a comment, but it is not really an idiot-proof way of doing it.
The Right Way (tm) would be to have a parser to do it. There are no tools
to produce a parser in PHP available (at least to my knowledge) and we
don't want to build it from the scratch (it is possible, but not the
easiest way) - but we do have tools that could build such parser in C (lex
& yacc). And since C is the language used for writing extensions to PHP, we
can do it - we just take zend-scanner.l and zend-parser.y and replace all
the code that interprets PHP with the code that prints out comments - piece
of cake. The only problem is - I really wouldn't want to dl() it every time
I need it, not to mention the fact that it is not possible with ISPs that
have secure mode enabled, besides - PHP parser changes from time to time.
To think I should have to support such code for every possible application
gives me creeps. The solution is simple: such extension should be in the
main PHP distribution, but instead of doing predetermined things (like
printing out comments) it should allow developers to hook their own
function wherever they wish - as the code was being parsed, these functions
would get called.
Now for the questions:
- has anyone done someting like this before?
- license - is it OK to take zend_scanner.l and zend_parser.y - I guess the
extension should be then published under Zend license, not GPL?
- is anyone interested in such an extension anyway?
There are many possible applications that could use such extension:
documentation generator (one that works whatever the code), obfuscator,
preprocessor,... It is advanced usage only as the developer should know
about parsers, but still...
If there is enough interest, I could throw together an API of some sort,
maybe even whole extension... Please comment, send opinions, answers,...
Please do not send mail privately as I have this address just for posting
to newsgroups - I will not receive it.
By!
Anze
(By the way, about idiot-proof programs: "Programming is a race between
programmers and universe; programmers, trying to build better idiot-proof
programs, and universe, trying to build better idiots. So far, universe is
winning.")
---------------------
Please do not send mail privately - I do NOT read mail sent
to this address, it is used only for newsgroups (spam
protection).
attached mail follows:
> -----Original Message-----
> From: anzenews [mailto:anzenews
volja.net]
> Sent: 23 June 2003 11:21
>
> I hope this is the right newsgroup for posting this...
> PHP.dev doesn't seem
> to be alive anymore?
It was renamed 'internals' a while ago (see http://www.php.net/mailing-lists.php).
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
I don't know that this kind of funcitonality exists, but that would be
a sweet deal if it did.
Cheers,
Rob.
anzenews wrote:
>
> Hi!
>
> I hope this is the right newsgroup for posting this... PHP.dev doesn't seem
> to be alive anymore?
>
> Is there some extension or anything that would allow me to hook my code to
> PHP parser? Even lex and yacc for PHP would be great...
> What I want to do is this: lets say tou want to extract all comments from
> PHP code. Sure, you can search for '/*' and '*/', and take everything in
> between as a comment, but it is not really an idiot-proof way of doing it.
> The Right Way (tm) would be to have a parser to do it. There are no tools
> to produce a parser in PHP available (at least to my knowledge) and we
> don't want to build it from the scratch (it is possible, but not the
> easiest way) - but we do have tools that could build such parser in C (lex
> & yacc). And since C is the language used for writing extensions to PHP, we
> can do it - we just take zend-scanner.l and zend-parser.y and replace all
> the code that interprets PHP with the code that prints out comments - piece
> of cake. The only problem is - I really wouldn't want to dl() it every time
> I need it, not to mention the fact that it is not possible with ISPs that
> have secure mode enabled, besides - PHP parser changes from time to time.
> To think I should have to support such code for every possible application
> gives me creeps. The solution is simple: such extension should be in the
> main PHP distribution, but instead of doing predetermined things (like
> printing out comments) it should allow developers to hook their own
> function wherever they wish - as the code was being parsed, these functions
> would get called.
>
> Now for the questions:
> - has anyone done someting like this before?
> - license - is it OK to take zend_scanner.l and zend_parser.y - I guess the
> extension should be then published under Zend license, not GPL?
> - is anyone interested in such an extension anyway?
>
> There are many possible applications that could use such extension:
> documentation generator (one that works whatever the code), obfuscator,
> preprocessor,... It is advanced usage only as the developer should know
> about parsers, but still...
>
> If there is enough interest, I could throw together an API of some sort,
> maybe even whole extension... Please comment, send opinions, answers,...
>
> Please do not send mail privately as I have this address just for posting
> to newsgroups - I will not receive it.
>
> By!
>
> Anze
>
> (By the way, about idiot-proof programs: "Programming is a race between
> programmers and universe; programmers, trying to build better idiot-proof
> programs, and universe, trying to build better idiots. So far, universe is
> winning.")
>
> ---------------------
> Please do not send mail privately - I do NOT read mail sent
> to this address, it is used only for newsgroups (spam
> protection).
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the |
| stuff of nightmares grasp for your soul. |
`---------------------------------------------'
attached mail follows:
On Mon, 2003-06-23 at 03:21, anzenews wrote:
> Hi!
>
> I hope this is the right newsgroup for posting this... PHP.dev doesn't seem
> to be alive anymore?
>
> Is there some extension or anything that would allow me to hook my code to
> PHP parser? Even lex and yacc for PHP would be great...
Have you tried the tokenizer? Should be able to build what you're
talking about with that (unless you just want hooks or something).
http://www.php.net/tokenizer
--
Torben Wilson <torben
php.net> +1.604.709.0506
http://www.thebuttlesschaps.com http://www.inflatableeye.com
http://www.hybrid17.com http://www.themainonmain.com
-----==== Boycott Starbucks! http://www.haidabuckscafe.com ====-----
attached mail follows:
Check out this
http://phplayersmenu.sourceforge.net
Jim Lucas
----- Original Message -----
From: "David Elěas Sánchez Vásquez" <dsanchez
pucp.edu.pe>
To: <php-general
lists.php.net>
Sent: Monday, June 23, 2003 2:15 PM
Subject: [PHP] free dynamic MENU
>
> Hi folks
>
> I'd like to know if you know any page where I can download a tree dynamic
> menu made in PHP.. The options of this menu will be pulled from a mysql
> database
>
> thanks
>
> David
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
I asked this question last week and thought I had it fixed but it still
doesn't seem to work. I use the code below to allow the user to upload
their images, once uploaded the images don't look nearly as good as they did
before uploading. Another interesting thing is that if you right click on
the images, they don't give you the option of saving the image, only saving
as background but maybe that is because they are jpegs. Do I need to use a
higher resolution picture?
if(!empty($myimage)){
$id=$HTTP_GET_VARS['id'];
$imgname="image_".$id.".jpg";
copy($myimage,$imgname);
unlink($myimage);
function thumbnail($i,$nw,$p,$nn) {
$img=imagecreatefromjpeg("$i");
$ow=imagesx($img);
$oh=imagesy($img);
$scale=$nw/$ow;
$nh=ceil($oh*$scale);
$newimg=imagecreatetruecolor($nw,$nh);
imagecopyresized($newimg,$img,0,0,0,0,$nw,$nh,$ow,$oh);
imagejpeg($newimg, $nn);
return true;
}
#thumbnail(filetouse,newwidth,newpath,newname);
thumbnail($imgname,100,"/imges/","t_".$imgname);
thumbnail($imgname,250,"/imges/",$imgname);
here is the site if anyone is interested,
http://www.wardsmotorsports.com
Thanks,
Eddie
attached mail follows:
On Tuesday 24 June 2003 23:35, Edward Peloke wrote:
> I asked this question last week and thought I had it fixed but it still
> doesn't seem to work. I use the code below to allow the user to upload
> their images, once uploaded the images don't look nearly as good as they
> did before uploading. Another interesting thing is that if you right click
> on the images, they don't give you the option of saving the image, only
> saving as background but maybe that is because they are jpegs. Do I need
> to use a higher resolution picture?
> imagecopyresized($newimg,$img,0,0,0,0,$nw,$nh,$ow,$oh);
imagecopyresampled()
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
attached mail follows:
Good morning!
(My apologies for sending to both lists, I found emalloc() info on both
PHP and MySQL that might be applicable and could not make a good call as
to where this might be more appropriate)
We are attempting to return a rather large file from a set of queries to
MySQL via PHP. Each time the query completes we are freeing the result
(mysql_free_result) so that we do not get memory errors, but at about 20
MB (tested multiple times) we get ...
FATAL: emalloc(): Unable to allocate 2 bytes
Here is the code ....
<?php
//connect to and select database
include("dbconnect.cali.php");
//include test data vs. real data
include("choose_data.cali.php");
// get list of originating RC
$qorg = "SELECT DISTINCT(originating) AS original FROM " .
$curtblRCscope . " ";
if(!($dborg = mysql_query($qorg, $dbconnect))){
print("MySQL Reports: " . mysql_error() . "\n");
exit();
}
// create array so memory from query can be freed
$a = 0;
while ($org = mysql_fetch_object($dborg)){
$orig_array[$a] = $org->original;
$a++;
}
mysql_free_result($dborg);
$orig_count = count($org_array);
if ($curtblRC == "tblRC"){
$curpath = "/var/lib/apache/htdocs/callscope/output/";
} else {
$curpath = "/usr/feynman/lcs/";
}
if (!($npanxxfile =
fopen($curpath."npanxx.cali.".date("Ymd").".txt","w+"))){
print("Failed to open file!\n");
exit();
}
//file was opened
for($i = 0; $i < $orig_count; $i++){ // start writing loop
//get npanxx list
$qnpanxx = "SELECT DISTINCT c.originating as origin, c.terminating as
termination, a.npanxx as o_npanxx, b.npanxx as t_npanxx ";
$qnpanxx .= "FROM ".$curtblRC." a, ".$curtblRC." b,
".$curtblRCscope." c ";
$qnpanxx .= "WHERE a.RCname = '" . $orig_array[$i] . "' ";
$qnpanxx .= "AND a.RCname = c.originating ";
$qnpanxx .= "AND b.RCname = c.terminating ";
$qnpanxx .= "ORDER BY c.originating, c.terminating, a.npanxx,
b.npanxx ";
//$qnpanxx .= "LIMIT 5 "; // for test purposes jb
if(!($dbnpanxx = mysql_query($qnpanxx, $dbconnect))){
print("MySQL reports: " . mysql_error() . "\n");
exit();
}
if (mysql_num_rows($dbnpanxx) > 0){ //start if
$npanxxcnt = 0;
while($urownpanxx =
mysql_fetch_object($dbnpanxx)){
//output originating npanxx
fputs($npanxxfile,
$urownpanxx->o_npanxx);
//output terminating npanxx
fputs($npanxxfile,
$urownpanxx->t_npanxx);
//output spaces in characters 13-66
for($spaces = 13; $spaces <= 66;
$spaces++){
fputs($npanxxfile, " ");
}
//output "N"
fputs($npanxxfile, "N");
//output spaces in characters 68-86
for($spaces = 68; $spaces <= 86;
$spaces++){
fputs($npanxxfile, " ");
}
//output terminating newline
fputs($npanxxfile, "\n");
$npanxxcnt++;
}// end while
mysql_free_result($dbnpanxx);
}// end if
}// end writing loop
fclose($npanxxfile);
?>
Here are a couple of lines of the output file...(the spaces are
necessary). Each line is 87 bytes long including the newline character.
626677213532 N
626677213533 N
626677213534 N
626677213538 N
626677213542 N
I have STFW, RTFM taken a couple of SWAG's and still cannot come up with
a solution. Is the opened file held in memory and therefore as it gets
larger it approaches the memeory limit of the machine? Any insight would
help...a BIG THANKS IN ADVANCE!
Jay
attached mail follows:
I don't know any php lib working with topic maps.
Why don't you use Java for displaying too. Check out
http://weblogs.medien.uni-weimar.de/topicmaps/Tools
I think you will have better support for Java since it
was introduced in Java.
/dorgon
Sebastian Mangelkramer Imac wrote:
> hi all together,
>
> our team started working with topic maps one jear ago,
> with java (tm4j).
>
> now we decide to develop a tool with php which
> displays us a topicmap.
>
> we`ve tried several ways to display it, but no one was ok.
>
> my question:
>
> does anyone know a solution for displaying a topicmap with php,
> without the use of any other languages like java, etc. ?
>
> thanks !
>
> yours sincerly
>
> sebastian, imac.de
>
attached mail follows:
I just setup php on my linux box and have been messing with a tutorial,
and have had some issues.
The tutorial says any name=value pairs in the querystring "automatically
creates a variable with the name and value the querystring indicated".
This does not seem to be happening.
I have installed:
RedHat 9.0
Mysql 4.0.13
PHP 4.3.2
I have connected to databases, displayed info from database but cannot
get data from the form into the database.
I have also not been able to get $PHP_SELF* to display anything.
Here is a sample code I have been using:
<html>
<body>
<?php
$db = mysql_connect("localhost", "root");
mysql_select_db("mydb",$db);
// display individual record
if ($id) {
$result = mysql_query("SELECT * FROM employees WHERE id=$id",$db);
$myrow = mysql_fetch_array($result);
printf("First name: %s\n<br>", $myrow["first"]);
printf("Last name: %s\n<br>", $myrow["last"]);
printf("Address: %s\n<br>", $myrow["address"]);
printf("Position: %s\n<br>", $myrow["position"]);
} else {
// show employee list
$result = mysql_query("SELECT * FROM employees",$db);
if ($myrow = mysql_fetch_array($result)) {
// display list if there are records to display
do {
printf("<a href=\"%s?id=%s\">%s %s</a><br>\n", $PHP_SELF,
$myrow["id"], $myrow["first"], $myrow["last"]);
} while ($myrow = mysql_fetch_array($result));
} else {
// no records to display
echo "Sorry, no records were found!";
}
}
?>
</body>
</html>
Thanks for any help.
*--
Blake Schroeder
blake
lhwd.net
attached mail follows:
[snip]
I just setup php on my linux box and have been messing with a tutorial,
and have had some issues.
The tutorial says any name=value pairs in the querystring "automatically
creates a variable with the name and value the querystring indicated".
This does not seem to be happening.
I have installed:
RedHat 9.0
Mysql 4.0.13
PHP 4.3.2
[/snip]
It is because the tutorial is pre PHP 4.x where register_globals = off
in php.ini. Your form variables will be in either $_GET['variablename']
or $_POST['variablename'], or you can turn register_globals 'on'
HTH!
Jay
attached mail follows:
Dear users,
My apologize, but my knowledge in Internet Programming Technologies is very
poor (actually it is realy very very poor). Anyway, I have a request to set
up WIN CE Terminal Clients for my software product (Written in C/C++). The
point is, I do not want to write the whole application on the CE. What I
realy want to do is using a kind of Client / Server architecture to set up
this software. For this reason in my thinking the best solution would be to
use PHP because there should be an IE on each WIN CE System available.
So far so good, before I decide to go along this way I would need some
informations and hopefully somebody could answer them.
Nr 1: There is a lot of source code already available -> it is (unfortunaly)
written in a C-Based DLL. Can I have access to those functions from PHP ?
Can I integrate this DLL in my PHP Server application?
Nr 2 (a realy tricky one): As my application is using scanners (for
barcodes, ...) I have to check the validation of the barcode and the type of
barcode. Usually for external scanners there is a kind of interface (DLL on
the client, or Library) which I can use and attach, where I can switch the
configuration of the scanner with each scan - it means I can send the
scanner if I expect a barcode TYP1, or barcode TYP2 and how long the input
will be, ....(in best case). One possibility in my thinking could be to
write a "native CE Program" which does that transforming and communication
for my WEB Based Client on the CE machine (the CE would only communicate
with this program (for scanning)) - could that be working?! .... and how can
I access this program from the PHP Application (Client Side)?! ...
I hope anybody out there can here my questions and got some ideas if it is
possible - and if it is possible, which way could be chosen. At least I hope
somebody can understand my poor english too ;-))
Best regards
Markus
attached mail follows:
[snip]
I have STFW, RTFM taken a couple of SWAG's and still cannot come up with
a solution. Is the opened file held in memory and therefore as it gets
larger it approaches the memeory limit of the machine? Any insight would
help...a BIG THANKS IN ADVANCE!
[/snip]
Ok, we have noticed more on the problem. We seperated each originating
area into separate files (opening, then closing file handles). Until the
script fails memory usage steadily declines instead of freeing the
memory upon fclose(). Is there a way to free memory after a file is
written?
Thanks!
Jay
attached mail follows:
Hello,
I am attempting to solve a problem in PHP. My application consists of
Classes and subclasses. In my Class I call certain functions that have
header information and footer information displaying them in nicely
formatted HTML. I have used this method because of one style sheet that
all HTML documents read from. I have run into a problem with executing
functions using HTML links. I have not yet come up with a solution and
I was wandering if anyone has run into his one before. Obviously I
need this to be dynamic as possible, and as friendly to use. Any
suggestions would be greatly appreciated.
Thanks in advance,
Daniel
attached mail follows:
I am not sure what you mean but if you are trying to call functions that
exist within your class
you need to do something like the following
$fg = new YourClass.class.php;
$fg->yourfunctionname($arguements);
----- Original Message -----
From: "Daniel Rychlik" <drychlik
tcsconsult.com>
To: <php-general
lists.php.net>
Sent: Tuesday, June 24, 2003 10:09 AM
Subject: [PHP] calling functions in classes using text and graphic links
> Hello,
>
> I am attempting to solve a problem in PHP. My application consists of
> Classes and subclasses. In my Class I call certain functions that have
> header information and footer information displaying them in nicely
> formatted HTML. I have used this method because of one style sheet that
> all HTML documents read from. I have run into a problem with executing
> functions using HTML links. I have not yet come up with a solution and
> I was wandering if anyone has run into his one before. Obviously I
> need this to be dynamic as possible, and as friendly to use. Any
> suggestions would be greatly appreciated.
>
> Thanks in advance,
> Daniel
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
I see, Im still a little troubled by the problem. If I have a link on a
HTML document called <a href="search.php">Search Tool</a> How would I
execute a function within my class? Is it the same answer as you gave
me?
So,
<a href="
<?php
$fg->yourfunctionname($arguements);
?>
"> Search Tool</a>
Is that the answer ?
-Daniel
-----Original Message-----
From: Chris Sherwood [mailto:csherwood
nortialearning.com]
Sent: Tuesday, June 24, 2003 12:20 PM
To: Daniel Rychlik; php-general
lists.php.net
Subject: Re: [PHP] calling functions in classes using text and graphic
links
I am not sure what you mean but if you are trying to call functions that
exist within your class
you need to do something like the following
$fg = new YourClass.class.php;
$fg->yourfunctionname($arguements);
----- Original Message -----
From: "Daniel Rychlik" <drychlik
tcsconsult.com>
To: <php-general
lists.php.net>
Sent: Tuesday, June 24, 2003 10:09 AM
Subject: [PHP] calling functions in classes using text and graphic links
> Hello,
>
> I am attempting to solve a problem in PHP. My application consists of
> Classes and subclasses. In my Class I call certain functions that
have
> header information and footer information displaying them in nicely
> formatted HTML. I have used this method because of one style sheet
that
> all HTML documents read from. I have run into a problem with
executing
> functions using HTML links. I have not yet come up with a solution
and
> I was wandering if anyone has run into his one before. Obviously I
> need this to be dynamic as possible, and as friendly to use. Any
> suggestions would be greatly appreciated.
>
> Thanks in advance,
> Daniel
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
try
http://uk2.php.net/strip_tags
pete
Matt Palermo wrote:
> I want to be able to retrieve and return all character that are not
> located in html tags. For example:
>
> <font size=\"3\" color=\"#336699\">1234567</font>
> or
> <marquee>1234567</marquee>
>
> I would just like it to be equal to 1234567, but I would need it to work
> with any tags and attributes. Is there a way to just throw out
> everything from the < to the > and just keep everything that is NOT
> located inside any <> characters? Anyone have any ideas on how this can
> be done? Please let me know.
>
> Thanks,
>
> Matt
>
attached mail follows:
***pulling out what's left of my hair***
I have a situation where I open a new file, do a query, write to the
file, close the file, and then start over again at opening a new file
while looping through an array. As I do this I can watch memory
resources approach 0, ultimately failing the script before it gets
through the entore array. How do you free the memory after you close a
file without stopping the script? If I stop the script the memeory is
instantly freed up. I found the MySQL answers (mysql_free_result()), but
I also need to free memory after fclose(). Any ideas?
Thanks!
Jay
attached mail follows:
this function disappeared on php version 4.3.1 ????
which one is the name of the equivalent ???
TIA,
--
Lucas Lain
lainl
aconectarse.com
#! /Scripting/Manager (:-P)
attached mail follows:
I'm translating (hacking) code from Perl to PHP and have two reg exp expressions I can't figure out what they do.
1st: $goodbadnum =~ tr/0-9//cd; I think this one removes any chars that are not numbers.
2nd: $goodbadnum =~ tr/0-9/x/; I think this one replaces and numbers with an 'x'.
Right, wrong??
Robin E. Kopetzky
Black Mesa Computers/Internet Services
www.blackmesa-isp.net
attached mail follows:
On 24-Jun-2003 Sparky Kopetzky wrote:
> I'm translating (hacking) code from Perl to PHP and have two reg exp
> expressions I can't figure out what they do.
>
> 1st: $goodbadnum =~ tr/0-9//cd; I think this one removes any chars that
> are not numbers.
>
Nope. That removes digits '0-9'
$goodbadnum= preg_replace('!\d+!', '', $goodbadnum);
> 2nd: $goodbadnum =~ tr/0-9/x/; I think this one replaces and numbers with
> an 'x'.
>
Yep. that replaces every digit with an 'x'.
$goodbadnum= preg_replace('!\d!', 'x', $goodbadnum);
Regards,
--
Don Read dread
ispwest.com
-- It's always darkest before the dawn. So if you are going to
steal the neighbor's newspaper, that's the time to do it.
attached mail follows:
On a 'non sarcastic' note... Perhaps the original poster should just set
up their own linux box and run it off their home cable/dsl line. I've
been doing it for years and it works wonderfully. I'm even now a
free-node on the Seattlewireless.net network for people in the hood who
need a quick bit-fix (the amount of bandwidth they consume in the 1 hour
or less they squat is negligible and I encourage all of you to open your
wifi nodes up (with a good firewall ruleset of course)). I digress...
I host several virtual domains/hosts for various friends of mine for
free. So, it's not unheard of that you could find or ask someone to host
you. When I started out in 1995, my local ISP liked my domain name (I
used to own "TheMatrix.com" which was the name of my recording studio
and hosted me for free).
You can also look around in your community. Fe. The bay area has some
free hosting solutions that are funded by the state for non-profit orgs.
So, say you set up a "Coping with Fibromyalgia" website, they will give
you the space and host you. This has carried up here to Seattle as well.
Anyways, if you're looking for a free host, then you prolly aren't
doing a site with that much