[PHP] Memory upload question..

2001-11-22 Thread Pierre-Yves Lemaire

do you have a tip to upload big files without the hassle of having
php crunch so much memory? If I upload, say, 20 MB of data, my script
process will end up using 20 MB of memory. I think it stores all received
data
in memory and then flushes it in the temp file at the end.

Regards,



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] What to use when HTTP_REFERER is not set?

2001-11-03 Thread Pierre-Yves Lemaire

Hello,

I need to put a small security feature in one of my page.
The page is open as a popup from another web site. By checking the referer I tought
I could block any other call to this page but the referer variable is often not set...
What else could I do? ( no ssl so far is available for this :(  )

Any advice, tutorial or doc on the subject would be helpful.
thanks,
py



Re: [PHP] php/mySql SELECT where clause using dates.

2001-05-03 Thread Pierre-Yves Lemaire

Hello,

maybe this could help,

WHERE TO_DAYS( NOW()) - TO_DAYS( your_date_field ) <= 45

py

At 04:30 PM 5/3/01 +0200, you wrote:
>***NEWBIE ALERT***  (I am only very new at this)
>
>PHP and MySQL
>
>OK - I have a table with data and one of the fields is a Date field.
>
>Now I would like to SELECT all records where the date is less that 45 days
>old.
>
>Eh, How do I do that?
>
>I have tried this:
>
>#Declaring variables
>$today=date("Y-m-d");
>$lastmonth = $today-30
>
>$query = "SELECT * FROM customers WHERE Site='egebjergnet' AND
>DatoOprettet>'$lastmonth' ORDER BY FirmaNavn";
>
>
>AND I get an error, of course.  hmmm
>--
>==
>Regards from Denmark, Europe
>Please cc your reply to [EMAIL PROTECTED]
>==
>I haven't lost my mind, I've got it backed up on TAPE somewhere...
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] a bit off the list but....

2001-05-01 Thread Pierre-Yves Lemaire

There is these two SAP vendors talking to each other. The first one says:
"I finnally convinced company xyz to buy our products". The second one says:
"It took them a long time to see the light!!". The first one replies:
"Ya, now here comes the darkness..."

ha ha ha
py


At 11:04 PM 5/1/01 -0400, you wrote:
>don't know if its what you're talking about, but try www.sap.com
>also, search google...
>
>-jack
>
>-Original Message-
>From: Jacky [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 02, 2001 10:28 AM
>To: [EMAIL PROTECTED]
>Subject: [PHP] a bit off the list but
>
>
>It is a bit off the list here but is theer anybody know what is SAP? I mean,
>is that a script language or OS or a DB software?
>cheers
>Jack
>[EMAIL PROTECTED]
>"There is nothing more rewarding than reaching the goal you set for
>yourself"
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Job in Whistler, BC

2001-04-17 Thread Pierre-Yves Lemaire

Last time I worked there I had to sleep in my car for a month!
No housing...
Skied like hell tho :)



At 09:33 PM 4/16/01 -0700, you wrote:


>   You'll probably won't get to see the now :-<.
>
>
>__John Monfort_
>_+---+_
>  P E P I E  D E S I G N S
>www.pepiedesigns.com
>"The world is waiting, are you ready?"
>-+___+-
>
>On Mon, 16 Apr 2001, Mark Maggelet wrote:
>
> > On Mon, 16 Apr 2001 20:00:27 -0700, Dddogbruce \(@home.com\)
> > ([EMAIL PROTECTED]) wrote:
> > >Whistler's cool!
> >
> > Yeah, and a php job at a ski resort?! Hmm, that's way too good to be
> > true.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] I know POST Uploads, what about "downloads?"

2001-04-13 Thread Pierre-Yves Lemaire


Hello,
Someone posted this a couple of days ago, might help you.

$headertxt = "Content-Disposition: attachment; filename=\"".$filename."\"";
header("Content-Type: application/force-download");header($headertxt);

py

At 09:51 AM 4/13/01 -0400, you wrote:
>I have a large script set that allows people I host to manage their files 
>on my server until they have a FTP account setup. Unfortunately the only 
>way they can save an uploaded file is to r-click on the link in the 
>managers listing and choose "Save link target". This obviously doesn't 
>work for PHP or ASP(ugh) because the browser parses them THEN sends it to 
>the client. Is there anyway to allow the client to download the actual 
>unparsed file? Any help would be appreciated ^_^


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Are calling COM applications a trojan?

2001-04-11 Thread Pierre-Yves Lemaire

Well, first off all, what I'm taking about has nothing to do with COM object.
Word will format HTML very nicely, keep it simple with only , ,  
tags.

All you need to do is put this on top of your page,
that is, before you send anyting to the client.
header("Content-Type: application/vnd.ms-word");

Now the client knows that the data will be a word document. (built in HTML 
but we don't care)
IE will open word if it is on the client pc, netscape will open a download 
box of a word
document.

I beleive you could built a more sophiticated solution using COM, but
this as always work fine for me and my user's, especially since I hate
word so much :)

