OSEC

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 7 May 2003 08:02:45 -0000 Issue 2042

php-general-digest-helplists.php.net
Date: Wed May 07 2003 - 03:02:45 CDT


php-general Digest 7 May 2003 08:02:45 -0000 Issue 2042

Topics (messages 146553 through 146626):

Re: Site cloaker (a little ot)
        146553 by: Ryan A
        146615 by: Joseph Bannon
        146623 by: David T-G

Re: problem with "count" function ...
        146554 by: Jennifer Goodie

Re: PHP and GD
        146555 by: Mike At Spy
        146557 by: Jason Wong

Re: Case-insensitive search and replace using an array
        146556 by: Jason Wong

Re: OOP vs procedural
        146558 by: Info.Best-IT
        146562 by: James
        146579 by: Davy Obdam
        146595 by: Martin Towell
        146596 by: Vania Smrkovski
        146603 by: Justin French
        146604 by: Cal Evans

PHP and dynamic menus
        146559 by: Denis L. Menezes

Registration/Login -Application/Script
        146560 by: Bruce Douglas
        146563 by: Jason Wong
        146564 by: Bruce Douglas
        146566 by: Jason Wong
        146567 by: Julien Wadin
        146568 by: CPT John W. Holmes

Re: ftp_get and file downloads
        146561 by: Jason Wong

Re: How do I get output from exec() but not error messages?
        146565 by: Jason Wong

Off the subject
        146569 by: Ron Allen \(newbie\)
        146570 by: John Nichel
        146571 by: Michael Lewis

Approximate Comparison [resend]
        146572 by: Jordan C.
        146577 by: CPT John W. Holmes
        146585 by: Jordan C.

--with-pgsql
        146573 by: John Nichel
        146614 by: Tom Rogers
        146624 by: Jason Wong

Directory Command
        146574 by: Matt Palermo
        146576 by: Jack Dempsey
        146580 by: Ernest E Vogelsinger
        146590 by: Jennifer Goodie

Mail List / Digest script
        146575 by: Malcolm

input type=file
        146578 by: Andrew Durk
        146582 by: DvDmanDT
        146583 by: Jennifer Goodie
        146591 by: Sebastian Delmont
        146599 by: John Coggeshall
        146601 by: Justin French

Quick Question
        146581 by: Dale
        146586 by: Sebastian Delmont
        146587 by: Greg Donald
        146594 by: CPT John W. Holmes
        146607 by: Larry E. Ullman
        146608 by: CPT John W. Holmes

Listing Declared Variables
        146584 by: Dan Tappin
        146588 by: Sebastian Delmont
        146592 by: Steve Keller
        146602 by: Justin French

smarty templates with dreamweaver (totally ot) but please HELP
        146589 by: Ryan A
        146593 by: olinux

Revised - Call a Function from a Local File
        146597 by: chris.wakeboarder.com
        146598 by: DvDmanDT
        146600 by: chris.wakeboarder.com
        146605 by: chris.wakeboarder.com
        146606 by: Jennifer Goodie
        146610 by: CPT John W. Holmes

Newbie Help? Navigating single records in a flat file
        146609 by: Charlie
        146612 by: Justin French

Re: PHP & Java, calling a static method
        146611 by: Wendy

array_merge on 2d-arrays
        146613 by: David T-G

remove, thanks
        146616 by: Joseph Bannon
        146618 by: CPT John W. Holmes

Sloppy coding?
        146617 by: Shawn McKenzie
        146619 by: Martin Towell
        146620 by: Shawn McKenzie
        146621 by: Shawn McKenzie
        146622 by: CPT John W. Holmes

linux, apache, mssql
        146625 by: H M Kunzmann

hot to use perg_match with multi strign patern
        146626 by: qt

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


Hey James,
Thanks for replying.

Yes, as far as what I have read/researched on the net what you say is
totally true but it does not answer my question of if you know of any script
preferably free that is good and I can use...

Cheers,
-Ryan

----- Original Message -----
From: "James" <jamesglobalvision.com>
To: <php-generallists.php.net>
Sent: Tuesday, May 06, 2003 5:57 PM
Subject: [PHP] Re: Site cloaker (a little ot)

> It's only difficult to work out because someone has attached some "web
word"
> to what is a really simple principle. The idea of cloaking is to deliver
> different content based upon the current client viewing the web site. It
> can be used as a good or bad feature dependent on how you use it.
>
> Say, you have www.foo.com/page.php
>
> Well, dependent on who is looking at your site you just let page.php
include
> some other page, it's nothing more than a central hub to a lot of other
> pages. It will just include the right content dependent on the current
> viewing client.
>
> The reason Google and such will look down upon it is that if you use this
> technique with them you can alter the page when you detect google
spidering
> and deliver perfect (usually not very nice for us humans to read) content
> which will improve your ranking; imagine:
>
> if (google_spidering) {
> include "perfect_google_page.inc";
> } else {
> include "for_other_people.inc";
> }
>
>
>
>
> "Ryan A" <ryanjumac.com> wrote in message
> news:001401c313e1$c91aec20$1301400al2zcaxu7emppqh...
> > Hi Guys,
> > I have been reading a lot about "Site Cloakers" to increase traffic to
> ones
> > website via the search engines.
> > After visiting the script archives (hotscripts,scriptssearch etc) i have
> > found a couple but most of them are commerical as well as being REALLY
> > expensive with closed code (i think) so I cant really learn anything of
> how
> > it EXACTLY works.
> >
> > Does anyone know of a good site cloaker that works and is cheap/free?
> >
> > I hear some of them can actually get you banned from google...which as
you
> > can imagine is a horrorable horrorable fate not wishable on your worst
> > enemy........just your compettion ;-D
> >
> > Any suggestions/comments?
> >
> > Thanks,
> > -Ryan
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


remove, thanks

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

attached mail follows:


Joseph --

...and then Joseph Bannon said...
%
% remove, thanks

Now, now, it's not *that* off-topic. Have a little patience and let him
has his questions. We don't need to go all draconian and start removing
posts; that's for Usenet.

HTH & HAND

;-D
--
David T-G * There is too much animal courage in
(play) davidtgjustpickone.org * society and not sufficient moral courage.
(work) davidtgworkjustpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE+uI3PGb7uCXufRwARAq4yAKC1mJ4PCdOJFZvZF//V78hCryV5WwCgllXG
G6zXY0Ps2afwndOd8RoMIug=
=908+
-----END PGP SIGNATURE-----

attached mail follows:


For one, you are naming all of your file inputs the same thing so you will
only get one no matter what. Second, $_FILES['userFile'] will be an array
containing information about the uploaded file such as its temp location and
its size. The array will always have 4 or 5 elements. Try reading the
documentation on file uploads.

http://us2.php.net/manual/en/features.file-upload.php

I think if you change the names on your inputs count($_FILE) will accomplish
what you want (unless you name them 'userfile[]').

> -----Original Message-----
> From: Kenn Murrah [mailto:kennmurrahnomoire.com]
> Sent: Tuesday, May 06, 2003 12:12 PM
> To: PHP
> Subject: [PHP] problem with "count" function ...
>
>
> Greetings.
>
> I'm sure I'm overlooking something simple, but I just can't see it ...
>
> I'm trying to upload multiple files via PHP, having built a forms page
> with 10
>
> <input type=file name='userFile'>
>
> statements ... and I'm trying to determine how many times to process my
> upload handling loop with
>
> for ($i=0; $i<count($_FILES['userFile']); $i++)
>
> but no matter how many files I try to upload, I get a count of 4 ...
> what am I doing wrong?
>
> thanks in advance for the help.
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


That's *exactly* what I thought, and that's the way I did it on another
linux server, but this fellow is tellin' me that everything changed with
4.3.+

Which I had some big doubts about - and yes, he is using windows. :)

-Mike

> -----Original Message-----
> From: Jason Wong [mailto:php-generalgremlins.biz]
> Sent: Tuesday, May 06, 2003 3:27 PM
> To: php-generallists.php.net
> Subject: Re: [PHP] PHP and GD
>
>
> On Wednesday 07 May 2003 01:22, Mike At Spy wrote:
> > I just did that - but I just got a warning saying:
> >
> > Setting up Web Service: PHP Warning: Unknown(): Unable to load dynamic
> > library
> > './php_gd.dll' - ./php_gd.dll: cannot open shared object file:
> No such file
> > or d
> > irectory in Unknown on line 0
>
> Aren't .DLLs a Windows thing?
>
> > Of course, I am using a linux web server.....
>
> Linux uses .so ??
>
> Anyway, just configure php with '--with-gd' and it will get
> compiled with the
> bundled GD library.
>
> --
> 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
> ------------------------------------------
> /*
> "You've got to have a gimmick if your band sucks."
> -- Gary Giddens
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


On Wednesday 07 May 2003 03:44, Mike At Spy wrote:

> That's *exactly* what I thought, and that's the way I did it on another
> linux server, but this fellow is tellin' me that everything changed with
> 4.3.+

Just because it's bundled doesn't mean it's automatically compiled. Heck, php
is bundled with loads of libraries, but most of them has to be specifically
enabled.

> Which I had some big doubts about - and yes, he is using windows. :)

Didn't your mother tell you not to trust people who uses Windows ;-)

--
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
------------------------------------------
/*
Ego sum ens omnipotens.
*/

attached mail follows:


On Wednesday 07 May 2003 00:41, René Fournier wrote:
> $patterns = array("Mr.","Ms.","Mrs.","unknown");
> $piece = str_replace($patterns,"",$piece);
>
> This code works, but what I'd like to do is change it so that if $piece
> contains "Mr." or "mr.", both are caught and replaced. Preg_replace
> allows for case-insensitive search items, but I can't seem to combine
> that parameter with the $patterns search array.
>
> Any ideas? Thanks.

Yes. RFTM -> str_ireplace()

--
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
------------------------------------------
/*
To generalize is to be an idiot.
                -- William Blake
*/

attached mail follows:


Thanks for the reply!

One more question and I will get back to coding :)

Is what is XSLT processed by on the server side?

/T

on 5/6/03 13:05, Davy Obdam at infodavyobdam.com wrote:

> Hi,
>
> There a few possibilty`s here i think:
>
> 1. Using CSS to display XML client side, however i think this is usualy
> a bad idea, mainly because not all browsers suppoit it
> 2. Using XSLT to transform your XML on the client(to XHTML), well same
> as the above, not all browser are yet capable of doing this, and you
> probably have more data in your XML file that you would like your client
> to see... maybe.
> 3. The best option is to use XSLT to transform your XML and doing it on
> the server. This adds flexiblity because now you can create multiple XSL
> stylesheets to transform your XML in the required output format, XML,
> XHTML, cHTML or whatever you may need.
> In case of a webbrowser on a PC/Mac your send the client gets valid
> XHTML, wich is HTML wich confirms to the XML standards;-)
>
> Just my 0,2 cents
>
> InfoBest-IT wrote:
>
>> I've heard a lot that XML is taking over. Is the browser going to read some
>> kind of HTML or straight HTML. Take FlashMX for instance, you can build a
>> movie which is essentially an application driven by XML. But the XML is
>> like a Database with nodes instead of records. This can be dynamically
>> generated and read by the Flash movie, but because it's flash. If you took
>> that same flow and created an app that had a browser for the front end
>> instead of flash player, how would you get the browser to understand what it
>> needed to display? Are browsers going to be re-written? - Most likely my
>> thought process is off track. Mainly I don't understand how a browser can
>> read XML?
>>
>> R/T
>>
>
> Best regards,
>
> Davy Obdam

attached mail follows:


The great thing about server side XSLT transformations is the XSL parts must
be totally w3 compliant but that does not mean to say the entire template
does, only that which you parse through the processor. In answer to your
questions:

1)The browser will read HTML/XHTML and will act as all other browsers do.
XHTML is just a more "strict" version of HTML.

2)Your application generates XML, which as you said has nodes with data.
Before you send that to the browser you send your "xml" to a server side
XSLT processor, Sablot or Saxon or something. At the same time you also pass
an XSL style sheet to the processor. It takes the XSL and XML and uses them
to build a dynamic page.

Now, the xsl stuff consists 3 parts:
xslt: transforms xml docs
xpath: defined parts of an xml document
xsl formatting: formatting xml documents

When you combine these with your web language such as html or wml you can
build a "stylesheet" which can dynmically transform dynamic xml data into
viewable pages.

You can look at flash as a version of XSL if you want to, it simply
transforms XML into readable data

3) Browsers are always going to be rewritten but they dont need to do
anything to cope with this type of thing

4) A browser can read raw xml as its just a text document, to make anything
meaningful you have to use other stuff!

jim.

"InfoBest-It" <infobest-it.biz> wrote in message
news:BADD589C.5BB5%infobest-it.biz...
> I've heard a lot that XML is taking over. Is the browser going to read
some
> kind of HTML or straight HTML. Take FlashMX for instance, you can build a
> movie which is essentially an application driven by XML. But the XML is
> like a Database with nodes instead of records. This can be dynamically
> generated and read by the Flash movie, but because it's flash. If you
took
> that same flow and created an app that had a browser for the front end
> instead of flash player, how would you get the browser to understand what
it
> needed to display? Are browsers going to be re-written? - Most likely my
> thought process is off track. Mainly I don't understand how a browser can
> read XML?
>
> R/T
>
> on 5/6/03 11:17, James at jamesglobalvision.com wrote:
>
> > Depends on your view point. I think PHP was never originally intended
to be
> > written in OO but I favour it for my stuff and I think a lot of other
people
> > do too, including (rather amazingly :) the PEAR lot who are rapidly
becoming
> > what CPAN is to Perl. One of the things to think about is the upcoming
> > release of version 5 which is going to see a huge leap in the OO part of
> > PHP. There is masses of new features such as private, protected,
> > namespacing to name a few. If you intend to a) stick with php and b)
build
> > complicated "application frameworks" then consider the fact that they
are
> > intent on pushing out a new version of PHP with a much better object
> > approach and with this in mind youll see a lot more object based
> > developments.
> >
> > Regardless of your approach with OO or libs I think the 3rd style which
is
> > _MUCH_ more important is the development of systems with data
independence.
> > Creating systems which run entirely in XML is the future. The days of
hard
> > coding HTML into your code is going to change. Seperating application
> > logic/business rules is so much more important when your working with
large
> > scale apps. Running server side XSL styles through your app's XML
output is
> > what you should aim for. Given that the web is ever expanding and youll
see
> > new display langauges for all sorts of new fangled internet gadgets
youll
> > regret not doing it!
> >
> > jim
> >
> >
> > "InfoBest-It" <infobest-it.biz> wrote in message
> > news:BADD4609.5B9D%infobest-it.biz...
> >> Between these 2 styles of writing PHP which is better usually:
> >>
> >> C-style, using include files containing paths to libraries?
> >>
> >> Object Oriented: everything is structures with class files?
> >>
> >> Thanks,
> >> /T
> >>
> >
> >
>

attached mail follows:


Hi

XSL transformation wich are performed at the server, you client gets
html... Have a look at the PHP functions for doing this:

http://www.php.net/manual/en/ref.xslt.php

I hope this helps:-)

Best regards,

Davy

InfoBest-IT wrote:

>Thanks for the reply!
>
>One more question and I will get back to coding :)
>
>Is what is XSLT processed by on the server side?
>
>/T
>
>on 5/6/03 13:05, Davy Obdam at infodavyobdam.com wrote:
>
>
>
>>Hi,
>>
>>There a few possibilty`s here i think:
>>
>>1. Using CSS to display XML client side, however i think this is usualy
>>a bad idea, mainly because not all browsers suppoit it
>>2. Using XSLT to transform your XML on the client(to XHTML), well same
>>as the above, not all browser are yet capable of doing this, and you
>>probably have more data in your XML file that you would like your client
>>to see... maybe.
>>3. The best option is to use XSLT to transform your XML and doing it on
>>the server. This adds flexiblity because now you can create multiple XSL
>>stylesheets to transform your XML in the required output format, XML,
>>XHTML, cHTML or whatever you may need.
>>In case of a webbrowser on a PC/Mac your send the client gets valid
>>XHTML, wich is HTML wich confirms to the XML standards;-)
>>
>>Just my 0,2 cents
>>
>>InfoBest-IT wrote:
>>
>>
>>
>>>I've heard a lot that XML is taking over. Is the browser going to read some
>>>kind of HTML or straight HTML. Take FlashMX for instance, you can build a
>>>movie which is essentially an application driven by XML. But the XML is
>>>like a Database with nodes instead of records. This can be dynamically
>>>generated and read by the Flash movie, but because it's flash. If you took
>>>that same flow and created an app that had a browser for the front end
>>>instead of flash player, how would you get the browser to understand what it
>>>needed to display? Are browsers going to be re-written? - Most likely my
>>>thought process is off track. Mainly I don't understand how a browser can
>>>read XML?
>>>
>>>R/T
>>>
>>>
>>>
>>Best regards,
>>
>>Davy Obdam
>>
>>
>
>
>
>