py

At 09:18 PM 4/11/01 +0800, you wrote:
>download dialog?
>
>what will be in that dialog box?
>
>And, I read a book saying that you can open a word document on the client
>side and insert words in it.
>
>
>----- Original Message -
>From: Pierre-Yves Lemaire <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, 11 April, 2001 3:54 PM
>Subject: Re: [PHP] Are calling COM applications a trojan?
>
>
> >
> > It can't.
> > If you put the appropriate header type (ms-word in this case), IE will
>open
> > word. Netscape
> > and other browser will open a download dialog box of the document.
> >
> > py
> >
> >
> > At 04:57 PM 4/11/01 +0800, you wrote:
> > >Then,  how can it open a words document on the client side?
> > >
> > >- Original Message -
> > >From: Delbono <[EMAIL PROTECTED]>
> > >To: Zeus <[EMAIL PROTECTED]>
> > >Sent: Wednesday, 11 April, 2001 4:32 PM
> > >Subject: Re: [PHP] Are calling COM applications a trojan?
> > >
> > >
> > > > Com Apps, are not called on a client side.
> > > > Actually, if you print out the version of the com application, it
>displays
> > > > the version of the software installed on the server, not the one on
>the
> > > > client.
> > > >
> > > > If I have Word2000 on m local PC and on the server I have Word97,
> > > >
> > > > a script taht prints App.Version, will print MSWord97.
> > > >
> > > >
> > > > Sent: Wednesday, April 11, 2001 10:26 AM
> > > > Subject: [PHP] Are calling COM applications a trojan?
> > > >
> > > >
> > > > I'm sure many of you seasoned developers have used COM before (not
> > >necessary
> > > > with PHP) but if PHP is a server-side language, how can it call a
>program
> > >on
> > > > the client to open. Isn't it as deadly as a hacker opening your
>computer?
> > > >
> > > > Lets see some sides :)
> > > >
> > > > --
> > > > David Chua aka. Zeus
> > > > Founder, Frozened.com
> > > > --
> > > >
> > > >
> > > >
> > >
> > >
> > >--
> > >PHP General Mailing List (http://www.php.net/)
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> > + ==
> > + Pierre-Yves Lem@ire
> > + E-MedHosting.com
> > + (514) 729-8100
> > + [EMAIL PROTECTED]
> > + ==
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Forcing a dynamic created text file to be saved

2001-04-10 Thread Pierre-Yves Lemaire

After you have created the file, use this to force a downlaod.
This will downlaod anything, even an html file.

$fileName = basename($downloadFile);
header("Content-disposition: attachment; filename=\"$fileName\"");
header("Content-type: application-download");
header("Pragma: no-cache");
header("Expires: 0");
$fn=fopen($downloadFile,"r");
fpassthru($fn);
fclose($fn);
exit;

py

"No matter what you know, someone will know more :)"

At 12:01 PM 4/11/01 +1000, you wrote:

>"Lindsay Adams" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>You are not going to be able to use PHP to tell the client browser to do
>anything.
>
>you are going to have to embed either a java.applet, or javascript to do it.
>I donĀ¹t know a whole lot about either, so I don't know if they are even a
>possibility.
>
>On 4/10/01 2:29 PM, "Nando2" <[EMAIL PROTECTED]> wrote:
>
> > Hello all!
> >
> > I have a PHP4 script that produces a text file and I would like that when
>the
> > user access this script the text content of it was forced to be saved
>meaning
> > that when the user selects it he/she will have the save dialog form to
>save
> > the text file with the filename specified in the header function. So far I
> > have managed to create the text file dynamicaly but still I have to click
>the
> > browser's save button to save the file with the determined filename. I
>wanted
> > it to be forced.
> >
> > Does anyone know how to do it ?
> >
> > Here's the code :
> >
> >  >
> >   // Carlos Fernando Scheidecker Antunes : Test saving text files with PHP
> >   // this sets the content type as being plain text
> >
> >   header("Content-Type : text/plain; charset=\"iso-8859-1\"");
> >
> >   // this sets the file name
> >
> >   header("Content-Disposition: filename=\"test.txt\"");
> >
> >   // creates the dynamic content of the text file here
> >
> >   print("TextFile test\r\n\");
> >   for ($i=1; $i < 100; $i++) {
> >   print("This is line number ".$i."\r\n");
> >   }
> >
> > ?>
>
>
>try:
>
>header("Content-Type: unknown/unknown");
>
>browswer won't know what type of file it is, so will prompt to save.. should
>get the file-name right from the other.
>
>bkx
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] assignment operator works for comparison??

2001-04-10 Thread Pierre-Yves Lemaire


 > if($shiny = 0){
This does not compare anyting, it assigns 0 to $shiny

 > echo( $shiny ) // this will return 0
That's normal, you just assign 0 to it ;)

= assignment operator
== comparison operator

py


At 01:53 PM 4/10/01 -0700, you wrote:
>This confused me for awhile, because the single equal sign seemed to work
>for comparison, but created inexplicable errors in my programs.  It seems
>strange to me that a successful variable value assignment does not return
>true.
>
>example:
>
>
>  $shiny = 1;
>  if($shiny = 0){ echo("This wont print"); }
>  echo( $shiny ); //this will return 0
>
>?>
>
>--Dan
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Commercial sites that use PHP

2001-04-10 Thread Pierre-Yves Lemaire

 > Yahoo acquired eGroups and Google this past year,

Hum, I think yahoo bought google's technology but not
the company.

Google.com is using Perl, Python, Java/Servlet/JSP and C++.
Well that is what they ask for in their job oppenings.

py



At 10:20 AM 4/10/01 -0700, you wrote:

>Yahoo uses a lot of Python.  Yahoo Mail pages have extensions of .py,
>indicating Python.  Yahoo acquired eGroups and Google this past year, both
>of which openly use Python to generate pages.  They most likely use Python
>in conjunction with other scripting and compiled languages.
>
>-Ben
>
>-Original Message-
>From: Michael Kimsal [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, April 10, 2001 9:47 AM
>To: [EMAIL PROTECTED]
>Subject: Re: [PHP] Commercial sites that use PHP
>
>
>
>
>Brent Langston wrote:
>
> > Does anyone know what Yahoo uses?  It's obviously some form of
>scripting...
> > especially at http://my.yahoo.com.  I've always been curious about what
>they
> > are using as their parser... it appears to spit out pure HTML, so it acts
> > like PHP...
> >
> > Any thoughts?
>
>No offense here, but EVERYTHING does that.  ASP, JSP, CF, Perl, Frontier,
>etc.
>I think it's pretty impossible to tell what someone's using unless they
>announce
>
>via file extensions or something, and even then you can't always tell.
>
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Close Window script

2001-04-06 Thread Pierre-Yves Lemaire

You could do it only in javavascript

or in php

echo "Close this 
window\n";

py

At 02:45 PM 4/6/01 -0400, you wrote:
>Hi all,
>Can anyone tell me how to write a script to close the current opened window
>with hyperlink? Thank you.
>
>Calvin Chua
>Systems Analyst
>InterClean Equipment, Inc.
>734-975-2967
>www.InterClean.com
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem with newline and email

2001-04-06 Thread Pierre-Yves Lemaire

Hello,

ok I am getting completely crazy here, I use this to make shure
outlook will display newlines correctly. But now I found out
that exchange is jumping 2 lines at every newline with this...
$msg = str_replace ( "\n", "\r\n", $msg );

My question, what sould I use in order to send a long message,
wich is coming multiple db fields to a text file to php mail(),
so it will be formatted nicely on all email client?
Or, is it possible?


Any piece of code, tutorial, newsletter script, good wiches or
old grandma's soup would be so appreciated!

py






+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP and MD5 passwords?

2001-04-04 Thread Pierre-Yves Lemaire

hum, that would do it?

function encrypt_pwd( $pwd ){
   if ( function_exists( md5 )){
   $password = md5( $pwd );
}else{
   $password = $pwd;
}
   return $password;
}

py

At 11:12 AM 4/4/01 -0400, you wrote:
>Greetings,
>
>How would I go about using PHP to take an entered password, and check it
>against an encyrpted MD5 password in a database or flat-file?
>
>-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-
>Chris Hutton - KF4YDF   [EMAIL PROTECTED]
>Senior Administrator404.378.0499, Fax 877.471.6649
>RaptorNet Systems   http://www.raptor.nu
>-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-\-/-
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] New buzz SOAP?

2001-04-03 Thread Pierre-Yves Lemaire

Yes, maybe, but it means that your old stuff in ASP has to be modified.
It's cool, but it's a path of no return, just like any ms stuff, be careful...

py
Some links:
http://xml.apache.org/soap/
http://sourceforge.net/projects/soapphpclient/



At 06:32 PM 4/3/01 +0100, you wrote:
>Java rocks. Personally I'm not a fan of MS. However, I saw a sneak preview
>of .NET in action last July and was astonished by the possible potential for
>this. There are many aspects of .NET, SOAP being just one of them. I saw
>code being written in a single GUI development environment where VB called
>C# called COBOL(??!? I'm serious here). The code was debugged in a single
>debugger and jumped seamlessly from line to line across different languages.
>Calling a function/method in a different language was as simple as scrolling
>through MS's intellisense dropdowns, you don't even need to know what
>language the relevant function is written in. ASP has been converted to run
>with the .NET common language runtime(CLR), meaning that you can write ASP
>in any language compatible with the CLR (i.e. VB, C#, COBOL, umpteen other
>languages currently being converted).
>
>Most cool was the way in which you can create web services. This is where
>SOAP comes into play. By tagging a function in a CLR compatible language
>with a 'web service' tag the function becomes exposed and available across
>the net to anyone else using SOAP development environments (admittedly only
>.NET at the moment).
>
>There were many, many oohs and aahs at the conference, from my position they
>were well deserved. I'm not a fan of MS but don't write them off. As a
>developer I haven't such a potential for a revolution since Windows 2.0
>first came out.
>
>
>
>-Original Message-
>From: David VanHorn [mailto:[EMAIL PROTECTED]]
>Sent: 03 April 2001 17:59
>To: Neil Kimber; Paulson, Joseph V. "Jay"; 'Stewart Taylor'; 'Brandon
>Orther'; [EMAIL PROTECTED]
>Subject: RE: [PHP] New buzz SOAP?
>
>
>
> >
> >This is going to be big because it is a very large part of the new
>Microsoft
> >.NET strategy. In essence it will enable everyone and everything to talk
> >together without worrying about hardware, software or OS's
>incompatibilities
> >(well, that's the theory, anyway). Of course, I'm sure that MS will make
> >their own non-open extensions and tie everyone into their World.
>
>
>I can't count the number of times I've heard this promise..
>Anyone remember how Java was supposed to take over the world?
>
>
> >The best thing about SOAP is the sense of humour of the designers. Part of
> >the SOAP toolkit is called the Remote Object Proxy Engine, this is
> >responsible for the consumption of dispatching of SOAP messages. So, you
>get
> >SOAP on a ROPE!
>
>Don't drop the SOAP! :)
>
>--
>Dave's Engineering Page: http://www.dvanhorn.org
>Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Programming Jobs - what I look for.

2001-04-02 Thread Pierre-Yves Lemaire


* Willingness to work weekends/evenings, if need be, to meet deadlines.



And if you are still working weekends and evenings after 9 months on the 
job, quit immediately. Start your own company or go fishing :)

py


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php error code.

2001-03-29 Thread Pierre-Yves Lemaire

Yes, the php.ini files is read when apache start.
py

At 03:53 PM 3/29/01 -0500, you wrote:
>In a message dated 29/03/2001 21:42:57 GMT Daylight Time,
>[EMAIL PROTECTED] writes:
>
><< If you have permission to modify php.ini, see the setting "display_errors"
>  and the attached comments. You can tell PHP to write these error messages to
>  a log file instead of to the browser.
>
>  Kirk >>
>
>
>If I make a change to my php.ini file, once I re-upload it do I need to
>restart the server or something as none of my changes are taking place?
>
>Ade
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Tough One

2001-03-29 Thread Pierre-Yves Lemaire

This is the only viable solutions because most
system admin will banned all system calls coming from the web.
As it should be, I think.

py

At 08:34 AM 3/29/01 -0600, you wrote:
>I good solution for this kind of stuff is to just build a queue, either file
>or database. WHen you need to do a system type function you add that command
>to the queue, then have a cron job that runs (which can more safely run as a
>provolidged user), verifies that the function is ok and processes the job. If
>you have PHP compiled in CGI mode you can write the script in PHP otherwise
>you can do it in perl or bash or whatever.
>
>
>
>On Thursday 29 March 2001 08:22, [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > Ok I have a real tough one here (well to me it is :-)
> >
> > If I telnet into my server I can add a user by running the following
> > command...
> >
> > /usr/sbin/cadduser -d www.domain.com -f users full name -u username -p
> > password -w emailaddress for forwarding
> >
> > Which is great, but as I`m offering free email forwarding I could
> > potentially get a lot of users, and that would be a lot of maintenance
> > time. So I need to somehow incorporate the above into my signup scripts. Is
> > this even possible??
> >
> > TIA
> > Ade
>
>--
>Chris Moewes-Bystrom
>[EMAIL PROTECTED]
>http://moewes.com
>http://linuxnovice.org
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] The ubitquitous forum project

2001-03-26 Thread Pierre-Yves Lemaire

The style of forum you choose for your site depends on your users.
Novice user have a difficult time with usenet or bbs style forum.
They will not use it unless you make it very easy. That is why you
see bilboard style forum on large public site or portals. They have done 
user testing.

py


At 07:37 PM 3/26/01 -0600, you wrote:
>[Explanation of UBB-style]
>
>...And that's USENET-style. In OE I can expand and contract threads at will,
>like you mentioned, and I can tell which posts are in reply to which other
>posts.
>
>Sig for a Day
>Stephan Ahonen, ICQ 491101
>"That's very funny Scotty, now beam down my clothes!"
>Come back tomorrow for a different sig!
>Backspace a single "s" to reply by email
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] What could I be doing wrong here

2001-03-26 Thread Pierre-Yves Lemaire

And like this?
echo $myrow["id"] ."";  //Usually $myrow[0] etc

py

At 10:53 AM 3/27/01 +1200, you wrote:
>I can't figure out why this doesn't work. Rather than echo $myrow[0] which
>works, I want to use the feild name. Like $myrow[make] to make reading the
>code easier. IS this possible?
>
>Here is some code:
>
>$db = mysql_connect("localhost", $user, $pass)OR DIE("Unable to connect to
>database");
>
>   mysql_select_db("database",$db) OR DIE("Unable to connect to database");
>
>   $result = mysql_query("SELECT * FROM stock",$db);
>
>while ($myrow = mysql_fetch_row($result))
>{
>echo "$myrow[id]";  //Usually $myrow[0] etc
>echo "$myrow[make]";
>echo "$myrow[model]";
>echo "$myrow[sub_model]";
>}
>
>Thanks Heaps
>
>
>--
>Regards,
>
>
>YoBro
>-
>DO NOT REPLY TO THIS VIA EMAIL
>PLEASE USE THE NEWSGROUP
>All emails sent to this address are automatically deleted.
>This is to avoid SPAM!
>-
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] random letters and numbers

2001-03-24 Thread Pierre-Yves Lemaire

Hello,

I use a random password function to do just that,

function randomPassword($length = 8) {
   // all the chars we want to use
   $all = explode( " ",
 "a b c d e f g h i j k l m n o p q r s t u v w x y z "
 . "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z "
 . "0 1 2 3 4 5 6 7 8 9 _");

for($i=0;$i<$length;$i++) {
  srand((double)microtime()*100);
  $randy = rand(0, 61);
  $pass .= $all[$randy];
}

 return $pass;
}

$new_filename = randomPassword(10);


For the delete of the file, unlink is your answer:
http://www.php.net/manual/en/function.unlink.php

hope it help!
py

At 12:05 PM 3/24/01 -0500, you wrote:
>Is there an easy way to create random numbers and letters for a file example
>
>
>http://www.mydomain.com/1w2e3rff.txt
>
>and then after they download it have it be deleted off the server?
>
>
>thanks
>
>randy
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


+ ==
+ Pierre-Yves Lem@ire
+ E-MedHosting.com
+ (514) 729-8100
+ [EMAIL PROTECTED]
+ ==


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Header Problem

2001-03-21 Thread Pierre-Yves Lemaire

Hello,
Yes this should work, but if like me, you still have no redirection and
you are working with IE 4.0, put exit; after header.
$URL="domain.com";
header ("Location: Http://www.$URL/members/index.php");
exit;

I have not seen this anywhere, but putting exit; after a redirection
was the only way to get my redirection with header to work.

py

- Original Message -
From: Rasmus Lerdorf <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 7:45 AM
Subject: Re: [PHP] Header Problem


> Should work just fine.
>
> On Wed, 21 Mar 2001 [EMAIL PROTECTED] wrote:
>
> > Hi,
> >
> > I`m having whats probably a very basic problem but just can`t get my
head
> > around it this late in the day, anyone have any idea why this won`t
work?
> >
> > $URL="domain.com";
> >
> > header ("Location: Http://www.$URL/members/index.php");
> >
> > $URL changes so I can`t write it directly into the header line, anyone?
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Remember my username & password

2001-03-19 Thread Pierre-Yves Lemaire

The answer, like yahoo, is to also store the username and password in
a database. When the cookie is not set or the option not checked, you will
use a database to validate the username and password.
You will build a session only if the username and password are matched
in the database.
py

- Original Message -
From: Batis <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 19, 2001 7:08 PM
Subject: [PHP] Remember my username & password


>
> Hello everyone,
>
> I want to build an authentication system like when entering Yahoo!. I.e.
> each user can sign-up for a username, which has a password. When he enters
> the site, there's a login box:
>
> Username: [textbox]
> Password: [password textbox]
> [checkbox] Remember my username & password
>
> If he checks the checkbox, then when he next visits the site (let's say
the
> next day), he will be automaticly entered, as the login info will be
stored
> in a cookie.
>
> What if the checkbox is unchecked? How can I store the login info
> temporarily and when he closes the browser (like in an HTTP
authentication)
> the info would be gone?
>
> Is the PHP 4 session management the solution to my problem?
>
> .
> .. Dimitris Batis ... [EMAIL PROTECTED] ..
> .. http://www.ravencrypt.com 
> .. ICQ: 18204204  Yahoo! ID: deggial_wrath ..
> .
>
> "The road to truth is long, and lined the entire way with annoying
bastards."
> -- Alexander Jablokov, The place of no shadows
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Login System with access levels

2001-03-16 Thread Pierre-Yves Lemaire


One solution:
You set up a separate table:
user_level { level_id (unsigned int), level_description (varchar 100 )}

it looks like this:
level_idlevel_description
100 admin
200user

In your user table you add level_id as a field.
After a good validation of the user (username and password), you grab the
level_id
and make a session variable out of it.

Than in you page you decide what you show or not to the user based upon the
level_id

if( $level_id <= 100 ){
show link for admin
}
if( $level_id >= 101 && $level_id <= 200 ){
show link for user
}

Having another table and separating the id by a hundred number lets you add
more security level as the site grows.

This is one solution, I am shure there is many more and I would
like to see what other people do as well...

py





- Original Message -
From: Jordan Elver <[EMAIL PROTECTED]>
To: PHP General Mailing List <[EMAIL PROTECTED]>; PHP DB Mailing
List <[EMAIL PROTECTED]>
Sent: Friday, March 16, 2001 7:28 PM
Subject: [PHP] Login System with access levels


> Hi,
> I've got a db with a username and password in it. I can let people log in,
> like SELECT * FROM table WHERE username = username AND password =
password.
>
> But how can I add an access level column so that I can have different
levels
> of security. So admin's can read everything, but users can only read
certain
> sections.
>
> How could I add to my db and structure a query?
>
> Any ideas would be good,
>
> Cheers,
>
> Jord
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Benchmarks

2001-03-16 Thread Pierre-Yves Lemaire

Third one would be http://apc.communityconnect.com/  ??

py

- Original Message -
From: Chris Adams <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 16, 2001 3:37 PM
Subject: Re: [PHP] Benchmarks


> On 16 Mar 2001 04:39:06 -0800, Phil Driscoll <[EMAIL PROTECTED]>
wrote:
>
>http://www.perlmonth.com/features/benchmarks/benchmarks.html?issue=4&id=935
1
> >4159
> >
> >A performance comparison of various web scripting languages. PHP does
rather
> >well!
>
> It's also important to note that their comment that PHP doesn't cache
compiled
> scripts and thus may not scale as well isn't completely true. The default
> install doesn't, but you can use one of several products (Zend Cache,
> Afterburner and a third whose name escapes me) to ensure that your scripts
are
> cached.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 3 situations - PHP Power or... servlet(JSP) power ?

2001-03-15 Thread Pierre-Yves Lemaire

You know I personnaly speak 3 language, French, English and Spanish.
If you ask me to write a 3 page document, I would do it in french because
I am more comfortable with it. I believe you should base your solutions on
the language you and your team is comfortable with. You will end up with
better code, code that is easier to modify and code that is probably faster
no matter what technology you use.

Pierre-Yves

- Original Message -
From: Marian Vasile <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 15, 2001 5:59 PM
Subject: [PHP] 3 situations - PHP Power or... servlet(JSP) power ?


> I have 3 situations and I need an answer about what is faster...
>
> 1. A PHP script that it's executed 10 times in a second, and have to
update
> a a MySQL table.
> 1. A PERL script that it's executed 10 times in a second, and have to
update
> a a MySQL table.
> 1. An servlet(JSP) script that it's executed 10 times in a second, and
have
> to update a MySQL table.
>
> Marian Vasile
> IT Manager
> Schnecker van Wyk & Pearson
> www.investments.ro
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Print MySQL DB as Exel File?

2001-03-14 Thread Pierre-Yves Lemaire

Hello,

The header will make netscape offer you a download of the file, and
IE will open it in a excell format.

For the display, just put your result in a nice html table and excell will
convert
it, it's quite simple.

print "";
print "Event";
... print all your header here

while ($row = mysql_fetch_array($result)) {
print "\n";
print "". $row['Event'] ."\n";
and so on...

}


hope it help,
py

- Original Message -
From: Jason Murray <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; PHP <[EMAIL PROTECTED]>
Sent: Thursday, March 15, 2001 2:28 AM
Subject: RE: [PHP] Print MySQL DB as Exel File?


> > Could anyone help me out with how to print the entire contents of a
> > database as an Excel file? I'm familiar with the header:
> >
> > header("Content-Type: application/vnd.ms-excel");
> >
> > just not sure how to go about it beyond that. I have this code and
> > am not sure what do do after it. Thanks.
>
> Excel spreadsheets are in a proprietary format as far as I know.
>
> However, if you output the database one line = one row, and tab delimit
> the lines, Excel will notice you're importing a text file and give you
> some appropriate options (select delimiter, etc).
>
> I'd go for tab delimiting over comma delimiting, since your text fields
> will probably contain commas but will *very* *exceedingly* rarely have
> tabs.
>
> I've ripped some code out of phpMyAdmin to do this (ta Tobias, if you're
> watching ;)) - I can post it if you want to.
>
> Jason
>
> --
> Jason Murray
> [EMAIL PROTECTED]
> Web Design Team, Melbourne IT
> Fetch the comfy chair!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] header type for flash

2001-03-14 Thread Pierre-Yves Lemaire

Hello,

I am sending flash code stored in a database to the browser depending
on action taken by the user. It works fine on just about any platform and
browser except on Mac with IE 4.01 and IE 4.05.

Is there a specific type of header we need to send to the client when
we are sending a flash movie ?

py  

__
Pierre-Yves Lemaire
514.729.8100



Re: [PHP] Getting path of script

2001-03-13 Thread Pierre-Yves Lemaire

check out,
dirname() // Returns directory name component of path

py

- Original Message -
From: Hardy Merrill <[EMAIL PROTECTED]>
To: Jordan Elver <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, March 13, 2001 5:21 PM
Subject: Re: [PHP] Getting path of script


> How 'bout using a Perl regex with $HTTP_SERVER_VARS["SCRIPT_NAME"]
> like this:
>
>echo "Starting with SCRIPT_NAME=[" . $HTTP_SERVER_VARS["SCRIPT_NAME"] .
"]";
>if (preg_match("/(\S+)\/\S+$/", $HTTP_SERVER_VARS["SCRIPT_NAME"],
$matches)) {
>   echo "Found $matches[1]";
>}
>
> HTH.
>
> --
> Hardy Merrill
> Mission Critical Linux, Inc.
> http://www.missioncriticallinux.com
>
> Jordan Elver [[EMAIL PROTECTED]] wrote:
> > Hi,
> > I want to get the path of a script. I know about
> > HTTP_SERVER_VARS["SCRIPT_FILENAME"] this returns someting like:
> >
> > /phpcode/misc/phpinfo.php
> >
> > But I want to strip off the file name and just have the directory path,
like:
> >
> > /phpcode/misc/
> >
> > Any ideas?
> >
> > Jord
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Need to download files in IE

2001-03-12 Thread Pierre-Yves Lemaire

Hello,

I do that with this piece of code. ( This will close the window, so open a
new one and put this code inside)

header("Content-disposition: attachment; filename=\"$fileName\"");
header("Content-type: application-download");
header("Pragma: no-cache");
header("Expires: 0");
$fn=fopen($FileName,"r");
fpassthru($fn);
fclose($fn);
exit;

py

- Original Message -
From: James R. Edgar <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 12, 2001 7:57 PM
Subject: [PHP] Need to download files in IE


> I am trying to set my script up so that when a person clicks on the link,
that
> the page will prompt for a download w/ the filename in the File Name field
in
> the Save As prompt.
> I can get this to work in Netscapse but when I try to do it with Internet
> Explorer I encounter problems. It either says there is no application to
read
> the file (I have acrobat reader on the computer.) or it displays the
prompt with
> either [variable's name passed to script].htm or download.php. And the
file I am
> trying to download is a PDF file. If anyone can help me with this I would
> greatly appreciate this, and thanks in advance.
>
> Regards,
> Edgar
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Flash call erase my session

2001-03-11 Thread Pierre-Yves Lemaire

Hello php people,

I have a page with 3 frames, each one start the php4 session handler.
When all page are loaded, all session variables are valid.
After I receive request from a flash movie that will update one of the frame, my 
session does not exist anymore, all variables are empty.

Any idea ?
__
Pierre-Yves Lemaire
514.729.8100



[PHP] Flash call erase my session

2001-03-11 Thread Pierre-Yves Lemaire

Hello php people,

I have a page with 3 frames, each one start the php4 session handler.
When all page are loaded, all session variables are valid.
After I receive request from a flash movie that will update one of the frame, my 
session does not exist anymore, all variables are empty.

Any idea ?
__
Pierre-Yves Lemaire
514.729.8100



[PHP] Variable dynamique

2001-03-11 Thread Pierre-Yves Lemaire

I receive 2 variables, $var and $num
I need to make a variable out of these two like this

$var2 where $num = 2 or
$var3 where $num = 3

How can I do that ?

__
Pierre-Yves Lemaire
514.729.8100



Re: [PHP] date

2001-03-11 Thread Pierre-Yves Lemaire

Hello,

This works when you have a separator of some sort, a space would work too.
The tricky part is that mktime works with mm dd yy format.

$start = "2001-01-01";
$end = "2001-03-12";

$start = explode( "-", $start );
$start = mktime( 0, 0, 0, $start[1], $start[2], $start[0] );

$end = explode( "-", $end );
$end = mktime( 0, 0, 0, $end[1], $end[2], $end[0] );
$diff =  ( $end - $start ) / ( 86400 );

echo $diff;

py

- Original Message - 
From: FredrikAT <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 11, 2001 6:31 PM
Subject: [PHP] date


> Hi!
> 
> I have 2 dates...
> $start = "20010101";
> $end = "20010312";
> 
> What is the easiest way of finding out how many days are between?
> 
> Thanx!
> 
> 
> -
> Fredrik A. Takle
> [EMAIL PROTECTED]
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Best way to pass SQL TEXT field via a link

2001-03-11 Thread Pierre-Yves Lemaire

Yes it would be a lot better to just passed the id in the url.

py

- Original Message - 
From: Fates <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 11, 2001 5:12 PM
Subject: [PHP] Best way to pass SQL TEXT field via a link


> I'm trying to update an existing record based on a link that represents
> the record to update.
> 
> I have a link and I am passing variables that were assigned from a SQL
> database to another php form page which will be used to update the
> record. I'm passing variable like so: href='addupdate.php?name=$name&category=$category&description=$etc.
> 
> This works fine for variables that contain values of only a few lines
> but what about passing a couple paragraphs stored in variable
> $description assigned via database value as TEXT.
> 
> Would it be better just to pass the database record ID to the
> destination page and then query the record in the destination form page
> and populate the form with the current values and update the record or
> is there another way I don't know about?
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] DB Abstraction

2001-03-11 Thread Pierre-Yves Lemaire

Hello,

For the most popular one, it is include in the phplib package:
http://phplib.netuse.de/download/index.php3

Or for just the mysql database class, I like this one:
MySQL_class at: http://phpclasses.upperdesign.com/ (login required)

py



- Original Message -
From: Jordan Elver <[EMAIL PROTECTED]>
To: PHP DB Mailing List <[EMAIL PROTECTED]>; PHP General Mailing List
<[EMAIL PROTECTED]>
Sent: Sunday, March 11, 2001 12:54 PM
Subject: [PHP] DB Abstraction


> Hi,
> I thought it was about time I started using a db abstraction class.
Problem
> is, there are so many out there that I don't which one to start using?
>
> I've heard of ADODB (I think).
>
> Anyone have any suggestions?
>
> Cheers,
>
> Jord
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HELP!!! Date time problems!!!!

2001-03-08 Thread Pierre-Yves Lemaire

Yes, there was a little bug, it was set to handle date in /mm/dd and
not dd/mm/yyy.

Now this works ok.
py

function diff_date( $sep, $startdate ){
 // Date of file in database
 $startdate = explode( $sep, $startdate );
 $startdate = mktime( 0, 0, 0, $startdate[1], $startdate[0],
$startdate[2] );
 // Now
 $enddate = mktime( 0, 0, 0, date("n"), date("d"), date("Y") );
 // get difference in days by dividing by 24*24*60
 return ( $enddate - $startdate ) / ( 86400 );
} // end function


echo diff_date("/", "05/03/2001" ) ;


- Original Message -
From: karakedi <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 08, 2001 11:01 PM
Subject: Re: [PHP] HELP!!! Date time problems


> figured out the logic,
> but still cant make it run
>
> i put this command :
>
> echo diff_date("/", "05/03/2001") ;
>
> to test the function. but it doest seem to work :(
> any help ?
>
> btw i believe it must be 24*60*60 inorder to 24*24*60 :)
>
> ""Pierre-Yves Lemaire"" <[EMAIL PROTECTED]> wrote in message
> 01c301c0a7e0$17f85f00$9ceee740@py">news:01c301c0a7e0$17f85f00$9ceee740@py...
> > Hello,
> > this is a function I use on my site, you can problably find
> > your answer,
> > py
> >
> > // =
> > // This function returns the difference between a dates
> > // and the current date.
> > // arg1: separator
> > // arg2: startdate  date dd mm 
> > // return number of days of differences
> > // ==
> > function diff_date( $sep, $startdate ){
> >  // Date of file in database
> >  $startdate = explode( "$sep", $startdate );
> >  $startdate = mktime( 0, 0, 0, $startdate[1], $startdate[2],
> > $startdate[0] );
> >  // Now
> >  $enddate = mktime( 0, 0, 0, date("n"), date("d"), date("Y") );
> >  // get difference in days by dividing by 24*24*60
> >  return ( $enddate - $startdate ) / ( 86400 );
> > } // end function
> >
> >
> > - Original Message -
> > From: Bruno Freire <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, March 08, 2001 7:05 PM
> > Subject: [PHP] HELP!!! Date time problems
> >
> >
> > > Hi, My name is Bruno, From Brazil.
> > >
> > > Yes...it's me again...hehehe
> > >
> > > Look...my problem is..
> > >
> > > I wanna make something like this:
> > >
> > > (10 november 2001) - (5 November 2001) = 5 days
> > >
> > > (10 november 2001) - (10 December 2001) = 30 days
> > >
> > > How can i do this
> > >
> > >
> > > Thanks for any help
> > >
> > > Your friend, Bruno From   !
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HELP!!! Date time problems!!!!

2001-03-08 Thread Pierre-Yves Lemaire

Hello,
this is a function I use on my site, you can problably find
your answer,
py

// =
// This function returns the difference between a dates
// and the current date.
// arg1: separator
// arg2: startdate  date dd mm 
// return number of days of differences
// ==
function diff_date( $sep, $startdate ){
 // Date of file in database
 $startdate = explode( "$sep", $startdate );
 $startdate = mktime( 0, 0, 0, $startdate[1], $startdate[2],
$startdate[0] );
 // Now
 $enddate = mktime( 0, 0, 0, date("n"), date("d"), date("Y") );
 // get difference in days by dividing by 24*24*60
 return ( $enddate - $startdate ) / ( 86400 );
} // end function


- Original Message -
From: Bruno Freire <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 08, 2001 7:05 PM
Subject: [PHP] HELP!!! Date time problems


> Hi, My name is Bruno, From Brazil.
>
> Yes...it's me again...hehehe
>
> Look...my problem is..
>
> I wanna make something like this:
>
> (10 november 2001) - (5 November 2001) = 5 days
>
> (10 november 2001) - (10 December 2001) = 30 days
>
> How can i do this
>
>
> Thanks for any help
>
> Your friend, Bruno From   !
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]