--
-----------------------------------------------------------------------
Davy Obdam
Web application developer

Networking4all
email: d.obdamnetworking4all.com
email: infodavyobdam.com
internet: http://www.networking4all.com
-----------------------------------------------------------------------

attached mail follows:


I've seen only one reply to the original message, so here's my 2c worth

I use OO to prevent too many global variables floating around the place. In
this company, there's 1,000's of globals, and very often they interfere with
each other. I am (with the help with someone else) trying to move all the
core code to use OO so we don't have this problem.

I think that there's a place for both styles. Self-contained functions can
stay by themselves, functions that interact with each other naturally lend
themselves to objects...

-----Original Message-----
From: InfoBest-IT [mailto:infobest-it.biz]
Sent: Wednesday, May 07, 2003 1:59 AM
To: PHP general
Subject: [PHP] OOP vs procedural

Between these 2 styles of writing PHP which is better usually:

C-style, using include files containing paths to libraries?

Object Oriented: everything is structures with class files?

Thanks,
/T

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


Personally,
        I hope PHP continues to develop its OOP flavorings. Having been in a
company that uses an Object-Oriented paradigm "correctly", that is to say,
professionally, thought-out-in-advance, I have for the first time in eight
years of trying to study and use OOP seen just how much sense it makes!
        Procedural coding is useful, especially for those who need to be able to
code "on-the-fly", and for me, learning PHP, it was the only way for me to
go, even though I was tempted to use PHP's OO capabilities. But I just
can't help but think that, tackling a huge project, OOP just makes things
work right more often the first time, even if it forces you to do a lot more
thinking in advance.

        I don't know if anyone else agrees, but if the PHP developers are
interested where PHP 5 might go, my hope is that it will allow for more of
the OOP support.

_________________________
Vania Smrkovski
Internet Design and Programming
http://pandorasdream.com/

-----Original Message-----
From: Martin Towell [mailto:martin.towellworld.net]
Sent: Tuesday, May 06, 2003 7:17 PM
To: 'InfoBest-IT'; PHP general
Subject: RE: [PHP] OOP vs procedural

I've seen only one reply to the original message, so here's my 2c worth

I use OO to prevent too many global variables floating around the place. In
this company, there's 1,000's of globals, and very often they interfere with
each other. I am (with the help with someone else) trying to move all the
core code to use OO so we don't have this problem.

I think that there's a place for both styles. Self-contained functions can
stay by themselves, functions that interact with each other naturally lend
themselves to objects...

-----Original Message-----
From: InfoBest-IT [mailto:infobest-it.biz]
Sent: Wednesday, May 07, 2003 1:59 AM
To: PHP general
Subject: [PHP] OOP vs procedural

Between these 2 styles of writing PHP which is better usually:

C-style, using include files containing paths to libraries?

Object Oriented: everything is structures with class files?

Thanks,
/T

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


Any links to really good articles on this stuff?

Justin

on 07/05/03 5:05 AM, Davy Obdam (infodavyobdam.com) wrote:

> Hi,
>
> There a few possibilty`s here i think:
>
> 1. Using CSS to display XML client side, however i think this is usualy
> a bad idea, mainly because not all browsers suppoit it
> 2. Using XSLT to transform your XML on the client(to XHTML), well same
> as the above, not all browser are yet capable of doing this, and you
> probably have more data in your XML file that you would like your client
> to see... maybe.
> 3. The best option is to use XSLT to transform your XML and doing it on
> the server. This adds flexiblity because now you can create multiple XSL
> stylesheets to transform your XML in the required output format, XML,
> XHTML, cHTML or whatever you may need.
> In case of a webbrowser on a PC/Mac your send the client gets valid
> XHTML, wich is HTML wich confirms to the XML standards;-)
>
> Just my 0,2 cents
>
> InfoBest-IT wrote:
>
>> I've heard a lot that XML is taking over. Is the browser going to read some
>> kind of HTML or straight HTML. Take FlashMX for instance, you can build a
>> movie which is essentially an application driven by XML. But the XML is
>> like a Database with nodes instead of records. This can be dynamically
>> generated and read by the Flash movie, but because it's flash. If you took
>> that same flow and created an app that had a browser for the front end
>> instead of flash player, how would you get the browser to understand what it
>> needed to display? Are browsers going to be re-written? - Most likely my
>> thought process is off track. Mainly I don't understand how a browser can
>> read XML?
>>
>> R/T
>>
>
> Best regards,
>
> Davy Obdam

attached mail follows:


http://www.phppatterns.com/
* Cal Evans
* http://www.christianperformer.com
* Stay plugged into your audience
* The measure of a programmer is not the number of lines of code he writes
but the number of lines he does not have to write.
*

----- Original Message -----
From: "Justin French" <justinindent.com.au>
To: "Davy Obdam" <infodavyobdam.com>; "InfoBest-IT" <infobest-it.biz>
Cc: "PHP general" <php-generallists.php.net>
Sent: Tuesday, May 06, 2003 6:38 PM
Subject: Re: [PHP] Re: OOP vs procedural

> Any links to really good articles on this stuff?
>
> Justin
>
>
> on 07/05/03 5:05 AM, Davy Obdam (infodavyobdam.com) wrote:
>
> > Hi,
> >
> > There a few possibilty`s here i think:
> >
> > 1. Using CSS to display XML client side, however i think this is usualy
> > a bad idea, mainly because not all browsers suppoit it
> > 2. Using XSLT to transform your XML on the client(to XHTML), well same
> > as the above, not all browser are yet capable of doing this, and you
> > probably have more data in your XML file that you would like your client
> > to see... maybe.
> > 3. The best option is to use XSLT to transform your XML and doing it on
> > the server. This adds flexiblity because now you can create multiple XSL
> > stylesheets to transform your XML in the required output format, XML,
> > XHTML, cHTML or whatever you may need.
> > In case of a webbrowser on a PC/Mac your send the client gets valid
> > XHTML, wich is HTML wich confirms to the XML standards;-)
> >
> > Just my 0,2 cents
> >
> > InfoBest-IT wrote:
> >
> >> I've heard a lot that XML is taking over. Is the browser going to read
some
> >> kind of HTML or straight HTML. Take FlashMX for instance, you can
build a
> >> movie which is essentially an application driven by XML. But the XML
is
> >> like a Database with nodes instead of records. This can be dynamically
> >> generated and read by the Flash movie, but because it's flash. If you
took
> >> that same flow and created an app that had a browser for the front end
> >> instead of flash player, how would you get the browser to understand
what it
> >> needed to display? Are browsers going to be re-written? - Most likely
my
> >> thought process is off track. Mainly I don't understand how a browser
can
> >> read XML?
> >>
> >> R/T
> >>
> >
> > Best regards,
> >
> > Davy Obdam
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


Hello friends.

Can anyone guide me to some tutorials on making dynamic menu/trees using PHP?

Thanks
Denis

attached mail follows:


Hi...

We're in need of a sophisticated,robust,secure regiatration/login
script/application for a site we're starting to develop. It occurs to us
that there should be an Open Source solution to this given that there have
been plenty of solutions for this and a lot of companies have gone up in
flames!! Hopefully, one of the flamed out companies will have left there
code for the rest of us.....

Be that as it may. We're looking for something that's perl/php/mysql running
on a Linux platform...

Thanks

Bruce
bedouglasearthlink.net

attached mail follows:


On Wednesday 07 May 2003 03:57, Bruce Douglas wrote:

> We're in need of a sophisticated,robust,secure regiatration/login
> script/application for a site we're starting to develop. It occurs to us
> that there should be an Open Source solution to this given that there have
> been plenty of solutions for this

There are, and they're hiding in the usual places:

  freshmeat.net
  sourceforge.net

--
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
------------------------------------------
/*
While most peoples' opinions change, the conviction of their
correctness never does.
*/

attached mail follows:


jason...

we looked in sourceforge.net... we weren't overly impressed. the ones we saw
are pretty basic... is there one in particular that you bleieve to be
robust/good???

THanks

Bruce Douglas
bedouglasearthlink.net

-----Original Message-----
From: Jason Wong [mailto:php-generalgremlins.biz]
Sent: Tuesday, May 06, 2003 1:00 PM
To: php-generallists.php.net
Subject: Re: [PHP] Registration/Login -Application/Script

On Wednesday 07 May 2003 03:57, Bruce Douglas wrote:

> We're in need of a sophisticated,robust,secure regiatration/login
> script/application for a site we're starting to develop. It occurs to us
> that there should be an Open Source solution to this given that there have
> been plenty of solutions for this

There are, and they're hiding in the usual places:

  freshmeat.net
  sourceforge.net

--
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
------------------------------------------
/*
While most peoples' opinions change, the conviction of their
correctness never does.
*/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


On Wednesday 07 May 2003 04:09, Bruce Douglas wrote:

> we looked in sourceforge.net... we weren't overly impressed. the ones we
> saw are pretty basic... is there one in particular that you bleieve to be
> robust/good???

Perhaps if you could list the ones you've looked at along with a short comment
(whether you liked it or not, if not why not etc). Then others will
(hopefully) chime in and make their suggestions based on your likes/dislikes.

--
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
------------------------------------------
/*
You should avoid hedging, at least that's what I think.
*/

attached mail follows:


Why not make your own application yourself ?

-----Message d'origine-----
De : Bruce Douglas [mailto:bedouglasearthlink.net]
Envoyé : mardi 6 mai 2003 22:10
À : php-generallists.php.net
Objet : RE: [PHP] Registration/Login -Application/Script

jason...

we looked in sourceforge.net... we weren't overly impressed. the ones we saw
are pretty basic... is there one in particular that you bleieve to be
robust/good???

THanks

Bruce Douglas
bedouglasearthlink.net

-----Original Message-----
From: Jason Wong [mailto:php-generalgremlins.biz]
Sent: Tuesday, May 06, 2003 1:00 PM
To: php-generallists.php.net
Subject: Re: [PHP] Registration/Login -Application/Script

On Wednesday 07 May 2003 03:57, Bruce Douglas wrote:

> We're in need of a sophisticated,robust,secure regiatration/login
> script/application for a site we're starting to develop. It occurs to us
> that there should be an Open Source solution to this given that there have
> been plenty of solutions for this

There are, and they're hiding in the usual places:

  freshmeat.net
  sourceforge.net

--
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
------------------------------------------
/*
While most peoples' opinions change, the conviction of their
correctness never does.
*/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


> we looked in sourceforge.net... we weren't overly impressed. the ones we
saw
> are pretty basic... is there one in particular that you bleieve to be
> robust/good???

Honestly, with your requirements, you need to write one yourself or hire
someone. You're not going to be satisified with what's already written
because either it'll be too basic, or too bundled with other stuff you do
not need.

---John Holmes...

attached mail follows:


On Tuesday 06 May 2003 05:46, John Kaspar wrote:
> Then I don't understand the warning message:
>
> Connected to ftp. ... .org, for user ...
> Warning: ftp_get(): error opening /home/john/download/test.txt in
> /home/.../www/code/backup.phtml on line 26
> Ftp transfer has failed!
>
> I have tried many variations of $local_file for both my winxp and linux
> computers. I set the local folder "/home/john/download/" on linux to 777.

The directories in the path leading up to the directory in which you wish to
write/create file must have the executable bit set (this allows cd (change
dir) into it).

Thus /home and /home/john needs to have either g+x OR o+x (depending on the
user running the script).

--
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
------------------------------------------
/*
Serenity through viciousness.
*/

attached mail follows:


On Tuesday 06 May 2003 10:49, Daevid Vincent wrote:
> I'm trying to grab this information, but sometimes a linux machine doesn't
> have an eth1, and so I get:
>
> [daevid=pts/4]7:43pm:{/www/test}> ./machine.php
> eth1: error fetching interface information: Device not found
> eth1: error fetching interface information: Device not found
>
> How can I supress error messages for either exec() or system() while still
> getting regular good output. Prefixing with exec() or system() DOES NOT
> work. I still get the error messages above displayed to the terminal.

With bash one can redirect the 'standard error' (ie error messages) to some
other place. Thus you can use something like:

  ifconfig eth7 2> /dev/null

--
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
------------------------------------------
/*
It takes a special kind of courage to face what we all have to face.
*/

attached mail follows:


I know that this a PHP site, but I am trying to find a newsgroup that can
help me with some problems concerning Linux and iptables......I never really
have used Linux, basic knowledge, and I need to know how to allow someone to
ping and scan your machine. Any help would be appreciated!

attached mail follows:


https://listman.redhat.com/mailman/listinfo/redhat-list

Ron Allen (newbie) wrote:
> I know that this a PHP site, but I am trying to find a newsgroup that can
> help me with some problems concerning Linux and iptables......I never really
> have used Linux, basic knowledge, and I need to know how to allow someone to
> ping and scan your machine. Any help would be appreciated!
>
>
>

--
John C. Nichel IV
By-Tor.com
It's all about the Rush
http://www.by-tor.com

attached mail follows:


Most of the major distros have mailing lists to help you. I use
Mandrake 8.2 so i subscribe to the Mandrake list. I know RedHat has
them as well.

Michael

On Tue, 2003-05-06 at 14:37, Ron Allen (newbie) wrote:
> I know that this a PHP site, but I am trying to find a newsgroup that can
> help me with some problems concerning Linux and iptables......I never really
> have used Linux, basic knowledge, and I need to know how to allow someone to
> ping and scan your machine. Any help would be appreciated!
--
Michael Lewis <michaelnichestaffing.com>
NicheStaffing.com

attached mail follows:


[resend: I don't think this worked from webmail, trying from K-Mail]

Hello,
I'm attempting to see if $_SERVER["REQUEST_URI"] includes part of a url.
Here's an example with the real URL of my script removed:
<!-- For people with HTML-enabled e-mail readers, this is enclosed in
<pre> tags -->
<pre>
 if ($_POST["posted"]){
// If so, echo the following
echo "<h1>* $slapper slaps $slapee with a $size $mode</h1><br>";
echo "You can link to this file with " . "<a href=\"$link\">this link</a>";
}
elseif ($_POST != posted){
// Wasn't working before, let's see if this does it
echo "";
}
elseif ($_SERVER["REQUEST_URI"] ==
"http://myurl.com/my/path/myscript.php?thepartiwanttotestfor=";){
// Check and see if someone did a direct request
echo "<h1>* $slapper slaps $slapee with a $size $mode</h1><br>";
echo "You can link to this file with " . "<a href=\"$link\">this link</a>";
}
else {
// If not, echo nothing
echo "";
}

It works okay when someone uses the form below all this code, but when
someone uses the link
(myscript.com/my/path/myscript.php?slapper=whatever&slapee=whatever&size=whatever&mode=whatever)
it doesn't see $_POST includes posted (which is an input type=hidden
thing in the form) so it displays nothing.

So my question is, is there any way I can look for part of a string, or
do an approximate comparison?

Thanks :)
--
Jordan C.

attached mail follows:


> I'm attempting to see if $_SERVER["REQUEST_URI"] includes part of a
url.
> Here's an example with the real URL of my script removed:
> <!-- For people with HTML-enabled e-mail readers, this is enclosed in
> <pre> tags -->
> <pre>
> if ($_POST["posted"]){
> // If so, echo the following
> echo "<h1>* $slapper slaps $slapee with a $size $mode</h1><br>";
> echo "You can link to this file with " . "<a href=\"$link\">this
> link</a>";
> }
> elseif ($_POST != posted){
> // Wasn't working before, let's see if this does it
> echo "";
> }
> elseif ($_SERVER["REQUEST_URI"] ==
> "http://myurl.com/my/path/myscript.php?thepartiwanttotestfor=";){
> // Check and see if someone did a direct request
> echo "<h1>* $slapper slaps $slapee with a $size $mode</h1><br>";
> echo "You can link to this file with " . "<a href=\"$link\">this
> link</a>";
> }
> else {
> // If not, echo nothing
> echo "";
> }
>
> It works okay when someone uses the form below all this code, but when
> someone uses the link
>
(myscript.com/my/path/myscript.php?slapper=whatever&slapee=whatever&size
=w
> hatever&mode=whatever)
> it doesn't see $_POST includes posted (which is an input type=hidden
> thing in the form) so it displays nothing.

Use $_REQUEST['posted'] instead of $_POST['posted'] and add the "posted"
variable to your URL.

myscript.com/my/path/myscript.php?slapper=whatever&slapee=whatever&size=
whatever&mode=whatever&posted=something

$_REQUEST contains GET, POST, and COOKIE data, so using a form or URL
with "posted" in it will create that variable within $_REQUEST.

> So my question is, is there any way I can look for part of a string,
or
> do an approximate comparison?

Use strpos() for this.

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

attached mail follows:


Thanks, that works great :)

On Tuesday 06 May 2003 05:14 pm, John W. Holmes wrote:
> > I'm attempting to see if $_SERVER["REQUEST_URI"] includes part of a
>
> url.
>
> > Here's an example with the real URL of my script removed:
> > <!-- For people with HTML-enabled e-mail readers, this is enclosed in
> > <pre> tags -->
> > <pre>
> > if ($_POST["posted"]){
> > // If so, echo the following
> > echo "<h1>* $slapper slaps $slapee with a $size $mode</h1><br>";
> > echo "You can link to this file with " . "<a href=\"$link\">this
> > link</a>";
> > }
> > elseif ($_POST != posted){
> > // Wasn't working before, let's see if this does it
> > echo "";
> > }
> > elseif ($_SERVER["REQUEST_URI"] ==
> > "http://myurl.com/my/path/myscript.php?thepartiwanttotestfor=";){
> > // Check and see if someone did a direct request
> > echo "<h1>* $slapper slaps $slapee with a $size $mode</h1><br>";
> > echo "You can link to this file with " . "<a href=\"$link\">this
> > link</a>";
> > }
> > else {
> > // If not, echo nothing
> > echo "";
> > }
> >
> > It works okay when someone uses the form below all this code, but when
> > someone uses the link
>
> (myscript.com/my/path/myscript.php?slapper=whatever&slapee=whatever&size
> =w
>
> > hatever&mode=whatever)
> > it doesn't see $_POST includes posted (which is an input type=hidden
> > thing in the form) so it displays nothing.
>
> Use $_REQUEST['posted'] instead of $_POST['posted'] and add the "posted"
> variable to your URL.
>
> myscript.com/my/path/myscript.php?slapper=whatever&slapee=whatever&size=
> whatever&mode=whatever&posted=something
>
> $_REQUEST contains GET, POST, and COOKIE data, so using a form or URL
> with "posted" in it will create that variable within $_REQUEST.
>
> > So my question is, is there any way I can look for part of a string,
>
> or
>
> > do an approximate comparison?
>
> Use strpos() for this.
>
> ---John W. Holmes...
>
> PHP Architect - A monthly magazine for PHP Professionals. Get your copy
> today. http://www.phparch.com/

--
Jordan C.

attached mail follows:


Does anyone know what I need to install for this file.....?

configure: error: Cannot find libpq-fe.h. Please specify correct
PostgreSQL installation path

These are the installed packages on my system...

[rootjnichel php-4.3.1]# rpm -qa | grep post*
postgresql-libs-7.2.3-5.73
postgresql-tcl-7.2.3-5.73
postgresql-jdbc-7.2.3-5.73
postgresql-server-7.2.3-5.73
postgresql-7.2.3-5.73
postgresql-perl-7.2.3-5.73
postgresql-contrib-7.2.3-5.73
postgresql-docs-7.2.3-5.73
postgresql-odbc-7.2.3-5.73
postgresql-tk-7.2.3-5.73
postgresql-python-7.2.3-5.73

--
John C. Nichel IV
By-Tor.com
It's all about the Rush
http://www.by-tor.com

attached mail follows:


Hi,

Wednesday, May 7, 2003, 7:55:21 AM, you wrote:
JN> Does anyone know what I need to install for this file.....?

JN> configure: error: Cannot find libpq-fe.h. Please specify correct
JN> PostgreSQL installation path

JN> These are the installed packages on my system...

JN> [rootjnichel php-4.3.1]# rpm -qa | grep post*
JN> postgresql-libs-7.2.3-5.73
JN> postgresql-tcl-7.2.3-5.73
JN> postgresql-jdbc-7.2.3-5.73
JN> postgresql-server-7.2.3-5.73
JN> postgresql-7.2.3-5.73
JN> postgresql-perl-7.2.3-5.73
JN> postgresql-contrib-7.2.3-5.73
JN> postgresql-docs-7.2.3-5.73
JN> postgresql-odbc-7.2.3-5.73
JN> postgresql-tk-7.2.3-5.73
JN> postgresql-python-7.2.3-5.73

JN> --
JN> John C. Nichel IV
JN> By-Tor.com
JN> It's all about the Rush
JN> http://www.by-tor.com

You probably need to tell it where pgsql is, something like this:

--with-pgsql=shared,/usr/local/pgsql or

--with-pgsql=/usr/local/pgsql

depending on your needs
--
regards,
Tom

attached mail follows:


On Wednesday 07 May 2003 05:55, John Nichel wrote:
> Does anyone know what I need to install for this file.....?
>
> configure: error: Cannot find libpq-fe.h. Please specify correct
> PostgreSQL installation path
>
> These are the installed packages on my system...
>
> [rootjnichel php-4.3.1]# rpm -qa | grep post*
> postgresql-libs-7.2.3-5.73
> postgresql-tcl-7.2.3-5.73
> postgresql-jdbc-7.2.3-5.73
> postgresql-server-7.2.3-5.73
> postgresql-7.2.3-5.73
> postgresql-perl-7.2.3-5.73
> postgresql-contrib-7.2.3-5.73
> postgresql-docs-7.2.3-5.73
> postgresql-odbc-7.2.3-5.73
> postgresql-tk-7.2.3-5.73
> postgresql-python-7.2.3-5.73

Install postgresql-devel-*.rpm

--
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
------------------------------------------
/*
Jones' Motto:
        Friends come and go, but enemies accumulate.
*/

attached mail follows:


Does anyone know if there is a command that will return the URL
directory or location that the current script is running from?
 
Thanks,
 
Matt

attached mail follows:


create a phpinfo() page and look at the variables

> -----Original Message-----
> From: Matt Palermo [mailto:mpalermovt.edu]
> Sent: Tuesday, May 06, 2003 5:55 PM
> To: php-generallists.php.net
> Subject: [PHP] Directory Command
>
>
> Does anyone know if there is a command that will return the URL
> directory or location that the current script is running from?
>
> Thanks,
>
> Matt
>

attached mail follows:


At 23:55 06.05.2003, Matt Palermo said:
--------------------[snip]--------------------
>Does anyone know if there is a command that will return the URL
>directory or location that the current script is running from?
--------------------[snip]--------------------

$_SERVER['DOCUMENT_ROOT']

--
>O Ernest E. Vogelsinger
   (\) ICQ #13394035
    ^ http://www.vogelsinger.at/

attached mail follows:


> $_SERVER['DOCUMENT_ROOT']

That will return the document root for the site and not necessarily the
location of the script if the script is running in a subdirectory, or at
least that is what it is supposed to return, I guess if your server is
misconfigured it might return something else.

When in doubt create a file with a call to phpinfo() and see what is in your
env vars.
$_SERVER['PHP_SELF'] has filename of the script and path relative to the
document root, that might be what you want.
You can read about the values of predefined variables here
http://www.php.net/manual/en/reserved.variables.php, but the best way to
become familiar with what is available on your server is to look at
phpinfo()'s output.

> -----Original Message-----
> From: Ernest E Vogelsinger [mailto:ernestvogelsinger.at]
> Sent: Tuesday, May 06, 2003 3:21 PM
> To: Matt Palermo
> Cc: php-generallists.php.net
> Subject: Re: [PHP] Directory Command
>
>
> At 23:55 06.05.2003, Matt Palermo said:
> --------------------[snip]--------------------
> >Does anyone know if there is a command that will return the URL
> >directory or location that the current script is running from?
> --------------------[snip]--------------------
>
> $_SERVER['DOCUMENT_ROOT']
>
>
> --
> >O Ernest E. Vogelsinger
> (\) ICQ #13394035
> ^ http://www.vogelsinger.at/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


Hello All,

  Does anyone know of a mail list or forum script that will
make and send a email digest -- say for every 25 messages -- to each
member?
  Yahoo Groups does this but I can't find anything along
these lines. Any help ?

malcolm

attached mail follows:


I am trying to get the browser to upload a file to the server. When i try to
access the variable that "holds" the file, i only get the filename. How do I
get the actual file?

I tried copy($pdf,"$absbath/$pdf_filename") but that resulted in a:
"Warning: Unable to open 'E:\telalink.pdf' for reading: No such file or
directory in..."

The file is indeed there. What am I doing wrong? Is the copy command looking
for a server-side file path? If so, how do I get access to a file on the
client browser??

Any help would be wonderful! Tnx in advance.

--
Andrew Durk
adurkcultiv8.com

attached mail follows:


Notice that you must use enctype="multipart/form-data" for the file to
really upload.. And yes, the script looks for a serverside path...
"Andrew Durk" <adurkfarmvet.com> skrev i meddelandet
news:BADD9DF0.8BA8%adurkfarmvet.com...
> I am trying to get the browser to upload a file to the server. When i try
to
> access the variable that "holds" the file, i only get the filename. How do
I
> get the actual file?
>
> I tried copy($pdf,"$absbath/$pdf_filename") but that resulted in a:
> "Warning: Unable to open 'E:\telalink.pdf' for reading: No such file or
> directory in..."
>
> The file is indeed there. What am I doing wrong? Is the copy command
looking
> for a server-side file path? If so, how do I get access to a file on the
> client browser??
>
> Any help would be wonderful! Tnx in advance.
>
>
> --
> Andrew Durk
> adurkcultiv8.com
>

attached mail follows:


Wow, I guess file uploading is the topic of the week for the list.

You can search the archives, because I know file uploading has been
discussed a lot. Or you can read the documentation.
http://www.php.net/manual/en/features.file-upload.php The documentation has
an example of a form and of a form action.

> -----Original Message-----
> From: Andrew Durk [mailto:adurkfarmvet.com]
> Sent: Tuesday, May 06, 2003 3:14 PM
> To: php-generallists.php.net
> Subject: [PHP] input type=file
>
>
> I am trying to get the browser to upload a file to the server.
> When i try to
> access the variable that "holds" the file, i only get the
> filename. How do I
> get the actual file?
>
> I tried copy($pdf,"$absbath/$pdf_filename") but that resulted in a:
> "Warning: Unable to open 'E:\telalink.pdf' for reading: No such file or
> directory in..."
>
> The file is indeed there. What am I doing wrong? Is the copy
> command looking
> for a server-side file path? If so, how do I get access to a file on the
> client browser??
>
> Any help would be wonderful! Tnx in advance.
>
>
> --
> Andrew Durk
> adurkcultiv8.com

>

attached mail follows:


Make sure you are using the "temporary" filename, and not the "original"
one.

$_FILES['test']['name'] will be something like "MyFile.doc"
while $_FILES['test']['tmp_name'] will be "/temp/4534gefdg345.tmp"

The second one is the one you want to use on the server.

Try something like
    $pdf = $_FILES['pdffile']['tmp_name'];
    $pdf_filename = $_FILES['pdffile']['name'];
    move_uploaded_file($pdf, "$absbath/$pdf_filename");

Andrew Durk wrote:

> I am trying to get the browser to upload a file to the server. When i try to
> access the variable that "holds" the file, i only get the filename. How do I
> get the actual file?
>
> I tried copy($pdf,"$absbath/$pdf_filename") but that resulted in a:
> "Warning: Unable to open 'E:\telalink.pdf' for reading: No such file or
> directory in..."
>
> The file is indeed there. What am I doing wrong? Is the copy command looking
> for a server-side file path? If so, how do I get access to a file on the
> client browser??
>
> Any help would be wonderful! Tnx in advance.
>
>

attached mail follows:


<shameless plug>
I've written an article on File uploading if the docs aren't enough as
well: http://www.coggeshall.org/publications/ (Zend section)
</shameless plug>

:)

John

On Tue, 2003-05-06 at 18:31, Jennifer Goodie wrote:
> Wow, I guess file uploading is the topic of the week for the list.
>
> You can search the archives, because I know file uploading has been
> discussed a lot. Or you can read the documentation.
> http://www.php.net/manual/en/features.file-upload.php The documentation has
> an example of a form and of a form action.
>
> > -----Original Message-----
> > From: Andrew Durk [mailto:adurkfarmvet.com]
> > Sent: Tuesday, May 06, 2003 3:14 PM
> > To: php-generallists.php.net
> > Subject: [PHP] input type=file
> >
> >
> > I am trying to get the browser to upload a file to the server.
> > When i try to
> > access the variable that "holds" the file, i only get the
> > filename. How do I
> > get the actual file?
> >
> > I tried copy($pdf,"$absbath/$pdf_filename") but that resulted in a:
> > "Warning: Unable to open 'E:\telalink.pdf' for reading: No such file or
> > directory in..."
> >
> > The file is indeed there. What am I doing wrong? Is the copy
> > command looking
> > for a server-side file path? If so, how do I get access to a file on the
> > client browser??
> >
> > Any help would be wonderful! Tnx in advance.
> >
> >
> > --
> > Andrew Durk
> > adurkcultiv8.com
>
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall.org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

attached mail follows:


Did you search the archives first?
What about the manual?

Nu-uh.

This topic is discussed repeatedly on the list, and worse still, there's a
perfectly good working example of file uploads in the manual which tells you
nearly everything you could possibly need to know.

http://www.php.net/manual/en/features.file-upload.php

Justin French

on 07/05/03 9:14 AM, Andrew Durk (adurkfarmvet.com) wrote:

> I am trying to get the browser to upload a file to the server. When i try to
> access the variable that "holds" the file, i only get the filename. How do I
> get the actual file?
>
> I tried copy($pdf,"$absbath/$pdf_filename") but that resulted in a:
> "Warning: Unable to open 'E:\telalink.pdf' for reading: No such file or
> directory in..."
>
> The file is indeed there. What am I doing wrong? Is the copy command looking
> for a server-side file path? If so, how do I get access to a file on the
> client browser??
>
> Any help would be wonderful! Tnx in advance.
>

attached mail follows:


I have a quick question. Currently, I have a form embedded in some html code
that goes to another page when the user clicks submit. On this other page, I
update the database and perform some other operations. When I am done on
this page, how do I get back to original form page so the user can fill out
another form.

Thanks,
Dale

attached mail follows:


Dale wrote:

> I have a quick question. Currently, I have a form embedded in some html code
> that goes to another page when the user clicks submit. On this other page, I
> update the database and perform some other operations. When I am done on
> this page, how do I get back to original form page so the user can fill out
> another form.
>
> Thanks,
> Dale
>
>

function Redirect( $url, $status = "302 Found" ) {
   header( "Status: $status" );
   header( "Location: $url" );

   echo "<H1>$status</H1>\n";
   echo "<A HREF='$url'>$url</A>\n";
   exit();
}

Redirect("/original/form.html");

attached mail follows:


> I have a quick question. Currently, I have a form embedded in some html code
> that goes to another page when the user clicks submit. On this other page, I
> update the database and perform some other operations. When I am done on
> this page, how do I get back to original form page so the user can fill out
> another form.

header("Location: firstpage.html");

--
Greg Donald
http://destiney.com/

attached mail follows:


> I have a quick question. Currently, I have a form embedded in some
html
> code
> that goes to another page when the user clicks submit. On this other
page,
> I
> update the database and perform some other operations. When I am done
on
> this page, how do I get back to original form page so the user can
fill
> out
> another form.

You can use header() to redirect back to the form page after your
processing, so long as there's no output. This is actually the best
method to use, as a refresh of the form will not resubmit your data.
You'll be saving yourself from that headache later on. :)

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

attached mail follows:


> I have a quick question. Currently, I have a form embedded in some
> html code
> that goes to another page when the user clicks submit. On this other
> page, I
> update the database and perform some other operations. When I am done
> on
> this page, how do I get back to original form page so the user can
> fill out
> another form.

Or you could just create one page like this:

if (isset($_POST['submit])) {
// Handle the form.
}
// Display the form.

It will automatically handle the submitted form and then redisplay it.

Larry

attached mail follows:


> > I have a quick question. Currently, I have a form embedded in some
> > html code
> > that goes to another page when the user clicks submit. On this other
> > page, I
> > update the database and perform some other operations. When I am
done
> > on
> > this page, how do I get back to original form page so the user can
> > fill out
> > another form.
>
> Or you could just create one page like this:
>
> if (isset($_POST['submit])) {
> // Handle the form.
> }
> // Display the form.
>
> It will automatically handle the submitted form and then redisplay it.

Just be aware that with this method, you run into the refresh problem.
People hitting refresh will cause the form to be submitted again or
they'll be asked it they want to submit it again. You can use this
method and actually redirect back to the same page, thus clearing the
POST/GET variables, so the refresh just refreshes the form page...

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/

attached mail follows:


Is there an easy way to list the declared variables in a PHP file?

I am trying to use the GeoIP PHP script (http://www.maxmind.com) on an
existing PHP page. I can use the PHP script on any new pages I create but
my existing pages cause the GeoIP include to fail to return any results.

I am guessing I have some sort of conflict where I am resetting a variable
that GeoIP uses. I just want to quickly compare the defined variables on
the GeoIP include with the ones in my existing PHP file with out hunting
line by line.

Thanks,

Dan

attached mail follows:


Unless you are using a very old version of PHP, you can try with:

print_r($GLOBALS);

> Is there an easy way to list the declared variables in a PHP file?
>
> I am trying to use the GeoIP PHP script (http://www.maxmind.com) on an
> existing PHP page. I can use the PHP script on any new pages I create but
> my existing pages cause the GeoIP include to fail to return any results.
>
> I am guessing I have some sort of conflict where I am resetting a variable
> that GeoIP uses. I just want to quickly compare the defined variables on
> the GeoIP include with the ones in my existing PHP file with out hunting
> line by line.
>
> Thanks,
>
> Dan
>

attached mail follows:


At 5/6/2003 04:37 PM, dan.tappinorourke-eng.com wrote:

> Is there an easy way to list the declared variables in a PHP file?

I'm just pulling this out of my butt, but you should be able to do this:

<?
$thisArray = get_defined_vars();
foreach ($thisArray as $key => $value) {
        echo $key." : ".$value." <br />\n";
}
?>

and get a list of every variable that's been set by the current script (at
the point that code is run).

~Steve-o
--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: skellerhealthtvchannel.org
Web: www.healthtvchannel.org

attached mail follows:


<guess>
Does print_r($GLOBALS) or print_r($_GLOBALS) help?
</guess>

Justin French

on 07/05/03 9:37 AM, Dan Tappin (dan.tappinorourke-eng.com) wrote:

> Is there an easy way to list the declared variables in a PHP file?
>
> I am trying to use the GeoIP PHP script (http://www.maxmind.com) on an
> existing PHP page. I can use the PHP script on any new pages I create but
> my existing pages cause the GeoIP include to fail to return any results.
>
> I am guessing I have some sort of conflict where I am resetting a variable
> that GeoIP uses. I just want to quickly compare the defined variables on
> the GeoIP include with the ones in my existing PHP file with out hunting
> line by line.
>
> Thanks,
>
> Dan
>

attached mail follows:


Hiya ppl,
after talking to everyone on this list I finally chose Smarty for my PHP
templating needs...its really a very good templating class/package.

Just one problem, when i open the .tpl files (smarty template files) in
dreamweaver it opens up the code view/window and I cant get it to open in
the design view/window...what should I do?

I'm new to smarty but I know a lot of you guys are not...please help.

Thanks in advance.
-Ryan

attached mail follows:


http://smarty.php.net/contribs/misc/

--- Ryan A <ryanjumac.com> wrote:
> Hiya ppl,
> after talking to everyone on this list I finally
> chose Smarty for my PHP
> templating needs...its really a very good templating
> class/package.
>
> Just one problem, when i open the .tpl files (smarty
> template files) in
> dreamweaver it opens up the code view/window and I
> cant get it to open in
> the design view/window...what should I do?
>
> I'm new to smarty but I know a lot of you guys are
> not...please help.
>
> Thanks in advance.
> -Ryan

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

attached mail follows:


Hi all,

This issue was originally posted as Calling a Function from a Remote File.
I've since tried a few things and im still having troubles. Help!?

I've built my own home page that I'm hoping will serve as the "front end" of
an application I purchased. I'd like to "call" some functions from the
application that build a couple of menu bars.

I've tried including the file that the functions are in, but wherever I place
the include it draws the included file and disregards all of my code after
the include.

I've tried several different methods of calling the function, including:

<?
include("file.php");
$call = new class("");
$call->function();
$call->function2();
?>
and

<?
include("file.php");
function();
function2();
?>

and also placing the includes at the beginning of the page with the function
calls at the position I want the menu bars.

In all cases, where I place the include is where it starts drawing the
included file and disregarding my code.

Any ideas??

Chris

----------------------------------------------------------------
This message was sent from Wakeboarder.com Free E-mail.
For wakeboarding information visit http://www.wakeboarder.com.

attached mail follows:


Hmm... Do you have <? ?> tags inside that include file too?
<chriswakeboarder.com> skrev i meddelandet
news:twig.1052265887.13598wakeboarder.com...
> Hi all,
>
> This issue was originally posted as Calling a Function from a Remote File.
> I've since tried a few things and im still having troubles. Help!?
>
> I've built my own home page that I'm hoping will serve as the "front end"
of
> an application I purchased. I'd like to "call" some functions from the
> application that build a couple of menu bars.
>
> I've tried including the file that the functions are in, but wherever I
place
> the include it draws the included file and disregards all of my code after
> the include.
>
> I've tried several different methods of calling the function, including:
>
> <?
> include("file.php");
> $call = new class("");
> $call->function();
> $call->function2();
> ?>
> and
>
> <?
> include("file.php");
> function();
> function2();
> ?>
>
> and also placing the includes at the beginning of the page with the
function
> calls at the position I want the menu bars.
>
> In all cases, where I place the include is where it starts drawing the
> included file and disregarding my code.
>
> Any ideas??
>
> Chris
>
> ----------------------------------------------------------------
> This message was sent from Wakeboarder.com Free E-mail.
> For wakeboarding information visit http://www.wakeboarder.com.
>

attached mail follows:


As a matter of fact - yes.

Could that be it??

Chris

DvDmanDT <dvdmandttelia.com> said:

> Hmm... Do you have <? ?> tags inside that include file too?
> <chriswakeboarder.com> skrev i meddelandet
> news:twig.1052265887.13598wakeboarder.com...
> > Hi all,
> >
> > This issue was originally posted as Calling a Function from a Remote File.
> > I've since tried a few things and im still having troubles. Help!?
> >
> > I've built my own home page that I'm hoping will serve as the "front end"
> of
> > an application I purchased. I'd like to "call" some functions from the
> > application that build a couple of menu bars.
> >
> > I've tried including the file that the functions are in, but wherever I
> place
> > the include it draws the included file and disregards all of my code after
> > the include.
> >
> > I've tried several different methods of calling the function, including:
> >
> > <?
> > include("file.php");
> > $call = new class("");
> > $call->function();
> > $call->function2();
> > ?>
> > and
> >
> > <?
> > include("file.php");
> > function();
> > function2();
> > ?>
> >
> > and also placing the includes at the beginning of the page with the
> function
> > calls at the position I want the menu bars.
> >
> > In all cases, where I place the include is where it starts drawing the
> > included file and disregarding my code.
> >
> > Any ideas??
> >
> > Chris
> >
> > ----------------------------------------------------------------
> > This message was sent from Wakeboarder.com Free E-mail.
> > For wakeboarding information visit http://www.wakeboarder.com.
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--

----------------------------------------------------------------
This message was sent from Wakeboarder.com Free E-mail.
For wakeboarding information visit http://www.wakeboarder.com.

attached mail follows:


I tried removing the <? ?> tags from the included file and I got a long page
of code following the point of the include... Was that the right thing to try?

Chris

DvDmanDT <dvdmandttelia.com> said:

> Hmm... Do you have <? ?> tags inside that include file too?
> <chriswakeboarder.com> skrev i meddelandet
> news:twig.1052265887.13598wakeboarder.com...
> > Hi all,
> >
> > This issue was originally posted as Calling a Function from a Remote File.
> > I've since tried a few things and im still having troubles. Help!?
> >
> > I've built my own home page that I'm hoping will serve as the "front end"
> of
> > an application I purchased. I'd like to "call" some functions from the
> > application that build a couple of menu bars.
> >
> > I've tried including the file that the functions are in, but wherever I
> place
> > the include it draws the included file and disregards all of my code after
> > the include.
> >
> > I've tried several different methods of calling the function, including:
> >
> > <?
> > include("file.php");
> > $call = new class("");
> > $call->function();
> > $call->function2();
> > ?>
> > and
> >
> > <?
> > include("file.php");
> > function();
> > function2();
> > ?>
> >
> > and also placing the includes at the beginning of the page with the
> function
> > calls at the position I want the menu bars.
> >
> > In all cases, where I place the include is where it starts drawing the
> > included file and disregarding my code.
> >
> > Any ideas??
> >
> > Chris
> >
> > ----------------------------------------------------------------
> > This message was sent from Wakeboarder.com Free E-mail.
> > For wakeboarding information visit http://www.wakeboarder.com.
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--

----------------------------------------------------------------
This message was sent from Wakeboarder.com Free E-mail.
For wakeboarding information visit http://www.wakeboarder.com.

attached mail follows:


You need <?php ?> tags around PHP code inside an include. When PHP
encounters and include it exits the parser so you need tags to tell it to
start parsing again. Do you understand what you are trying to accomplish?
It does not appear so. You have tried function calls in arbitrary places
and switching between using them as methods on an object and just functions.
If you do not know what you are trying to do and with what it is going to be
really hard for someone to help you, especially when it seems you do not
understand PHP at all but are expecting someone to hold your hand and walk
you through the basics. Maybe this seems a little harsh, but you are just
trying stuff willy nilly and do not show any understanding of the language,
which would imply you have done no research at all but expect something to
just magically start working.

You need to call the function where you expect it to execute. If the
function is a method in a class you need to call it on an object, if not,
you need to treat it as a function. If your script is just exiting after
you include something either it is encountering an error, in which case it
would print one to output and you should include it in your email, or there
is something in the include telling it to end, such as a call to exit(). If
it just starts executing code where ever the include is, the include
probably contains inline code and not just functions or a class definition.
If you expect meaningful help, you might want to post what is in your
include.

> -----Original Message-----
> From: chriswakeboarder.com [mailto:chriswakeboarder.com]
> Sent: Tuesday, May 06, 2003 5:54 PM
> To: DvDmanDT
> Cc: php-generallists.php.net
> Subject: Re: [PHP] Re: Revised - Call a Function from a Local File
>
>
> I tried removing the <? ?> tags from the included file and I got
> a long page
> of code following the point of the include... Was that the right
> thing to try?
>
> Chris
> > > I've tried including the file that the functions are in, but
> wherever I
> > place
> > > the include it draws the included file and disregards all of
> my code after
> > > the include.
> > >
> > > I've tried several different methods of calling the function,
> including:
> > >