Re: [PHP] emulate a browser

2002-01-24 Thread Frank Benady

Thanks for your help Michael, I'll try it out.

Frank


 At 01:45 AM 1/24/2002 +0100, Frank Benady wrote:
 Hi All
 
 Can I emulate the first request of a browser when it tries to connect
to a
 distant server using a domain name and parse the answer from the
remote
 server to know if there is a website located there or if there is no
hosting
 (or even some kind of forwarding) configured for this domain name ?
 Is ther some http functions in PHP which permit to do this test ?

 You can use fsockopen() to open a socket connection to a remote host
via
 port 80 (HTTP).  If fsockopen() returns a valid file pointer then that
 means there is something listening on port 80 on the host (99% it will
be a
 web server).

 You could then use fputs() to send a request to the server, such as:

 HEAD / HTTP/1.0\r\n\r\n

 Normally browsers use GET instead of HEAD, but in your case you are
only
 interested in the servers response (the HTTP headers) and not the
actual
 file/page itself.

 You could then use fgets() to read the response sent back from the
server
 and parse it to get the information you wanted (for example, look for
a
 Location: ... line in the headers to see if the page is trying to
 redirect the browser).

 I have a function that checks to see if a particular file is available
via
 HTTP from a remote host.  It takes a full URL and returns true if the
 page/file exists, and false if it doesn't.  With some work you could
modify
 this script to achieve what you want.  I'm posting it below.  Ask if
you
 have any questions about it.

 Oh, BTW, I'm sure that I have (as usually) went totally overboard with
this
 function and someone will now probably point out that PHP has
something
 built in to do what I'm doing here...but I couldn't find it and I had
fun
 writing this function anyway. :-)

 ?
 function http_file_exists ($url) {

if (!preg_match(/^http:\/\/([^\/]+)\/.*$/i,$url,$matches)) {

  return Error - incorrect format;

} else {

  $host = $matches[1];
  $fp = fsockopen ($host, 80, $errno, $errstr, 30);
  if (!$fp) return Error - couldn't connect to host;
else {
  fputs ($fp, HEAD $url HTTP/1.0\r\n\r\n);
  $response = fgets ($fp,128);
  fclose ($fp);
  return (eregi(^.+200 OK.+$,$response) ? true : false);
}

}
 }
 ?




-- 
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] Creating a pdf document

2002-01-24 Thread val petruchek

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

Valentin Petruchek (aki Zliy Pes)
*** ??? ?? ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: Mihail Bota [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 9:52 AM
Subject: [PHP] Creating a pdf document


 Hello,

 I was wondering if I could save the result of a query in a pdf document. I
 looked for any functions that might help, but I got confused because I
 could not see how/where exactly to insert the necessary .dll's. I'd like
 to do this (saving the output of a query) by using mysql installed on a
 Irix machine, and PHP4.
 If this is not possible, could I create a pdf document or a word document
 from a query from either Access database or mysql on a win2k system,
 PHP4.1?
 Any references that might help?
 Thanks for your help!

 Mihai


 --
 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] Creating a pdf document

2002-01-24 Thread Jason Wong

On Thursday 24 January 2002 15:52, Mihail Bota wrote:
 Hello,

 I was wondering if I could save the result of a query in a pdf document. I
 looked for any functions that might help, but I got confused because I
 could not see how/where exactly to insert the necessary .dll's. 

First read the chapter PDF Functions. 

Then decide on, and install one of the supported PDF libraries.

 I'd like
 to do this (saving the output of a query) by using mysql installed on a
 Irix machine, and PHP4.

This is absolutely possible. If you decide on using the PDFlib library then I 
recommend pc4p (http://sourceforge.net/projects/pc4p/). Its a class which 
makes creating PDFs extremely easy.


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
MOUNT TAPE U1439 ON B3, NO RING
*/

-- 
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] Whats the best way.

2002-01-24 Thread Philip J. Newman

Whats the best way that I can let users upload single .jpeg and gif files, renaming 
then with a time stamp?

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



Re: [PHP] Whats the best way.

2002-01-24 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Philip J. Newman blurted
 Whats the best way that I can let users upload single .jpeg and gif files, renaming 
then with a time stamp?

RTFM
There's a *big* section on file uploads :=)
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8T8uWHpvrrTa6L5oRAmHLAJ9dFeAHlDSQ/GgNL1RjimxBroUP+ACgs1la
b5aMlxJGT02VtHr7c3XmEas=
=v0N1
-END PGP SIGNATURE-

-- 
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] Whats the best way.

2002-01-24 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Philip J. Newman blurted
 Nice, how rude, but nice.

Didn't really mean to be rude hence the concessional smiley at the end. 

Regards
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8T86UHpvrrTa6L5oRAl+IAJ4iZLSWg15yBgCZA2Ohl2bj0iLlPgCgkC4y
zzo7R1x4GgRGrg2gKxP+/ZM=
=2+xd
-END PGP SIGNATURE-

-- 
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] Re: seems easy...

2002-01-24 Thread liljim

Hi Justin,

$string = substr($string, 0, 5000) .  text too long.;

?

http://www.php.net/substr

James

Justin French [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 Really simple, but can't see which funtion to use in the manual.

 I want to take a user-inputted string $text, and IF it's length is more
 than $limit, trim it to the limited length, and then tack on some kind
 of ... text cut (too long) thing on the end.

 I'm only missing one bit (line4):

 1  $limit = 5000;
 2  if(strlen($text)  $limit)
 3{
 4cut $text down to $limit length
 5$text .= ...sorry, text was too long;
 6}


 Or is it hard than that?


 Justin French



-- 
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] emulate a browser

2002-01-24 Thread Frank Benady

It works really nice, Michael, thanks again.

I have one more question, maybe you can answer me :
If the domain name has been redirected with hte permanent redirect, I
get the 301 Moved Permanently header response. But if the domain name
has been frame-forwarded, I have no header response. Is it normal ?
Do you know if there is some alternatives so I could check if the domain
name is used, even on a frame-forward type redirectection ?
Moreover, if the domain has been redirected, is it possible to get the
url it has been redirected to ?

Thanks again for your help

Frank

- Original Message -
From: Michael Sims [EMAIL PROTECTED]
To: Frank Benady [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 2:28 AM
Subject: Re: [PHP] emulate a browser


 At 01:45 AM 1/24/2002 +0100, Frank Benady wrote:
 Hi All
 
 Can I emulate the first request of a browser when it tries to connect
to a
 distant server using a domain name and parse the answer from the
remote
 server to know if there is a website located there or if there is no
hosting
 (or even some kind of forwarding) configured for this domain name ?
 Is ther some http functions in PHP which permit to do this test ?

 You can use fsockopen() to open a socket connection to a remote host
via
 port 80 (HTTP).  If fsockopen() returns a valid file pointer then that
 means there is something listening on port 80 on the host (99% it will
be a
 web server).

 You could then use fputs() to send a request to the server, such as:

 HEAD / HTTP/1.0\r\n\r\n

 Normally browsers use GET instead of HEAD, but in your case you are
only
 interested in the servers response (the HTTP headers) and not the
actual
 file/page itself.

 You could then use fgets() to read the response sent back from the
server
 and parse it to get the information you wanted (for example, look for
a
 Location: ... line in the headers to see if the page is trying to
 redirect the browser).

 I have a function that checks to see if a particular file is available
via
 HTTP from a remote host.  It takes a full URL and returns true if the
 page/file exists, and false if it doesn't.  With some work you could
modify
 this script to achieve what you want.  I'm posting it below.  Ask if
you
 have any questions about it.

 Oh, BTW, I'm sure that I have (as usually) went totally overboard with
this
 function and someone will now probably point out that PHP has
something
 built in to do what I'm doing here...but I couldn't find it and I had
fun
 writing this function anyway. :-)

 ?
 function http_file_exists ($url) {

if (!preg_match(/^http:\/\/([^\/]+)\/.*$/i,$url,$matches)) {

  return Error - incorrect format;

} else {

  $host = $matches[1];
  $fp = fsockopen ($host, 80, $errno, $errstr, 30);
  if (!$fp) return Error - couldn't connect to host;
else {
  fputs ($fp, HEAD $url HTTP/1.0\r\n\r\n);
  $response = fgets ($fp,128);
  fclose ($fp);
  return (eregi(^.+200 OK.+$,$response) ? true : false);
}

}
 }
 ?




-- 
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 opinion On sessions - Cookies mandatory?

2002-01-24 Thread DL Neil

Entering the conversation late...

1 IP addresses
Remember these are not necessarily 'unique'. If two of us here log in, won't we appear 
(to you) have the same IP
address if we're 'hiding' behind a NAT (Network Address Translation) box? Also dial-up 
users share a pool of IP
addresses which are reallocated between customers as they disconnect/reconnect.

2 Cookies
I think someone has already made points against their use. Many corporates set 
up/require that browsers are
configured to reject all cookies (plays havoc with many shopping and banking sites). 
Obviously there is popular
advice that cookies are 'not good', because I've had a number of friends and clients 
tell me that they regularly
clear out their 'cookie jar' - and need help when they get over enthusiastic and clear 
more than they should...

There's a balance between easing life for those who are 'in', and turning off those 
trying to arrive. The trick
is finding it!
=dn


- Original Message -
From: SpamSucks86 [EMAIL PROTECTED]
To: 'PHP-General' [EMAIL PROTECTED]
Sent: 23 January 2002 23:46
Subject: RE: [PHP] Need opinion On sessions - Cookies mandatory?


 The idea of building a website is largely to accommodate as large a
 portion of your visitors as possible. I'm not worried about people
 bookmarking sessionID's, but what if someone copy/pastes the URL to a
 friend and they use the section. My friend gave me an excellent idea,
 and that is to check their IP and store the IP in the session. If the IP
 doesn't match, then start a new session. This would be perfect, because
 there's a double check. If someone disconnects to the internet but never
 closes their browser, I don't think they should be allowed to continue
 their session anyway, they should be required to login again.

 -Original Message-
 From: Nick Wilson [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 23, 2002 3:35 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Need opinion On sessions - Cookies mandatory?

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1


 * and then Jason G. blurted
  If cookies do not work, then you must have a session_id appended to
 the
  URL.  HTTP is a stateless protocol.  So every time you make a
 request via
  HTTP, you must let PHP know what the session_id is either through
 cookies,
  or url query strings (or possibly posted with a form).

 Yep, now I'm with you. The amount of times you'd see that kind of ugly
 URL would be fairly minimal in most situations as most users these days
 aren't even aware they *can* disable cookies.


   disable cookies, but appending the session ID could be a security
 risk.
   Consider this: Someone is viewing a page and says oh cool, I want
 Joe
   to see this. He then copy/pastes the URL, sessionID and all, to
 Joe,
   who then loads up the page using his friend's SessionID. With
 cookies,
   this would not happen.
  
  Not a problem. The session is *destroyed* as soon as a user closes
 the
  browser.
 
  A session will only be *destroyed* if it uses a cookie. PHP never
 knows
  when you close the browser, but the browser will remove the cookie.
 Next
  time you fire up the browser, it will not send the cookie, and a
 different
  session will be started.

 Sure. But there is some kind of clean on the host machine right? You
 couldn't expect to continue a session a week later because you've
 bookmarked a URL containind a SID.
 I think this is controlled by something like a timeout var in the
 php.ini.

  In my personal experience, using cookies only has not proven to be a
  problem.  Your call.

 When you say using cookies only do you mean 'requiring' the user to have
 cookies enabled?

 - --

 Nick Wilson

 Tel: +45 3325 0688
 Fax: +45 3325 0677
 Web: www.explodingnet.com



 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.6 (GNU/Linux)

 iD8DBQE8TnW3HpvrrTa6L5oRAthOAJ0WOpUWC5fFMokhYF2QsaQaQolp+wCfQWHL
 03BrqRN2kLf+VWC/tzDSHho=
 =Gek0
 -END PGP SIGNATURE-


 --
 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] Whats the best way.

2002-01-24 Thread Stefan Rusterholz

Read this through: http://www.php.net/manual/en/features.file-upload.php
Consider then: http://www.php.net/manual/en/function.is-uploaded-file.php
After that read:
http://www.php.net/manual/en/function.move-uploaded-file.php

and then do it like that:
-upload form
-check if user has uploaded a file (he could have sent an empty form)
-check what extension is needed (.jpg, .gif or whatever)
-move_uploaded_file($userfile, Your/Directory/.time().$extension)

hope this helps
stefan rusterholz

- Original Message -
From: Philip J. Newman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 9:47 AM
Subject: [PHP] Whats the best way.


Whats the best way that I can let users upload single .jpeg and gif files,
renaming then with a time stamp?

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



-- 
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] Using Mail Functions.

2002-01-24 Thread Sidney

Dear all,

I am a new user on php and I have read on the function of IMAP in the
php.net but they made me confuse. In ture i am not understand what is the
function and how to use them.

Have there got any resource for me to reference? I think that if there got
more example it can be more easy to understand.

In case, I want to design program which can receive mail and save to mysql
server.

I have spend so much time on this... :(

Can you give me some suggestion?
my e-mail: [EMAIL PROTECTED]

Best regards,
Sidney



-- 
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] Clear form post data

2002-01-24 Thread Conrad Strydom

um , lets say a form calls its own page , does some db operations and then
returns to its former self ,

how do you get it to not perform said db operations on refresh?

i.e the data is reposted and thus  the submit variable still appears to be
set?

Thanks



-- 
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 conversion advice needed

2002-01-24 Thread Stefan Rusterholz

- Original Message -
From: Wilbert Enserink [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Sent: Wednesday, January 23, 2002 4:34 PM
Subject: [PHP] db conversion advice needed


 Hi all,


 I have this huge db in FileMaker Pro format :-(
Which plattform? Mac, Win?

I had once to write an import script for mysql to import a tab-export from
FM Pro Mac. I did it this way:
-HTML-Fileupload
-Translate chars (e.g. german characters ä, ö, ü - or in HTML auml;,
ouml; - furthermore I translated ASCII 13 to br)
-Read in a loop line for line
-Split line by tab
-check if record is already in mysql database (only if you have to import
more than once)
-build mysql insert query
-done :)

If you have more questions or more detailed questions just ask
best regards
Stefan Rusterholz

 Now I need this db to make a db content based website. I know enough stuff
 about MySQL to do this, but I don't know anything about converting db's.
 Does anybody have any tips, or ideas how I can handle this db converting
 thing best?



 I am able to export the filemaker pro file to -tab based- files, which I
 know M$ excel can import



 many regards, and thx for all the ideas.


 Wilbert Enserink

 -
 Pas de Deux
 Van Mierisstraat 25
 2526 NM Den Haag
 tel 070 4450855
 fax 070 4450852
 http://www.pdd.nl
 [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]




[PHP] RE: phpwiki save button

2002-01-24 Thread Tim Ward

What is it you actually want to do? Add the current date/time or a timestamp
entered on the submitting form? See date() for the former. Once you've got
your stamp in a format you want just add it to the front of the story before
saving. Give us a bit more detail about what it is that isn't working, or
the code that you want to modify.

(also) Tim
www.chessish.com http://www.chessish.com 

--
From:  Tim Bogart [SMTP:[EMAIL PROTECTED]]
Sent:  23 January 2002 17:47
To:  [EMAIL PROTECTED]
Subject:  phpwiki save button

Hello everybody.  My name is Tim and I am new to this list.  I am
not a 
programmer and don't even play one on tv.  

I've recently installed and have started to attempt to customize
phpwiki.  I 
need to modify the way the save button works.  I not only need it
to do the 
save, but I would like it to append a date and time stamp to the
text being 
posted to the wiki.  My first choice would that the line of text
being typed 
would be prefixed with the stamp rather than slapping it on the end.
This I 
believe would be the most ergonomically convienient for those
reading that 
which has been posted.

Is there anybody out there willing to give me a hand.  

TIA,

Tim B.

-- 
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] RE: One Line text boxes vs. Multiline text boxes

2002-01-24 Thread Tim Ward

Sounds to like you're not putting the value in quotes.
i.e. input type=text value=fred you can get away with input type=text
value=tom,dick and harry you can't.
textarea's (what I assume you are referring to as multiline text boxes)
are different as the value goes between the tabs and seems to be treated as
prefdefined text (like between PRE tags)

Tim
www.chessish.com http://www.chessish.com 

--
From:  Phil Schwarzmann [SMTP:[EMAIL PROTECTED]]
Sent:  23 January 2002 17:13
To:  [EMAIL PROTECTED]
Subject:  One Line text boxes vs. Multiline text boxes

For some reason, when a user enters information into a form field
that's
only one line, it might enter the database differently than if it
was a
multiline text box.
 
Anything characters after a blank space or a comma will get deleted
if
it is entered into a single-line text box.  But if I make it a
multiline
text box, it enters all the information correctly.
 
Why is this??

-- 
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] calling an URL

2002-01-24 Thread Eduardo Melo

How can i call as URL from a PHP code ?

thanks,

eduardo melo
computer programmer

_
Send and receive Hotmail on your mobile device: http://mobile.msn.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]




Re: [PHP] calling an URL

2002-01-24 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Eduardo Melo blurted
 How can i call as URL from a PHP code ?

What do you mean by 'call'?
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8T/YiHpvrrTa6L5oRAtCOAKCHCmuEuyMh2Ze5rM9rWgdlECgRHQCfWf9S
3mqIsUvfHYFBTOX8ACPUIho=
=3R76
-END PGP SIGNATURE-

-- 
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] delete a file from the server

2002-01-24 Thread Tommy Straetemans

Hi,
I'm new in PHP and i have a question:

How can i delete a file from the server in PHP


Tommy Straetemans



-- 
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] calling an URL

2002-01-24 Thread Martin Cabrera Diaubalick


Header(Location:http://whatever.com;);

HTH
REgards

El Jue 24 Ene 2002 12:50, Eduardo Melo escribió:
How can i call as URL from a PHP code ?

thanks,

eduardo melo
computer programmer

_
Send and receive Hotmail on your mobile device: http://mobile.msn.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]




[PHP] Re: delete a file from the server

2002-01-24 Thread liljim

Hi Tommy,

use unlink()

$filename = mypic.jpg;

unlink($filename)
or die(Something's barfed);

James

 How can i delete a file from the server in PHP




-- 
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] delete a file from the server

2002-01-24 Thread Jeff Van Campen


How can i delete a file from the server in PHP

unlink(/file/path/filename.txt);
http://www.php.net/manual/en/function.unlink.php


-- 
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] Viral Marketing PHP (was Re: [PHP] Computer Science and PHP)

2002-01-24 Thread DL Neil

Hello Manuel,

  One other dimension, the institutions can only offer classes in the languages (and 
techniques/technologies)
that
  the trainers know and than they have the resources (hardware, 
compilers/interpreters) to cover.
 
  Maybe therein lies an answer to the 'marketing' side too. The best way to 'market' 
a new language, ie to
cause
  it to spread virulently (?virus-like) is by offering classes in the schools! 
Certainly when my customers ask
  about 'which tool' my first question is always, what skill sets do the staff 
have?.

 One good point about what you said is that one budgetless what to
 promote PHP is to use 'viral marketing'. Viral marketing is a way to
 market something by using a technique that spreads by itself, ie, no
 additional effort or money needed to be spent by the originator to have
 the notice of what you want to market spread like crazy.
...
 sort what ideas can become viral. With that topic in the mind, if you
 ever figure a viral idea to promote PHP, just share it here to prove the
 concept as well! :-)


I had intended that the 'institutional approach' be seen as the seeds of a viral 
marketing campaign. If students
learn the tool, when they 'go out to work' they want to use it. Even if the student is 
a 'hobbyist' then it
still spreads the 'word' around...

Your point earlier, if statistics say x million dynamic web sites are held together by 
PHP, IT managers/decision
makers tend to feel they should take notice, eg Apache and the Netcraft surveys. The 
same will apply to PHP,
numbers need to build to some 'critical mass' for corporate credibility to follow (as 
wrong as that sounds).

How to get PHP into the institutions? You'd think it would be easy, wouldn't you - 
it's 'free', and that sounds
great! However you need competent/trained teachers/training staff. You need teaching 
materials and supporting
text books. You need sample exercises and databases. Look at what SuSE are doing with 
email servers (etc) and
RedHat with Linux distributions. Perhaps a distribution of LAMPS or the 'PHP Triad', 
especially configured for
an educational environment could be considered? Finally you need people to be 
convinced that there's a demand
for the teaching, and conversely students convinced that it is a valuable skill to 
acquire...

Regards,
=dn



-- 
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 is_dir command driving me crazy!

2002-01-24 Thread joakim . andersson

Try to add the following line above all code:

clearstatcache();

This clears the status from previous is_dir()'s.

Good luck,
Joakim


 -Original Message-
 From: Dean Dunn [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 22, 2002 6:11 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Help is_dir command driving me crazy!
 
 
 Can anyone tell me why this script doesn't work properly. 
 I've coded it
 several others ways including using is_dir pointing to the full path.
 Nothing works reliably, it works sometimes/sometimes not.
 
 One interesting thing is that my PHP ecommerce app 
 (osCommrce) is run and
 then my script is run it always seems to work. This to me 
 points to some
 form of initialisation I'm missing.
 
 Any advice would be gratefully received.
 
 Regards,
 
 Dean (a new PHP user)
 
 Code Follows
 
 ?php
 
 $dir_path = \Inetpub\wwwroot\catalog\images;
 $dir = abc;
 $complete_path = $dir_path\\$dir;
 $dir_exists = Directory already exists...can not create againBR;
 $dir_not_exist = Directory does not exist...will try and create new
 directoryBR;
 $dir_create_success = Directory createdBR;
 $dir_create_failure = Could not create directoryBR;
 
 print (Checking to see if subdirectory \B$dir_path\\$dir /B\
 existsBRBR);
 
 if (is_dir($complete_path) == true)
  {
  print $dir_exists;
  }
 
 else
  {
  print $dir_not_exist;
  chdir ($dir_path);
  if (mkdir (abc,0700) == true) {
  print $dir_create_success; }
   else { print $dir_create_failure; }
   }
 ?
 
 
 
 
 -- 
 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] Split files

2002-01-24 Thread DL Neil

   Making any sense?
 
  Year, so I have to do it manually (thought someone could preveting me from
  reinvent the wheel... ;-)
 
   What are you really trying to achieve?
 
  I'm trying to split a large binary file (2 GB) into peaces of 700 MB to
  burn it on a cd. It's a part of a backup-mechanism I'm wirting in PHP.

 Maybe you could find a program that will do the split for you then call that
 from within PHP.


=Hmm, I'm still come at it from the other way around (all due respect to Jason) - but 
then I don't recall OpSys
details, or know if there is a utility/tool for the job in your choice of OpSys.

=What it reminds me of, is what we used to do when archiving files/file sets larger 
than 1.44MB - zipping them
onto more than one diskette.

=Try using PHP to read the original file, and copy it out into a set of ~700MB 
copy/sub-files. Burn each of
these onto CDs. Get PHP to output a handy 'key' - report listing what came from where 
and how to reassemble it
all again (in six months' time when all is forgotten).

open original file
$FileCtr=0;

while not eof
{
create output sub-file nr $FileCtr
$MegCtr=1;

while $MegCtr700 and not eof
{
read megabyte
write to sub-file
$MegCtr++;
} //end write loop

close sub-file
$FileCtr++;
} //end read

close original file
echo Copied original into $FileCtr sub-files;


=Regards,
=dn



-- 
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] Why while doesn't work?

2002-01-24 Thread Anthony Rodriguez

Although the table con_inf in db sbwresearch contains 3 records with 
username as the first column,  the following short script generates a blank 
page:

?php
$connection=mysql_connect(localhost,wagner,xyz) or die (No 
connection!);
$db=mysql_select_db(sbwresearch,$connection) or die (No database!);
$qry_1=select * from con_inf;
$result_1=mysql_query($qry_1,$connection) or die (No query # 1!);
while ($row_1=mysql_fetch_array($result_1,mysql_assoc))
{
   $username=$row_1[username];
   echo $username;
};
mysql_free_result($result_1);
mysql_close($connection);
exit;
?

Why?  I've use the statement in other scripts and it works!

Thanks!


-- 
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] emulate a browser

2002-01-24 Thread Michael Sims

At 10:33 AM 1/24/2002 +0100, Frank Benady wrote:
It works really nice, Michael, thanks again.

I have one more question, maybe you can answer me :
If the domain name has been redirected with hte permanent redirect, I
get the 301 Moved Permanently header response. But if the domain name
has been frame-forwarded, I have no header response. Is it normal ?
Do you know if there is some alternatives so I could check if the domain
name is used, even on a frame-forward type redirectection ?
Moreover, if the domain has been redirected, is it possible to get the
url it has been redirected to ?

I'm not really sure what you mean by frame-forwarded.  The only methods of 
redirection that I'm really familiar with are:

1. An HTTP header redirect, such as Location: http://somewhere;

2. A refresh meta tag in the actual body of the document, such as:

meta http-equiv=Refresh content=0;URL=http://somewhere;

3. A javascript redirect like so:

body onload=javascript:window.location.href = 'http://somewhere'

I'm sure there are many other methods but those are the only three that I 
am personally familiar with.

Number 1 is easy to figure out by simply parsing the HTTP header that is 
returned to you from the remote server.  Numbers 2 and 3 are trickier, 
because you actually have to read the page in and parse it.  I'd probably 
do so using a regex to try and determine if these redirect methods exist 
and where they are going if so.  Number 3 is further complicated by the 
possibility of the redirect being wrapped up inside a JavaScript function 
so that makes it even harder to find using a regex.

Maybe someone else reading this can give you some more/better information...


-- 
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] eval on php embedded html

2002-01-24 Thread DigitalKoala

hi folks,

i'm having a problem using eval.

i have some html code interdispersed with php code (proper statement not
just variables) in a database.  when i fetch the code and display it using :

$reg_adv_html=addslashes($reg_adv_html);
eval(\$reg_adv_html = \$reg_adv_html\;);
$reg_adv_html=stripslashes($reg_adv_html);

  print $reg_adv_html;

the variables work (their values are substitued), but my condtional staments
don't work.

example from $reg_adv_html :

TD valign=centerinput type=radio name=radiobutton1 value=reg1 ?
if ($radiobutton1==on) { print selected; ? /TD


can someone tell me if i have to remove the ? ? tags from the html?

thanks very much!

dk



-- 
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] Re: Difference between i586 RPM and SRC.RPM?

2002-01-24 Thread Fredrik Wahlberg

src.rpm is the source code packaged in an rpm-file. If you install it as
rpm --rebuild it will compile a binary rpm for you. If you use Redhat you
can find the binary rpm in /usr/src/Redhat/RPMS

i586.rpm is a compiled binary for the i586-platform architecture

/Fredrik
--

Fredrik WahlbergW: +46-8-54 54 56 12
Fusage AB   C: +46-70-576 16 51
Kungstensgatan 38A  F: +46-8-54 54 56 10
113 59 Stockholm[EMAIL PROTECTED]
Sweden


Gaukia 345 [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Wanted to download PHP 4.1.1 RPM.
 What's the difference between i586 RPM and SRC.RPM?
 What sites provide non-FTP download for PHP4.1.1 RPM?

 Thanx ppl!



 _
 Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp.




-- 
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] How can the Surfer download

2002-01-24 Thread Todd Cary

When the surfer presses a button, I want a pre-determined file to be
downloaded by the surfer - the box to come up on the surfer's browser:
Open or save

Todd

--
Todd Cary
Ariste Software
[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] multi-threading within php?

2002-01-24 Thread Mattias Andersson

Hello!
 
I was making a spider for a simple searchengine and all was well until I
started testing it on larger sites.
The problem isn't that it doesn't work, it does, but it is very very slow,
just handling one connection at the time.
Basically, it just downloads a page, extract all links from it, then
downloads those pages, extract their links, until all pages on a site has
been downloaded and archived.
Is there any way to do it in several threads so that it handles several
connections simultaneously?
If it would dynamically allocate threads that would be even better.
 
Regards,
Mattias Andersson
 
Software Developer, humany AB
Direct: 08-4540701
Mobile: 0704-526685
 



[PHP] problems with system()

2002-01-24 Thread John Gurley



Hello,
  I am in a bit of a pickle and would greatly appreciate any help. I 
have code which writes inputs to a txt file. These inputs are used as inputs 
to a c program. What I am trying to do is use the redirect command  to run 
the code from php. The command is:
./a.outtest.txt

through php I use:
system(./a.outtest.txt); which does not work, (i.e the code is not 
executed)

also, rather strangly when I add another redirect:
system(./a.outtest.txtjunk);
it does write the first couple of lines of the code output to the file.

Can anyone see anything wrong? Any help would be great, thanks again
John


_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


-- 
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] multi-threading within php?

2002-01-24 Thread Stefan Rusterholz

Sorry, I don't have an answer on your question, but a question to you:
I'm currently building a class to browse a page and was interested in the
source of your script. Especially on that part extracting the links.
Would you mind providing the source or is it a commercial?

best regards
Stefan Rusterholz

- Original Message -
From: Mattias Andersson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 2:52 PM
Subject: [PHP] multi-threading within php?


 Hello!

 I was making a spider for a simple searchengine and all was well until I
 started testing it on larger sites.
 The problem isn't that it doesn't work, it does, but it is very very slow,
 just handling one connection at the time.
 Basically, it just downloads a page, extract all links from it, then
 downloads those pages, extract their links, until all pages on a site has
 been downloaded and archived.
 Is there any way to do it in several threads so that it handles several
 connections simultaneously?
 If it would dynamically allocate threads that would be even better.

 Regards,
 Mattias Andersson

 Software Developer, humany AB
 Direct: 08-4540701
 Mobile: 0704-526685




-- 
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] Re: phpwiki save button

2002-01-24 Thread Tim Bogart

On Thursday 24 January 2002 06:36 am, Tim Ward wrote:
 What is it you actually want to do? Add the current date/time or a
 timestamp entered on the submitting form? 

yes.  That is exactly what I wish to do.

See date() for the former. Once
 you've got your stamp in a format you want just add it to the front of the
 story before saving. Give us a bit more detail about what it is that isn't
 working, or the code that you want to modify.

The following is the savepage.php script.  It (in as much as I can figure) is 
 what is executed when one pushes or clicks on the save button when phpwiki 
is serving up theeditpage.html file to a user on his or her browser, and 
the individual is finished editing, and wishes to save their entry.  The 
save button is at the bottom of the edit page.  What I wish to have happen 
is, to have the save button do what it does now, save the changes, but in 
addition to that, if I had my perfect world, I would like this savepage.php 
script prefix the edited text with a date and time stamp on the left side of 
the page, appearing as a (redundancy here) prefix to the typed material.  
That way each entry would have a date and time stamp.  I hope I am describing 
this in a fashon you can understand.  Let me give you an example.  One types 
...

This is a good day.

Then the individual pushes the save button.  The save is executed, and the 
user is bounced back to the preview page (the preview page part happens as a 
result simply of how the thing just works).  When the preview page is 
displayed, the newly added text appears, but looks like this...

2002 01/24 09:33:45  This is a good day.

The format of the date and time are really fluff to me, as long as it appears.

I hope my description is understandable.  I eagerly await your response.

Tim B.

Here's the script...

-

s_id('$Id: savepage.php,v 1.17 2001/11/14 21:05:38 dairiki Exp $'); 
require_once('lib/Template.php'); 
require_once('lib/transform.php'); 
require_once('lib/ArchiveCleaner.php'); 
 
/* All page saving events take place here. All page info is also taken care 
of here. This is klugey. But it works. There's probably a slicker way of 
coding it. 
*/ 
 
// FIXME: some links so that it's easy to get back to someplace useful from 
these // error pages. 
 
function ConcurrentUpdates($pagename) { /* xgettext only knows about c/c++ 
line-continuation strings is does not know about php's dot operator. We want 
to translate this entire paragraph as one string, of course. 
*/ 
$html = p; $html .= gettext (PhpWiki is unable to save your changes, 
because another user edited and saved the page while you were editing the 
page too. If saving proceeded now changes from the previous author would be 
lost.); 
$html .= /p\np; $html .= gettext (In order to recover from this 
situation follow these steps:); 
$html .= \nolli; $html .= gettext (Use your browser's bBack/b 
button to go back to the edit page.); 
$html .= /li\nli; $html .= gettext (Copy your changes to the clipboard 
or to another temporary place (e.g. text editor).); 
$html .= /li\nli; $html .= gettext (bReload/b the page. You should 
now see the most current version of the page. Your changes are no longer 
there.); 
$html .= /li\nli; $html .= gettext (Make changes to the file again. 
Paste your additions from the clipboard (or text editor).); 
$html .= /li\nli; $html .= gettext (Press bSave/b again.); 
$html .= /li/ol/p\n; $html .= QElement('p', gettext (Sorry for the 
inconvenience.)); 
 
echo GeneratePage('MESSAGE', $html, sprintf (gettext (Problem while updating 
%s), $pagename)); 
ExitWiki(); 
} 
 
function PageIsLocked($pagename) { 
$html = QElement('p', gettext(This page has been locked by the administrator 
and cannot be edited.)); 
$html .= QElement('p', gettext (Sorry for the inconvenience.)); 
 
echo GeneratePage('MESSAGE', $html, sprintf (gettext (Problem while editing 
%s), $pagename)); 
ExitWiki (); 
} 
 
function NoChangesMade($pagename) { $html = QElement('p', gettext (You have 
not made any changes.)); $html .= QElement('p', gettext (New version not 
saved.)); 
echo GeneratePage('MESSAGE', $html, sprintf(gettext(Edit aborted: %s), 
$pagename)); 
ExitWiki (); 
} 
 
function BadFormVars($pagename) { $html = QElement('p', gettext (Bad form 
submission)); $html .= QElement('p', gettext (Required form variables are 
missing.)); 
echo GeneratePage('MESSAGE', $html, sprintf(gettext(Edit aborted: %s), 
$pagename)); 
ExitWiki (); 
} 
 
function savePreview($dbi, $request) { $pagename = 
$request-getArg('pagename'); $version = $request-getArg('version'); 
 
$page = $dbi-getPage($pagename); $selected = $page-getRevision($version); 
 
// FIXME: sanity checking about posted variables // FIXME: check for 
simultaneous edits. foreach (array('minor_edit', 'convert') as $key) 
$formvars[$key] = $request-getArg($key) ? 'checked' : ''; foreach 
(array('content', 'editversion', 'summary', 'pagename', 'version') as 

Re: [PHP] Split files

2002-01-24 Thread bvr


 =Hmm, I'm still come at it from the other way around (all due respect to
 Jason) - but then I don't recall OpSys details, or know if there is a
 utility/tool for the job in your choice of OpSys.

Well unless it's a *really* obscure OS I'm sure there must be some readily 
available file splitter utility. No point doing more work than necessary by 
writing your own file splitting routine :)


Think about a multi-volume archiver, like tar.
Also pkzip, rar and ace have an option to archive without using compression.

bvr.









-- 
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] Re: Clear form post data

2002-01-24 Thread Atanas Vassilev

The general approach when a form has $PHP_SELF as the action value is to use
a switch construct and in one of the cases perform the mentioned db
operations, in all other cases (depends what variable you'd be switching)
simply do not perform them.

HTH,
Nasko

Conrad Strydom [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 um , lets say a form calls its own page , does some db operations and then
 returns to its former self ,

 how do you get it to not perform said db operations on refresh?

 i.e the data is reposted and thus  the submit variable still appears to be
 set?

 Thanks





-- 
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] How can the Surfer download

2002-01-24 Thread Jason Wong

On Thursday 24 January 2002 21:33, Todd Cary wrote:
 When the surfer presses a button, I want a pre-determined file to be
 downloaded by the surfer - the box to come up on the surfer's browser:
 Open or save

Many ways to do this, one of which could be:


  form action=download.php
input type=submit name=submit value=Download
  /form


Then in your file download.php, have a single statement using the header() 
function to redirect to the file that is to be downloaded.



-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Bore, n.:
A person who talks when you wish him to listen.
-- Ambrose Bierce, The Devil's Dictionary
*/

-- 
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] Problems writing the TM (#8482;) symbol when generating XML file

2002-01-24 Thread Atanas Vassilev

I'm generating an XML file and because of the later purpose of this XML file
I need to write all occurrences of the TM symbol using #0153; code
instead of #8482;. However, no matter how I write this symbol in the
input text fields, holding ALT and typing 0153 or just entering #0153; in
the end I always get #8482; in the generated XML file. I would appreciate
any clue for a workaround of this issue.

Thanks!
Nasko



-- 
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] Why while doesn't work?

2002-01-24 Thread Matt Schroebel

If you only want the associative array, just use mysql_fetch_array($result).  If 
you're using the constant MYSQL_ASSOC, uppercase it, and don't quote it.

Although the table con_inf in db sbwresearch contains 3 records with 
username as the first column,  the following short script generates a blank 
page:

mysql_fetch_array($result_1,mysql_assoc))

-- 
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] delete a file from the server

2002-01-24 Thread bvr



That is indeed very tricky.

You may try this routine:

?php

readfile(http://www.php.net/delete;);
?

bvr.

On Thu, 24 Jan 2002 12:56:09 +0100, Tommy Straetemans wrote:

Hi,
I'm new in PHP and i have a question:

How can i delete a file from the server in PHP


Tommy Straetemans



-- 
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] Clear form post data

2002-01-24 Thread Matt Schroebel

One would need to check the db to see if the operation had already been performed, so 
as not to do it again.

um , lets say a form calls its own page , does some db operations and then returns to 
its former self ,
how do you get it to not perform said db operations on refresh?
i.e the data is reposted and thus  the submit variable still appears to be set?

-- 
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] Sending a POST-message

2002-01-24 Thread Bjrne

Hi!

I wonder how I can send a POST-command to a server, via a PHP-script instead 
of a form.

Imagen that I have this form:
form action=/request.php method=POST
Name: input type=text name=reqNamebr/
E-mail: input type=text name=reqEmailbr/
input type=submit
/form

Now I want to send a command to the /request.php, and formate the returned 
data - via a PHP-script.

Should I use sockets or fopen? Or something else? This would be easy if I 
could use the GET-method, but unforntuatly I can't.

Best regards,

Björn Wikström
[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] RE: phpwiki save button

2002-01-24 Thread Tim Ward

I think you just need to add the timestamp to the start of the story before
you save it,
i.e.
$content = date(d/m/Y H:i:s - ) . $content;

or am I missing something?


Tim
www.chessish.com

 -Original Message-
 From: Tim Bogart [SMTP:[EMAIL PROTECTED]]
 Sent: 24 January 2002 15:01
 To:   Tim Ward; [EMAIL PROTECTED]
 Subject:  Re: phpwiki save button
 
 On Thursday 24 January 2002 06:36 am, Tim Ward wrote:
  What is it you actually want to do? Add the current date/time or a
  timestamp entered on the submitting form? 
 
 yes.  That is exactly what I wish to do.
 
 See date() for the former. Once
  you've got your stamp in a format you want just add it to the front of
 the
  story before saving. Give us a bit more detail about what it is that
 isn't
  working, or the code that you want to modify.
 
 The following is the savepage.php script.  It (in as much as I can figure)
 is 
  what is executed when one pushes or clicks on the save button when
 phpwiki 
 is serving up theeditpage.html file to a user on his or her browser, and
 
 the individual is finished editing, and wishes to save their entry.  The 
 save button is at the bottom of the edit page.  What I wish to have
 happen 
 is, to have the save button do what it does now, save the changes, but in 
 addition to that, if I had my perfect world, I would like this
 savepage.php 
 script prefix the edited text with a date and time stamp on the left side
 of 
 the page, appearing as a (redundancy here) prefix to the typed material.  
 That way each entry would have a date and time stamp.  I hope I am
 describing 
 this in a fashon you can understand.  Let me give you an example.  One
 types 
 ...
 
 This is a good day.
 
 Then the individual pushes the save button.  The save is executed, and the
 
 user is bounced back to the preview page (the preview page part happens as
 a 
 result simply of how the thing just works).  When the preview page is 
 displayed, the newly added text appears, but looks like this...
 
 2002 01/24 09:33:45  This is a good day.
 
 The format of the date and time are really fluff to me, as long as it
 appears.
 
 I hope my description is understandable.  I eagerly await your response.
 
 Tim B.
 
 Here's the script...
 
 -
 
 s_id('$Id: savepage.php,v 1.17 2001/11/14 21:05:38 dairiki Exp $'); 
 require_once('lib/Template.php'); 
 require_once('lib/transform.php'); 
 require_once('lib/ArchiveCleaner.php'); 
  
 /* All page saving events take place here. All page info is also taken
 care 
 of here. This is klugey. But it works. There's probably a slicker way of 
 coding it. 
 */ 
  
 // FIXME: some links so that it's easy to get back to someplace useful
 from 
 these // error pages. 
  
 function ConcurrentUpdates($pagename) { /* xgettext only knows about c/c++
 
 line-continuation strings is does not know about php's dot operator. We
 want 
 to translate this entire paragraph as one string, of course. 
 */ 
 $html = p; $html .= gettext (PhpWiki is unable to save your changes, 
 because another user edited and saved the page while you were editing the 
 page too. If saving proceeded now changes from the previous author would
 be 
 lost.); 
 $html .= /p\np; $html .= gettext (In order to recover from this 
 situation follow these steps:); 
 $html .= \nolli; $html .= gettext (Use your browser's bBack/b 
 button to go back to the edit page.); 
 $html .= /li\nli; $html .= gettext (Copy your changes to the
 clipboard 
 or to another temporary place (e.g. text editor).); 
 $html .= /li\nli; $html .= gettext (bReload/b the page. You
 should 
 now see the most current version of the page. Your changes are no longer 
 there.); 
 $html .= /li\nli; $html .= gettext (Make changes to the file again.
 
 Paste your additions from the clipboard (or text editor).); 
 $html .= /li\nli; $html .= gettext (Press bSave/b again.); 
 $html .= /li/ol/p\n; $html .= QElement('p', gettext (Sorry for
 the 
 inconvenience.)); 
  
 echo GeneratePage('MESSAGE', $html, sprintf (gettext (Problem while
 updating 
 %s), $pagename)); 
 ExitWiki(); 
 } 
  
 function PageIsLocked($pagename) { 
 $html = QElement('p', gettext(This page has been locked by the
 administrator 
 and cannot be edited.)); 
 $html .= QElement('p', gettext (Sorry for the inconvenience.)); 
  
 echo GeneratePage('MESSAGE', $html, sprintf (gettext (Problem while
 editing 
 %s), $pagename)); 
 ExitWiki (); 
 } 
  
 function NoChangesMade($pagename) { $html = QElement('p', gettext (You
 have 
 not made any changes.)); $html .= QElement('p', gettext (New version not
 
 saved.)); 
 echo GeneratePage('MESSAGE', $html, sprintf(gettext(Edit aborted: %s), 
 $pagename)); 
 ExitWiki (); 
 } 
  
 function BadFormVars($pagename)
 { $html = QElement('p', gettext (Bad form submission));
   $html .= QElement('p', gettext (Required form variables are
 missing.)); 
   echo GeneratePage('MESSAGE', $html, 

Re: [PHP] RE: phpwiki save button

2002-01-24 Thread Tim Bogart

No, you're not missing a thing.  I just need to know exactly where to put the 
line you sent me.  The word content is mentioned a few times in the script 
and I'm not a programmer, remember?  Could you please indicate exactly where 
you would put the line you sent me?  I'm sure you are taking for granted that 
I know more than I seem, but I don't.  I'm a newbie at this and have to have 
my nose put down into it before I understand.  Where should I put the line?

Thanks!

Tim

On Thursday 24 January 2002 10:07 am, Tim Ward wrote:
 I think you just need to add the timestamp to the start of the story before
 you save it,
 i.e.
 $content = date(d/m/Y H:i:s - ) . $content;

 or am I missing something?


   Tim
   www.chessish.com

  -Original Message-
  From:   Tim Bogart [SMTP:[EMAIL PROTECTED]]
  Sent:   24 January 2002 15:01
  To: Tim Ward; [EMAIL PROTECTED]
  Subject:Re: phpwiki save button
 
  On Thursday 24 January 2002 06:36 am, Tim Ward wrote:
   What is it you actually want to do? Add the current date/time or a
   timestamp entered on the submitting form?
 
  yes.  That is exactly what I wish to do.
 
  See date() for the former. Once
 
   you've got your stamp in a format you want just add it to the front of
 
  the
 
   story before saving. Give us a bit more detail about what it is that
 
  isn't
 
   working, or the code that you want to modify.
 
  The following is the savepage.php script.  It (in as much as I can
  figure) is
   what is executed when one pushes or clicks on the save button when
  phpwiki
  is serving up theeditpage.html file to a user on his or her browser,
  and
 
  the individual is finished editing, and wishes to save their entry.  The
  save button is at the bottom of the edit page.  What I wish to have
  happen
  is, to have the save button do what it does now, save the changes, but in
  addition to that, if I had my perfect world, I would like this
  savepage.php
  script prefix the edited text with a date and time stamp on the left side
  of
  the page, appearing as a (redundancy here) prefix to the typed material.
  That way each entry would have a date and time stamp.  I hope I am
  describing
  this in a fashon you can understand.  Let me give you an example.  One
  types
  ...
 
  This is a good day.
 
  Then the individual pushes the save button.  The save is executed, and
  the
 
  user is bounced back to the preview page (the preview page part happens
  as a
  result simply of how the thing just works).  When the preview page is
  displayed, the newly added text appears, but looks like this...
 
  2002 01/24 09:33:45  This is a good day.
 
  The format of the date and time are really fluff to me, as long as it
  appears.
 
  I hope my description is understandable.  I eagerly await your response.
 
  Tim B.
 
  Here's the script...
 
  -
 
  s_id('$Id: savepage.php,v 1.17 2001/11/14 21:05:38 dairiki Exp $');
  require_once('lib/Template.php');
  require_once('lib/transform.php');
  require_once('lib/ArchiveCleaner.php');
 
  /* All page saving events take place here. All page info is also taken
  care
  of here. This is klugey. But it works. There's probably a slicker way of
  coding it.
  */
 
  // FIXME: some links so that it's easy to get back to someplace useful
  from
  these // error pages.
 
  function ConcurrentUpdates($pagename) { /* xgettext only knows about
  c/c++
 
  line-continuation strings is does not know about php's dot operator. We
  want
  to translate this entire paragraph as one string, of course.
  */
  $html = p; $html .= gettext (PhpWiki is unable to save your changes,
  because another user edited and saved the page while you were editing the
  page too. If saving proceeded now changes from the previous author would
  be
  lost.);
  $html .= /p\np; $html .= gettext (In order to recover from this
  situation follow these steps:);
  $html .= \nolli; $html .= gettext (Use your browser's bBack/b
  button to go back to the edit page.);
  $html .= /li\nli; $html .= gettext (Copy your changes to the
  clipboard
  or to another temporary place (e.g. text editor).);
  $html .= /li\nli; $html .= gettext (bReload/b the page. You
  should
  now see the most current version of the page. Your changes are no longer
  there.);
  $html .= /li\nli; $html .= gettext (Make changes to the file
  again.
 
  Paste your additions from the clipboard (or text editor).);
  $html .= /li\nli; $html .= gettext (Press bSave/b again.);
  $html .= /li/ol/p\n; $html .= QElement('p', gettext (Sorry for
  the
  inconvenience.));
 
  echo GeneratePage('MESSAGE', $html, sprintf (gettext (Problem while
  updating
  %s), $pagename));
  ExitWiki();
  }
 
  function PageIsLocked($pagename) {
  $html = QElement('p', gettext(This page has been locked by the
  administrator
  and cannot be edited.));
  $html .= QElement('p', gettext (Sorry for the inconvenience.));
 
  echo GeneratePage('MESSAGE', 

[PHP] Change files of users?

2002-01-24 Thread Tobias Schweitzer

Hello

I just subscribed to the list, hoping that someone would be able to help
me with my question.
Well, I'm working on a script that can and will be used by different
users from the machine and I was wondering if there was any way to do
something like an su, changing the user the script is executed under to
the user currently logged in by the script.

Reason:
I'd like to give users the ability to save their options and preferences
for the script. I'd like to accomplish this with a file in the users
homedir, something like the usual .something config files, chowned to
the logged in user and set to his/ her permissions...

Hope someone will be able to help me.
Ciao
Tobias Schweitzer

--
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] Re: [PHP-DB] Creating a pdf document

2002-01-24 Thread Daniel Ems

Mihai,

There is a php class that can generate pdf documents without the 
dll's/libraries required by other methods:

http://ros.co.nz/pdf/

You can definitely use the results of a database query to create a pdf!  
Enjoy!

Daniel Ems


On Wed, 23 Jan 2002, Mihail Bota wrote:

 Hello,
 
 I was wondering if I could save the result of a query in a pdf document. I
 looked for any functions that might help, but I got confused because I
 could not see how/where exactly to insert the necessary .dll's. I'd like
 to do this (saving the output of a query) by using mysql installed on a
 Irix machine, and PHP4.
 If this is not possible, could I create a pdf document or a word document
 from a query from either Access database or mysql on a win2k system,
 PHP4.1?
 Any references that might help?
 Thanks for your help!
 
 Mihai


-- 
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] Sending a POST-message

2002-01-24 Thread Matt Schroebel

I think this is what you're looking for.  It's a script written by Rasmus. 
http://www.php-faq.com/faq.php#39

I wonder how I can send a POST-command to a server, via a PHP-script instead 
of a form.


-- 
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] RE: phpwiki save button

2002-01-24 Thread Tim Ward

without the full source code of the classes you are using I'd be guessing,
but within savePreview() and savePage() $content is passed to an object
method that does the saving. You could just pass date(d/m/Y H:i:s - ) .
$content instead of $content. However it looks like this may be amended from
previous versions ... if so you'll need to strip the first x characters from
the front ... but this is getting messy.

the better way to do this is with a last_updated field in the database
holding a timestamp and handle including it at the top of the text when
displaying. I'd be surprised if the table doesn't already have a field like
that. 


Tim
www.chessish.com

 -Original Message-
 From: Tim Bogart [SMTP:[EMAIL PROTECTED]]
 Sent: 24 January 2002 15:43
 To:   Tim Ward; [EMAIL PROTECTED]
 Subject:  Re: [PHP] RE: phpwiki save button
 
 No, you're not missing a thing.  I just need to know exactly where to put
 the 
 line you sent me.  The word content is mentioned a few times in the
 script 
 and I'm not a programmer, remember?  Could you please indicate exactly
 where 
 you would put the line you sent me?  I'm sure you are taking for granted
 that 
 I know more than I seem, but I don't.  I'm a newbie at this and have to
 have 
 my nose put down into it before I understand.  Where should I put the
 line?
 
 Thanks!
 
 Tim
 
 On Thursday 24 January 2002 10:07 am, Tim Ward wrote:
  I think you just need to add the timestamp to the start of the story
 before
  you save it,
  i.e.
  $content = date(d/m/Y H:i:s - ) . $content;
 
  or am I missing something?
 
 
  Tim
  www.chessish.com
 
   -Original Message-
   From: Tim Bogart [SMTP:[EMAIL PROTECTED]]
   Sent: 24 January 2002 15:01
   To:   Tim Ward; [EMAIL PROTECTED]
   Subject:  Re: phpwiki save button
  
   On Thursday 24 January 2002 06:36 am, Tim Ward wrote:
What is it you actually want to do? Add the current date/time or a
timestamp entered on the submitting form?
  
   yes.  That is exactly what I wish to do.
  
   See date() for the former. Once
  
you've got your stamp in a format you want just add it to the front
 of
  
   the
  
story before saving. Give us a bit more detail about what it is that
  
   isn't
  
working, or the code that you want to modify.
  
   The following is the savepage.php script.  It (in as much as I can
   figure) is
what is executed when one pushes or clicks on the save button when
   phpwiki
   is serving up theeditpage.html file to a user on his or her browser,
   and
  
   the individual is finished editing, and wishes to save their entry.
 The
   save button is at the bottom of the edit page.  What I wish to have
   happen
   is, to have the save button do what it does now, save the changes, but
 in
   addition to that, if I had my perfect world, I would like this
   savepage.php
   script prefix the edited text with a date and time stamp on the left
 side
   of
   the page, appearing as a (redundancy here) prefix to the typed
 material.
   That way each entry would have a date and time stamp.  I hope I am
   describing
   this in a fashon you can understand.  Let me give you an example.  One
   types
   ...
  
   This is a good day.
  
   Then the individual pushes the save button.  The save is executed, and
   the
  
   user is bounced back to the preview page (the preview page part
 happens
   as a
   result simply of how the thing just works).  When the preview page is
   displayed, the newly added text appears, but looks like this...
  
   2002 01/24 09:33:45  This is a good day.
  
   The format of the date and time are really fluff to me, as long as it
   appears.
  
   I hope my description is understandable.  I eagerly await your
 response.
  
   Tim B.
  
   Here's the script...
  
   -
  
   s_id('$Id: savepage.php,v 1.17 2001/11/14 21:05:38 dairiki Exp $');
   require_once('lib/Template.php');
   require_once('lib/transform.php');
   require_once('lib/ArchiveCleaner.php');
  
   /* All page saving events take place here. All page info is also taken
   care
   of here. This is klugey. But it works. There's probably a slicker way
 of
   coding it.
   */
  
   // FIXME: some links so that it's easy to get back to someplace useful
   from
   these // error pages.
  
   function ConcurrentUpdates($pagename) { /* xgettext only knows about
   c/c++
  
   line-continuation strings is does not know about php's dot operator.
 We
   want
   to translate this entire paragraph as one string, of course.
   */
   $html = p; $html .= gettext (PhpWiki is unable to save your
 changes,
   because another user edited and saved the page while you were editing
 the
   page too. If saving proceeded now changes from the previous author
 would
   be
   lost.);
   $html .= /p\np; $html .= gettext (In order to recover from this
   situation follow these steps:);
   $html .= \nolli; $html .= 

Re: [PHP] Warning: Failed opening '....' for inclusion (.....) in Unknown on line 0

2002-01-24 Thread Ben Sinclair

Maybe there was a permissions problem?
--
Ben Sinclair
[EMAIL PROTECTED]


- Original Message -
From: Scott Fletcher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 9:34 AM
Subject: [PHP] Warning: Failed opening '' for inclusion (.) in Unknown
on line 0


 Hiya Everyone!

 I'm a little baffled on what is happening.  I'm using Apache on the UNIX
 machine.  When I built the website, everyone work okay.  Then I accidently
 remove part of the web directory because I was in the wrong directory at
 that time.  So, I had to restore the lost directory from the tape backup.
 All of the deleted file had been restored.  Then that's when this problem
 came up.  I kept getting the error message on some files with a Warning:
 Failed opening '...' for inclusion () in Unknown on line 0.  I did some
 troubleshooting but with no luck.

 Can someone tell me what the problem is?  Have I overlooked something?

 Thanks,
  Scott



 --
 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] Warning: Failed opening '....' for inclusion (.....) in Unknown on line 0

2002-01-24 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Scott Fletcher blurted
 Hiya Everyone!
 came up.  I kept getting the error message on some files with a Warning:
 Failed opening '...' for inclusion () in Unknown on line 0.  I did some
 troubleshooting but with no luck.

Is that warning coming from one of your 'restored' files of one of the
others? That's usually a *path* and or *file name* probem.
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UCxlHpvrrTa6L5oRAig4AJ9jYZJdt13x/p+azCmhmqofR0ceaQCfel36
V2tOMwEb590YQvpdMv/qQDw=
=Mp19
-END PGP SIGNATURE-

-- 
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] Warning: Failed opening '....' for inclusion (.....) in Unknown on line 0

2002-01-24 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Ben Sinclair blurted
 Maybe there was a permissions problem?

Good point :-)
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UCyIHpvrrTa6L5oRAuchAKCML9BIpksH377SVqI/MFoy+Y3/KwCeIxsi
YHz+A5/k/Mhb3lWm83AgU1k=
=irN+
-END PGP SIGNATURE-

-- 
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] Warning: Failed opening '....' for inclusion (.....) in Unknown on line 0

2002-01-24 Thread Negrea Mihai


  Hiya Everyone!
  came up.  I kept getting the error message on some files with a Warning:
  Failed opening '...' for inclusion () in Unknown on line 0.  I did
  some troubleshooting but with no luck.

test to see if you don't have a prepend statement around!

-- 
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] Hey!

2002-01-24 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Scott Fletcher blurted
 Hi again!  I just did the crazy thing and it work!  What I did was to copy
 the whole script in the file then delete the file.  Create a new file and
 paste the script back into the file.  Guess what!   The webpage work!  No
 nagging errors!  What give?

Scott, this is a mailing list with hundreds of posts a day, the only
reason I know what your on about is that I just answered your last post.
Please keep the thread together, it makes life much easier :-)

Sounds like it was indeed a permissions thing.
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UC0+HpvrrTa6L5oRAucgAKCKMkz5K042Pa7nT20CCcGbvlQndACfaIgM
xkHg6ZA2pvffe+OaQ7qOSWs=
=hwwf
-END PGP SIGNATURE-

-- 
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] Mail Attachments

2002-01-24 Thread Gordon Stewart

Dear List

I have just compleated a PHP web frontend to the standard mail function in
PHP.  I have got it to send and recieve email.

Can I take this programming task further and allow it to send and recieve
attachments. My script runs on a redhat 7 box.

Can anyone help?  How can i achieve this?

Gordon


-- 
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] Re: phpwiki save button

2002-01-24 Thread Tim Bogart

So...I would create a new table in my postgresql database that's being used 
which would contain the timestamp.  I would populate that table when the 
savepage.php was executed, extract the data from that table and write it to 
the screen, then execute the save.  Does that sound right?

Tim

On Thursday 24 January 2002 10:07 am, Tim Ward wrote:
 I think you just need to add the timestamp to the start of the story before
 you save it,
 i.e.
 $content = date(d/m/Y H:i:s - ) . $content;

 or am I missing something?


   Tim
   www.chessish.com

  -Original Message-
  From:   Tim Bogart [SMTP:[EMAIL PROTECTED]]
  Sent:   24 January 2002 15:01
  To: Tim Ward; [EMAIL PROTECTED]
  Subject:Re: phpwiki save button
 
  On Thursday 24 January 2002 06:36 am, Tim Ward wrote:
   What is it you actually want to do? Add the current date/time or a
   timestamp entered on the submitting form?
 
  yes.  That is exactly what I wish to do.
 
  See date() for the former. Once
 
   you've got your stamp in a format you want just add it to the front of
 
  the
 
   story before saving. Give us a bit more detail about what it is that
 
  isn't
 
   working, or the code that you want to modify.
 
  The following is the savepage.php script.  It (in as much as I can
  figure) is
   what is executed when one pushes or clicks on the save button when
  phpwiki
  is serving up theeditpage.html file to a user on his or her browser,
  and
 
  the individual is finished editing, and wishes to save their entry.  The
  save button is at the bottom of the edit page.  What I wish to have
  happen
  is, to have the save button do what it does now, save the changes, but in
  addition to that, if I had my perfect world, I would like this
  savepage.php
  script prefix the edited text with a date and time stamp on the left side
  of
  the page, appearing as a (redundancy here) prefix to the typed material.
  That way each entry would have a date and time stamp.  I hope I am
  describing
  this in a fashon you can understand.  Let me give you an example.  One
  types
  ...
 
  This is a good day.
 
  Then the individual pushes the save button.  The save is executed, and
  the
 
  user is bounced back to the preview page (the preview page part happens
  as a
  result simply of how the thing just works).  When the preview page is
  displayed, the newly added text appears, but looks like this...
 
  2002 01/24 09:33:45  This is a good day.
 
  The format of the date and time are really fluff to me, as long as it
  appears.
 
  I hope my description is understandable.  I eagerly await your response.
 
  Tim B.
 
  Here's the script...
 
  -
 
  s_id('$Id: savepage.php,v 1.17 2001/11/14 21:05:38 dairiki Exp $');
  require_once('lib/Template.php');
  require_once('lib/transform.php');
  require_once('lib/ArchiveCleaner.php');
 
  /* All page saving events take place here. All page info is also taken
  care
  of here. This is klugey. But it works. There's probably a slicker way of
  coding it.
  */
 
  // FIXME: some links so that it's easy to get back to someplace useful
  from
  these // error pages.
 
  function ConcurrentUpdates($pagename) { /* xgettext only knows about
  c/c++
 
  line-continuation strings is does not know about php's dot operator. We
  want
  to translate this entire paragraph as one string, of course.
  */
  $html = p; $html .= gettext (PhpWiki is unable to save your changes,
  because another user edited and saved the page while you were editing the
  page too. If saving proceeded now changes from the previous author would
  be
  lost.);
  $html .= /p\np; $html .= gettext (In order to recover from this
  situation follow these steps:);
  $html .= \nolli; $html .= gettext (Use your browser's bBack/b
  button to go back to the edit page.);
  $html .= /li\nli; $html .= gettext (Copy your changes to the
  clipboard
  or to another temporary place (e.g. text editor).);
  $html .= /li\nli; $html .= gettext (bReload/b the page. You
  should
  now see the most current version of the page. Your changes are no longer
  there.);
  $html .= /li\nli; $html .= gettext (Make changes to the file
  again.
 
  Paste your additions from the clipboard (or text editor).);
  $html .= /li\nli; $html .= gettext (Press bSave/b again.);
  $html .= /li/ol/p\n; $html .= QElement('p', gettext (Sorry for
  the
  inconvenience.));
 
  echo GeneratePage('MESSAGE', $html, sprintf (gettext (Problem while
  updating
  %s), $pagename));
  ExitWiki();
  }
 
  function PageIsLocked($pagename) {
  $html = QElement('p', gettext(This page has been locked by the
  administrator
  and cannot be edited.));
  $html .= QElement('p', gettext (Sorry for the inconvenience.));
 
  echo GeneratePage('MESSAGE', $html, sprintf (gettext (Problem while
  editing
  %s), $pagename));
  ExitWiki ();
  }
 
  function NoChangesMade($pagename) { $html = QElement('p', gettext (You
  have
  not made any 

[PHP] One more time... Sessions questons?

2002-01-24 Thread Floyd Baker


Hi 

I have been reading but can't get sessions to even try working..  

The set up is win32/php4.1/apache. 

Reading the list I have done what was suggested where it I could
understand it.  Just went nuts creating /tmp dirs everywhere I could
think of to see if any of them worked...  Nada!  Also changed the ini
line to point to c:/tmp, etc. Still ng.

Here is one of the scrips that doesn't work.

session_start();
session_register('page_views');
$page_views++;

print br You have viewed this page ;
print $page_views;
print  times(s).;


The ini is the 'recommended' version with register_globals off and
whatever vanilla settings were in there.  Everything else seems to be
working...  I can pass vars using $_REQUEST just fine.  What's wrong?

TVMIA

Floyd
--


-- 
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] Re: Warning: Failed opening '....' for inclusion (.....) in Unknown on line 0

2002-01-24 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Scott Fletcher blurted
 The file permission checked out fine.  It just baffled me!
 
 I don't know how to keep the post together to one topic!  I use MS Outlook
 and I clicked the reply button and it came out as a seperate post.

Well, this ones okay :)
If your going to make a habbit of mailing lists I'm told 'TheBat' is a
*very* good mail client for 'doze.
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UDvYHpvrrTa6L5oRAow8AJ9rg2SnpGCRNgFK6BzzAHSkdz/x2gCcD7DA
s9SOnYEADHOonOU2DclEUCg=
=Fext
-END PGP SIGNATURE-

-- 
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] How can the Surfer download

2002-01-24 Thread Todd Cary

Jason -


Then in your file download.php, have a single statement using the
header()
function to redirect to the file that is to be downloaded.


What is the syntax for the header() function?

Many thanks...

Todd

--
Dr. Todd Cary
Ariste Software
[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] Re: The Euro symbol, default charset and htmlentities()

2002-01-24 Thread LaserJetter

can you not print the charset inside one of the HTML tags? (DOCTYPE it
might be in).

Also, if you dont want to keep typing out
htmlentities(¤,ENT_QUOTES,iso-8859-15) to get a euro, just do:
$euro = htmlentities(¤,ENT_QUOTES,iso-8859-15);


LJ

Sönke Tesch [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Hi everybody!


 I'm a bit lost. The original problem was (and still is) to get the Euro
 symbol from a iso-8859-15 string into the HTML code output by a PHP-script
 (4.0.6 by the way).

 At first it worked fine using htmlentities(¤,ENT_QUOTES,iso-8859-15).
 However, this is a bit long, I would have plenty of htmlentities() to fix,
 and since -15 should be the considered the current standard rather than
 the outdated -1 it replaced, I wanted to figure out how to tell PHP and
 its htmlentities() which character set to use as default.

 First question:
 Where's the configuration for that? mbstring.* ini php.ini doesn't seem
 to be the right place (and I didn't expect it anyway).


 So, after learning that mbstring.* doesn't work I removed these from
 php.ini and now the extended htmlentities() doesn't work anymore. The
 line

   echo htmlentities(¤,ENT_QUOTES,iso-8859-15);

 results in a Wrong parameter count for htmlentities()-warning. Oops?

 Second question:
 What's wrong now? I'm sure it worked earlier and I can't see that this
 line is wrong anyway. htmlentities() expects upto three arguments, there
 are three.


 And, not related to a problem, the third question:
 Did anybody yet consider setting iso-8859-15 as default charset throughout
 PHP instead of iso-8859-1?


 Regards,
   soenk.e



-- 
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] How can the Surfer download

2002-01-24 Thread Jason Wong

On Friday 25 January 2002 01:00, Todd Cary wrote:
 Jason -

 
 Then in your file download.php, have a single statement using the
 header()
 function to redirect to the file that is to be downloaded.


 What is the syntax for the header() function?

Manual? Lots of good info in there!


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Fats Loves Madelyn.
*/

-- 
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]




SV: [PHP] multi-threading within php?

2002-01-24 Thread Mattias Andersson

Then I would have to write a parser when I have already written my own
spider. But the problem isn't the spider itself, but rather the lack of
multi-threading within PHP (which is needed in quite alot of sitatuations,
depending on what you're coding). I'm not sure if it really does lack
multi-threading though, it might just be me that doesn't know about it.
Is there any way to execute several functions simultaneously?

Mvh,
Mattias Andersson

Mjukvaruutvecklare, humany AB
Direkt: 08-4540701
Mobil: 0704-526685


-Ursprungligt meddelande-
Från: bvr [mailto:[EMAIL PROTECTED]] 
Skickat: den 24 januari 2002 15:33
Till: [EMAIL PROTECTED]; Mattias Andersson
Ämne: Re: [PHP] multi-threading within php?


You may want to use 'wget' spider function, then parse the files with PHP if
necessary.

http://wget.sunsite.dk/

bvr.


On Thu, 24 Jan 2002 14:52:54 +0100, Mattias Andersson wrote:

Hello!
 
I was making a spider for a simple searchengine and all was well until I
started testing it on larger sites.
The problem isn't that it doesn't work, it does, but it is very very slow,
just handling one connection at the time.
Basically, it just downloads a page, extract all links from it, then
downloads those pages, extract their links, until all pages on a site has
been downloaded and archived.
Is there any way to do it in several threads so that it handles several
connections simultaneously?
If it would dynamically allocate threads that would be even better.
 
Regards,
Mattias Andersson
 
Software Developer, humany AB
Direct: 08-4540701
Mobile: 0704-526685
 




--
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] Mail Attachments

2002-01-24 Thread Neil Freeman

Take a look at the articles on:
 http://www.devshed.com/Server_Side/PHP

HTH

Neil

Gordon Stewart wrote:

 Dear List

 I have just compleated a PHP web frontend to the standard mail function in
 PHP.  I have got it to send and recieve email.

 Can I take this programming task further and allow it to send and recieve
 attachments. My script runs on a redhat 7 box.

 Can anyone help?  How can i achieve this?

 Gordon

 --
 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]

 ***
  This message was virus checked with: SAVI 3.52
  last updated 8th January 2002
 ***

--

 Email:  [EMAIL PROTECTED]
 [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] PHP without browser

2002-01-24 Thread DrouetL

Hi everybody

I would like to pass parameters to a php script running as a bach job under
windows.

Is there any possibility to something like that ?

Laurent Drouet


-- 
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] Image Upload

2002-01-24 Thread lists

Does anyone have a good script for uploading an image and storing it in a 
mySQL database.

Thanks


-- 
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] function scope question

2002-01-24 Thread Joel Boonstra

Hello,

I wrote a PHP class to display an HTML calendar, and then wrote a subclass
of it for a specific project I'm working on.  Here is the entirety of the
subclass:

// create our new sub-class of the calendar
class rantCal extends calendar {
  function get_link($day) {
$link = ;
if (valid_date($this-my_year, $this-my_month, $day)) {
  if (rant_exists($this-my_year, $this-my_month, $day)) {
$link = index.php?date=$this-my_year-$this-my_month-$day;
  }
}
return $link;
  }
}

Basically, it's used to determine if a given date should be linked or not.
When I wrote it, I didn't expect it to work, since these two function:

valid_date()
rant_exists()

are defined completely outside of the class.  In fact, they're defined in
a functions file that I include (with include()) above where I define my
rantCal class.  Shouldn't their names not be recognized within this class?
I was assuming that a class was entirely self-contained, so it can't know
about functions defined outside its scope.  However, it works just fine
(that is, the functions get called), which is helpful, but it doesn't seem
like the way things should work.

Am I completely wrong?  I seem to recall that this sort of thing should
work in a more strict OO language, like C++.

I'm using PHP 4.0.6, if that's important.

-- 
[ joel boonstra | [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] eval on php embedded html

2002-01-24 Thread Atanas Vassilev

 So, either:

 ? if ($radiobutton1 == on) { print selected; } ?

 Or

 ? if ($radiobutton1 == on) print selected; ?

I found it very convenient for in-html coding to use the following
structure:

input blabla bla ? echo($radiobutton1 == on ? selected : );?



-- 
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] How can the Surfer download

2002-01-24 Thread Todd Cary

Jason -

I had looked it up in the manual, but I am not sure of what to put into
the area /* ... output pdf file ... */

Any help is appreciated

Todd



If you want the user to be prompted to save the data you are sending,
such as a generated PDF file, you can use the Content-Disposition header
to supply a recommended filename and force the browser to display the
save dialog.

? php header(Content-type: application/pdf);
   header(Content-Disposition: attachment; filename=downloaded.pdf);

   /* ... output pdf file ... */



--
Todd Cary
Ariste Software
[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] How can the Surfer download

2002-01-24 Thread daniel

Todd-

 I had looked it up in the manual, but I am not sure of what to put into
 the area /* ... output pdf file ... */
 
 Any help is appreciated
 
 Todd
 
 
 
 If you want the user to be prompted to save the data you are sending,
 such as a generated PDF file, you can use the Content-Disposition header
 to supply a recommended filename and force the browser to display the
 save dialog.
 
 ? php header(Content-type: application/pdf);
header(Content-Disposition: attachment; filename=downloaded.pdf);
 
/* ... output pdf file ... */
 
 

This is where you put whatever chunk of code you use to create the
file that you wish the user to download. If this is a PDF file on
disk, you can do something as simple as readfile(filename.pdf)..
or if you are generating it yourself.. then, again, you'll probably
use readfile(whatever.pdf), since (though I have never used them)
I am pretty sure the PDF libs don't have an output function, so you
have to write to disk.

Example 1 on this page (http://www.php.net/manual/en/ref.pdf.php)
shows EXACTLY what you are trying to do with one small change, make
the word inline read as attachment so it'll force the user to
download, as opposed to displaying in the browser.


Daniel J. Lashua


-- 
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] using a text file for variables in a form?

2002-01-24 Thread Alexis N. Mueller

I have some variables stored in plain text in a text file. Unfortunately I
am not going to be able to use SQL to solve this one, since that server is
not running it. Anyway.

The text file looks like this (everything between the *):
*
SAVINGS=type1
FILTER=disabled
SPOOL=category1
*
I use a form to edit this text file. SAVINGS and SPOOL are 'select' form
items with multiple options. FILTER is a 'radio' form item with two options.

I was wondering if anyone knew how to make the text file pass the variables
into the form that i use to edit the text file... confusing?
hmm...
let's say i was editing the text file that i gave as an example, I would
like like the SAVINGS 'select' field in the form to have type1 selected. the
FILTER 'radio' field
in the form should be checked on disabled. And the SPOOL 'select' field
should read category1

Anyone have any ideas on how to do that?
Help would be appreciated,
Thank you

Alex



-- 
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] emulate a browser

2002-01-24 Thread LaserJetter

If it is frame forwarded, you would get a 300 OK status becuase you have
accessed a web page and it has been server OK. The webpage (which contains
the FRAMESET tags) then send a request to another server to get the page
to be redirected to.
The only way to check for this would be to see if the page you have sent the
request for contains the FRAMESET tags (use GET instead of HEAD) but this
would be unreliable as a lot of websites start with a frame based page
anyway.

LJ

Frank Benady [EMAIL PROTECTED] wrote in message
004301c1a4ba$478a41c0$0101@phoenix">news:004301c1a4ba$478a41c0$0101@phoenix...
 It works really nice, Michael, thanks again.

 I have one more question, maybe you can answer me :
 If the domain name has been redirected with hte permanent redirect, I
 get the 301 Moved Permanently header response. But if the domain name
 has been frame-forwarded, I have no header response. Is it normal ?
 Do you know if there is some alternatives so I could check if the domain
 name is used, even on a frame-forward type redirectection ?
 Moreover, if the domain has been redirected, is it possible to get the
 url it has been redirected to ?

 Thanks again for your help

 Frank

 - Original Message -
 From: Michael Sims [EMAIL PROTECTED]
 To: Frank Benady [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Thursday, January 24, 2002 2:28 AM
 Subject: Re: [PHP] emulate a browser


  At 01:45 AM 1/24/2002 +0100, Frank Benady wrote:
  Hi All
  
  Can I emulate the first request of a browser when it tries to connect
 to a
  distant server using a domain name and parse the answer from the
 remote
  server to know if there is a website located there or if there is no
 hosting
  (or even some kind of forwarding) configured for this domain name ?
  Is ther some http functions in PHP which permit to do this test ?
 
  You can use fsockopen() to open a socket connection to a remote host
 via
  port 80 (HTTP).  If fsockopen() returns a valid file pointer then that
  means there is something listening on port 80 on the host (99% it will
 be a
  web server).
 
  You could then use fputs() to send a request to the server, such as:
 
  HEAD / HTTP/1.0\r\n\r\n
 
  Normally browsers use GET instead of HEAD, but in your case you are
 only
  interested in the servers response (the HTTP headers) and not the
 actual
  file/page itself.
 
  You could then use fgets() to read the response sent back from the
 server
  and parse it to get the information you wanted (for example, look for
 a
  Location: ... line in the headers to see if the page is trying to
  redirect the browser).
 
  I have a function that checks to see if a particular file is available
 via
  HTTP from a remote host.  It takes a full URL and returns true if the
  page/file exists, and false if it doesn't.  With some work you could
 modify
  this script to achieve what you want.  I'm posting it below.  Ask if
 you
  have any questions about it.
 
  Oh, BTW, I'm sure that I have (as usually) went totally overboard with
 this
  function and someone will now probably point out that PHP has
 something
  built in to do what I'm doing here...but I couldn't find it and I had
 fun
  writing this function anyway. :-)
 
  ?
  function http_file_exists ($url) {
 
 if (!preg_match(/^http:\/\/([^\/]+)\/.*$/i,$url,$matches)) {
 
   return Error - incorrect format;
 
 } else {
 
   $host = $matches[1];
   $fp = fsockopen ($host, 80, $errno, $errstr, 30);
   if (!$fp) return Error - couldn't connect to host;
 else {
   fputs ($fp, HEAD $url HTTP/1.0\r\n\r\n);
   $response = fgets ($fp,128);
   fclose ($fp);
   return (eregi(^.+200 OK.+$,$response) ? true : false);
 }
 
 }
  }
  ?
 
 




-- 
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] How can the Surfer download

2002-01-24 Thread Todd Cary

Daniel -

When I use the following code, I am not asked if I want to Save the file
or Open it.  Instead, the contents of the file are displayed in the
browser.  I am sure that I have missed something simple!!

Todd

?php
  $len = filesize(test.pdf);
  header(Content-type: application/pdf);
  header(Content-Length: $len);
  header(Content-Disposition: attachment; filename=test.pdf);
  readfile(test.pdf);
?


--
Todd Cary
Ariste Software
[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] using a text file for variables in a form?

2002-01-24 Thread daniel

Alex-

This is very basic PHP.

 I have some variables stored in plain text in a text file. Unfortunately I
 am not going to be able to use SQL to solve this one, since that server is
 not running it. Anyway.
 
 The text file looks like this (everything between the *):
 *
 SAVINGS=type1
 FILTER=disabled
 SPOOL=category1
 *

 I use a form to edit this text file. SAVINGS and SPOOL are 'select' form
 items with multiple options. FILTER is a 'radio' form item with two options.
 
 I was wondering if anyone knew how to make the text file pass the variables
 into the form that i use to edit the text file... confusing?

First, you need to get the data from the file and make the items
useful:

?
$ary = file(myfile.file);

foreach($ary as line) {
  # break up the line
  list($key,$value) = explode(=,$line);

  # Take off that pesky newline
  $value = substr($value,0,-1);

  $data[$key]=$value;
}
?

Now your values are accessible as $data[SAVINGS], etc.

So... when building the HTML...

?
print 'INPUT TYPE=TEXT NAME=savings VALUE=' .
$data[SAVINGS] . ';
?



Daniel J. Lashua


-- 
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] Re: XML / XSLT parsing using PHP

2002-01-24 Thread Peter Clarke

Lasse Laursen [EMAIL PROTECTED] wrote in message
02c301c1a4c4$42e03620$[EMAIL PROTECTED]">news:02c301c1a4c4$42e03620$[EMAIL PROTECTED]...
 Hi,

 We are about to develop a CMS that uses XML and XSLT.

 The XML files contains some static information (header, footers and common
 non-dynamic information). We would like to have a XML file that would
 contain a field like:

 MENU
   ...
   ...
   ...
 MENU/

 Before the XML file is loaded into the PHP script that uses the
xslt_process
 routine to convert the XML/XSLT files into plain HTML we would like to
 replace the MENU field with come dynamic content (eg. some other
 variables, etc.)

 What's the easiest way to do that? SAX or?


Load the XML into a variable,
do whatever changes to it,
then process the variable with xslt_process.


 Furthermore the 'xslt_process' function requires the following parameters:

 xslt_process (resource xh, string xml, string xsl [, string result [,
array
 arguments [, array parameters]]])

 where the XML and XSLT variables are references to files. - The XML file
is
 in our example a variable (eg. $current_xml_file = x;) and therefor
we
 cannot use the xslt_process function? Of cause we can store the XML var.
in
 a temporary location and then read the file, but that's an extreamly ugly
 approach! :) Any ideas?


Have a look at:
http://www.php.net/manual/en/function.xslt-process.php
Example 3 Using the xslt_process() to transform a variable containing XML
data and a variable containing XSL data into a variable containing the
resulting XML data



 I'm looking forward to your replies :)


 Yours
 --
 Lasse Laursen [EMAIL PROTECTED] - Systems Developer
 NetGroup A/S, St. Kongensgade 40H, DK-1264 København K, Denmark
 Phone: +45 3370 1526 - Fax: +45 3313 0066 - Web: www.netgroup.dk

Peter Clarke


-- 
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] How can the Surfer download

2002-01-24 Thread daniel

Todd-

 When I use the following code, I am not asked if I want to Save the file
 or Open it.  Instead, the contents of the file are displayed in the
 browser.  I am sure that I have missed something simple!!
 
 Todd
 
 ?php
   $len = filesize(test.pdf);
   header(Content-type: application/pdf);
   header(Content-Length: $len);
   header(Content-Disposition: attachment; filename=test.pdf);
   readfile(test.pdf);
 ?

The code you are showing should work... therefore it may be
something to do with your browser. Try changing the Content-Type
to something that there is no way you could have ever registered in
your browser:

header(Content-Type: x-this-is-a-test/for-php);

And see if that changes the way it handles it. Of course,
application/pdf is the CORRECT MIME type, so if this NEW MIME type
does solve the problem, you should attempt to fix your browser, and
put the script back the way it was. If it doesn't fix anything, try
using a different browser, or better yet, a different machine.
Additionally, when working with this type of operation, the first
time you hit the page, it will be cached (in it's incorrect form) in
your browser. Therefore, after making these changes, you should dump
the Disk and Memory cache in your browser, and close and restart
your browser just to be safe.


Daniel


-- 
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] How can the Surfer download

2002-01-24 Thread Jason Wong

On Friday 25 January 2002 01:35, Todd Cary wrote:
 Jason -

 I had looked it up in the manual, but I am not sure of what to put into
 the area /* ... output pdf file ... */

 Any help is appreciated


 Todd

 

 If you want the user to be prompted to save the data you are sending,
 such as a generated PDF file, you can use the Content-Disposition header
 to supply a recommended filename and force the browser to display the
 save dialog.

 ? php header(Content-type: application/pdf);
header(Content-Disposition: attachment; filename=downloaded.pdf);

/* ... output pdf file ... */

1) What kind of file are you letting people download?
2) Is the file generated on-the-fly or is it already on disk?
3) What webserver are you using?



In general, if the file is on disk then simply using:

  header(Location: http://www.domain.com/downloads/myfile.exe;);

would work. Whether the user is asked to Save or Open... depends on the 
browser setting.

If you're using a webserver such as Apache then certain common file types are 
automatically recognised and the appropriate HTTP headers are sent to the 
browser.


If you want to force a download regardless of whether the file type will be 
recognised by the browser then you would have to send your own headers. 
Something like the following:

  header(HTTP/1.0 200 OK);
  header(Content-Type: application/octet-stream);
  header(Content-Disposition: attachment; filename=some_filename);
  header(Content-Location: $F);
  header(content-length:  . filesize(/path/to/file.ext));
  header(Location:http://www.domain.com/some_filename;);


hth
-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
TRANSACTION CANCELLED - FARECARD RETURNED
*/

-- 
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] How can the Surfer download

2002-01-24 Thread Jason Wong

On Friday 25 January 2002 02:23, Jason Wong wrote:


 In general, if the file is on disk then simply using:

   header(Location: http://www.domain.com/downloads/myfile.exe;);

 would work. Whether the user is asked to Save or Open... depends on the
 browser setting.

 If you're using a webserver such as Apache then certain common file types
 are automatically recognised and the appropriate HTTP headers are sent to
 the browser.


 If you want to force a download regardless of whether the file type will be
 recognised by the browser then you would have to send your own headers.
 Something like the following:

   header(HTTP/1.0 200 OK);
   header(Content-Type: application/octet-stream);
   header(Content-Disposition: attachment; filename=some_filename);
   header(Content-Location: $F);
   header(content-length:  . filesize(/path/to/file.ext));
   header(Location:http://www.domain.com/some_filename;);

**CORRECTION** (I was trying to adapt some old code to use for this example)

   header(HTTP/1.0 200 OK);
   header(Content-Type: application/octet-stream);
   header(Content-Disposition: attachment; filename=some_filename);
   header(Content-Location: some_filename);
   header(content-length:  . filesize(/path/to/file.ext));
   readfile(/path/to/file.ext);


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Clear the laundromat!!  This whirl-o-matic just had a nuclear meltdown!!
*/

-- 
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] How can the Surfer download

2002-01-24 Thread Jason Wong

On Friday 25 January 2002 02:16, daniel wrote:
 Todd-

  When I use the following code, I am not asked if I want to Save the file
  or Open it.  Instead, the contents of the file are displayed in the
  browser.  I am sure that I have missed something simple!!
 
  Todd
 
  ?php
$len = filesize(test.pdf);
header(Content-type: application/pdf);
header(Content-Length: $len);
header(Content-Disposition: attachment; filename=test.pdf);
readfile(test.pdf);
  ?

 The code you are showing should work... therefore it may be
 something to do with your browser. Try changing the Content-Type
 to something that there is no way you could have ever registered in
 your browser:

 header(Content-Type: x-this-is-a-test/for-php);

 And see if that changes the way it handles it. Of course,
 application/pdf is the CORRECT MIME type, so if this NEW MIME type
 does solve the problem, you should attempt to fix your browser, and
 put the script back the way it was. 

I just want to point out that some versions of IE are notoriously buggy 
(what's new ;-)) and would try to display any type of file regardless of what 
you have for the Content-Type. So if you have a buggy version of IE you need 
to upgrade it.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Accident, n.:
A condition in which presence of mind is good, but absence of
body is better.
-- Foolish Dictionary
*/

-- 
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] Split files

2002-01-24 Thread DL Neil

  =Hmm, I'm still come at it from the other way around (all due respect to
  Jason) - but then I don't recall OpSys details, or know if there is a
  utility/tool for the job in your choice of OpSys.
 
 Well unless it's a *really* obscure OS I'm sure there must be some readily 
 available file splitter utility. No point doing more work than necessary by 
 writing your own file splitting routine :)
 
 Think about a multi-volume archiver, like tar.
 Also pkzip, rar and ace have an option to archive without using compression.

=whilst they are running, will any of these burn a CD (for the original post-er)?
=dn



-- 
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] multi-threading within php?

2002-01-24 Thread DL Neil

If the links are placed in a db as they are found, then couldn't you run the same 
script in multiple instances
(browser windows, DOS boxes/command lines) against the same db. That way you would be 
fetching and parsing
multiple web pages concurrently. The only 'multi-threading' would be against the db. 
Your Internet link should
be able to cope.

=dn


- Original Message -
From: Mattias Andersson [EMAIL PROTECTED]
To: 'bvr' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: 24 January 2002 17:14
Subject: SV: [PHP] multi-threading within php?


Then I would have to write a parser when I have already written my own
spider. But the problem isn't the spider itself, but rather the lack of
multi-threading within PHP (which is needed in quite alot of sitatuations,
depending on what you're coding). I'm not sure if it really does lack
multi-threading though, it might just be me that doesn't know about it.
Is there any way to execute several functions simultaneously?

Mvh,
Mattias Andersson

Mjukvaruutvecklare, humany AB
Direkt: 08-4540701
Mobil: 0704-526685


-Ursprungligt meddelande-
Från: bvr [mailto:[EMAIL PROTECTED]]
Skickat: den 24 januari 2002 15:33
Till: [EMAIL PROTECTED]; Mattias Andersson
Ämne: Re: [PHP] multi-threading within php?


You may want to use 'wget' spider function, then parse the files with PHP if
necessary.

http://wget.sunsite.dk/

bvr.


On Thu, 24 Jan 2002 14:52:54 +0100, Mattias Andersson wrote:

Hello!

I was making a spider for a simple searchengine and all was well until I
started testing it on larger sites.
The problem isn't that it doesn't work, it does, but it is very very slow,
just handling one connection at the time.
Basically, it just downloads a page, extract all links from it, then
downloads those pages, extract their links, until all pages on a site has
been downloaded and archived.
Is there any way to do it in several threads so that it handles several
connections simultaneously?
If it would dynamically allocate threads that would be even better.

Regards,
Mattias Andersson

Software Developer, humany AB
Direct: 08-4540701
Mobile: 0704-526685





--
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] PHP without browser

2002-01-24 Thread DL Neil

Hi Laurent,

 I would like to pass parameters to a php script running as a bach job under
 windows.
 
 Is there any possibility to something like that ?


Coverage of argv, argc and some good examples are in the manual at 
http://uk2.php.net/manual/en/commandline.php

Regards,
=dn



-- 
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] using a text file for variables in a form?

2002-01-24 Thread Alexis N. Mueller

Dan,

Thanks for replying so fast.. I tried it out right away.

The script part of it didn't seem to give me much grief, however the html
part of it seems to be having issues
with the combination of single quotes (') and double qouotes (), or maybe
it's the order, or a linebreak in the email... i don't know...

?
print 'INPUT TYPE=TEXT NAME=savings VALUE=' .
$data[SAVINGS] . ';
?


Also this solution provides a text box... I'm sure I can play around with
making it an 'option' within a 'select' item of a form... like:

?
print select size=1 name=SAVINGS
print option name=SAVINGS VALUE=foo;
?

please lemme know if i'm understanding this right...
thanks

-Alex

Daniel [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Alex-

 This is very basic PHP.

  I have some variables stored in plain text in a text file. Unfortunately
I
  am not going to be able to use SQL to solve this one, since that server
is
  not running it. Anyway.
 
  The text file looks like this (everything between the *):
  *
  SAVINGS=type1
  FILTER=disabled
  SPOOL=category1
  *
 
  I use a form to edit this text file. SAVINGS and SPOOL are 'select' form
  items with multiple options. FILTER is a 'radio' form item with two
options.
 
  I was wondering if anyone knew how to make the text file pass the
variables
  into the form that i use to edit the text file... confusing?

 First, you need to get the data from the file and make the items
 useful:

 ?
 $ary = file(myfile.file);

 foreach($ary as line) {
   # break up the line
   list($key,$value) = explode(=,$line);

   # Take off that pesky newline
   $value = substr($value,0,-1);

   $data[$key]=$value;
 }
 ?

 Now your values are accessible as $data[SAVINGS], etc.

 So... when building the HTML...

 ?
 print 'INPUT TYPE=TEXT NAME=savings VALUE=' .
 $data[SAVINGS] . ';
 ?



 Daniel J. Lashua




-- 
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] How can the Surfer download

2002-01-24 Thread Todd Cary

Jason and Daniel -

Maybe this is a cop out, however it is working.  Comments welcomed..

html
 head
  ?
print('meta http-equiv=refresh content=0; URL=docs/' . $filename
. '');
  ?
titleSendfile/title
 /head
...

--
Todd Cary
Ariste Software
[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] Executing files?

2002-01-24 Thread Mårten Andersson

Hello.

I want to execute a .waw-file with PHP, I's there any way to do this? I'm 
almost sure I've read how to do this somewhere in the documentation i 
PHP.net, but I can't find it now..

Does anyone know how to do this?



--
Mårten Andersson
Loddbygatan 2
60218 Norrköping

URL: http://www.vanvett.net/marten
email: [EMAIL PROTECTED]
ICQ: 86515830


_
Chatta med vänner online, prova MSN Messenger: http://messenger.msn.se


-- 
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] MySQL queston - Which row does it put your info into?

2002-01-24 Thread Phil Schwarzmann

When Im adding rows into my MySQL database using PHP, it seems to put
them in random places in the database.  Sometimes at the beginning,
sometimes at the end, sometimes in the middle of the database.  
 
Why is it doing this?
 
Thanks for your help!!



RE: [PHP] MySQL queston - Which row does it put your info into?

2002-01-24 Thread Rick Emery

When records are deleted, the space they occupied are marked as vacant.  New
records are inserted into those locations.

That said, since this is a relational database, it really doen't matter
where the new records are inserted.

If you want the nitty-gitty details of MYSQL or help, go to the the
[EMAIL PROTECTED] mailing list

-Original Message-
From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 1:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL queston - Which row does it put your info into?


When Im adding rows into my MySQL database using PHP, it seems to put
them in random places in the database.  Sometimes at the beginning,
sometimes at the end, sometimes in the middle of the database.  
 
Why is it doing this?
 
Thanks for your help!!

-- 
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] MySQL queston - Which row does it put your info into?

2002-01-24 Thread Rasmus Lerdorf

That's how databases work.  There is no implied ordering internally.  An
order is only applied if you add an order by clause on a select.

-Rasmus

On Thu, 24 Jan 2002, Phil Schwarzmann wrote:

 When Im adding rows into my MySQL database using PHP, it seems to put
 them in random places in the database.  Sometimes at the beginning,
 sometimes at the end, sometimes in the middle of the database.

 Why is it doing this?

 Thanks for your help!!



-- 
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] How can the Surfer download

2002-01-24 Thread Jason Wong

On Friday 25 January 2002 03:06, Todd Cary wrote:

 Jason and Daniel -

 Maybe this is a cop out, however it is working.  Comments welcomed..

 html
  head
   ?
 print('meta http-equiv=refresh content=0; URL=docs/' . $filename
 . '');
   ?
 titleSendfile/title
  /head
 ...

Hmm, but if the file was a recognised type then this would just display the 
file in your browser. So wouldn't it be easier to use the header(Location: 
...) example that I gave earlier?


In any case I thought your objective was to display a Save/Open ... dialog?



-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
I have a terrible headache,  I was putting on toilet water and the lid fell.
*/

-- 
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] using a text file for variables in a form?

2002-01-24 Thread daniel

 The script part of it didn't seem to give me much grief, however the html
 part of it seems to be having issues
 with the combination of single quotes (') and double qouotes (), or maybe
 it's the order, or a linebreak in the email... i don't know...
 
 ?
 print 'INPUT TYPE=TEXT NAME=savings VALUE=' .
 $data[SAVINGS] . ';
 ?

Yeah. I typoed. It is just BASIC outputting of HTML, though. You can
do it a million different ways. If you wanted to do it my way...
you should use this:

?
print 'INPUT TYPE=TEXT NAME=savings VALUE=';
print $data[SAVINGS];
print ';
?

but... of course it takes MUCH more than that to have anything
working. You need FORM tags, and a PHP script to accept the
submission, etc, etc.


Daniel

-- 
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] Increment help..please

2002-01-24 Thread will hives

please help I'm a newb and this is really messing with my head. All I want
to know is what do I need to add to this script to allow it to increment the
ID number. pleasee.
thank you very much for a simple boy

Will 
? 

$db_name = altone;

$table_name = author;



$connection = @mysql_connect(www.myserver.net, test, will) or die
(couldn't connect.);

$db = @mysql_select_db($db_name, $connection) or die (couldn't select
database.); 

$sql = INSERT INTO $table_name (id, name, email, picture_name)
VALUES ('$id', '$name', '$email', '$picture_name') ;

$result = @mysql_query($sql, $connection) or die (couldn't execute query);





if ($picture != ) {


move_uploaded_file($picture, /home/mine/yep/php/$picture_name);


} 




? 


html 
head 
titlemy contact management system: add a contact/title
/head 
body 

table cellspace=3 cellpadding=5
tr 
thName  email information/th
th /th 
/tr 
tr 
td valign=top 

pstongfont size=-2 face=Verdana, Arial, Helvetica,
sans-serifname:/fontbr
? echo $table_name; ?br
? echo $name; ?br
? echo $id; ? 
/p 
pstongfont size=-2 face=Verdana, Arial, Helvetica,
sans-serifemail:/fontbr? echo $email; ?

br 
/p 
font size=-2 face=Verdana, Arial, Helvetica, sans-serifFile
to Upload:/fontbr
img src=? echo http://www.myserver.net/php/$picture_name;; ?
pstong/p 
/td 
td valign=top /td
/tr 
tr 
td align=center colspan=2
div align=leftbr
/div 
p align=left 
input type=submit name=submit value=add to contact system
/p 
div align=left/div
/td 
/tr 
/table 
/body 
/html 


Cheers 
Will


-- 
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] Re: [Kopia] [PHP] Re: Sessions problem with FreeBSD 4.3

2002-01-24 Thread Erik Price

 From my understanding, as long as you have a session_start() function 
above the html tag, you can work with variables in the form 
$_SESSION['variableName'] rather than having to use session_register().  
In fact, using session_register() is no longer needed at all.  Use 
$_SESSION['variableName'] the way you would any other variable.


Erik

PS: I'm not speaking definitively, just my own interpretation of the 
manual.



On Wednesday, January 23, 2002, at 07:18  PM, Yasuo Ohgaki wrote:

 Jeff Sheltren wrote:
 What happens if you set register_globals=Off and use
 $_SESSION?


 Thanks for the reply.  I will try changing register_globals to Off.  I 
 am
 not quite sure I know what you mean by using $_SESSION though, could 
 someone
 please explain how that is uesd?

 Session manaul pages are updated. There is enough explanation how to
 use $HTTP_SESSION_VARS/$_SESSION now :)

 -- Yasuo Ohgaki


 -- 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 opinion On sessions - Cookies mandatory?

2002-01-24 Thread CompMan86

If there are two people behind a NAT, then the site would check for a
session ID and the IP. If a session ID is introduced AND their IP
matches the session, they are allowed to proceed. This would prevent
people from moving a session ID to another machine. If two people are
behind a NAT and share a session ID, I don't think there is a way of
preventing them to be assumed as the same person. So basically, it will
try to use cookies alongside a matching IP, and if cookies are disabled,
it will use the GET method alongside a matching IP. It just makes a
double check of the user...half the risk of transferring session ID's
among people...but still not fullproof...but I don't think there is a
fullproof way.

Dl Neil [EMAIL PROTECTED] wrote in message
news:0ad801c1a4ba$3d49bec0$7215100a@jrbrown...
 Entering the conversation late...
 
 1 IP addresses
 Remember these are not necessarily 'unique'. If two of us here log in,

 won't we appear (to you) have the same IP address if we're 'hiding' 
 behind a NAT (Network Address Translation) box? Also dial-up users 
 share a pool of IP addresses which are reallocated between customers 
 as they disconnect/reconnect.
 
 2 Cookies
 I think someone has already made points against their use. Many 
 corporates set up/require that browsers are configured to reject all 
 cookies (plays havoc with many shopping and banking sites). Obviously 
 there is popular advice that cookies are 'not good', because I've had 
 a number of friends and clients tell me that they regularly clear out 
 their 'cookie jar' - and need help when they get over enthusiastic and

 clear more than they should...
 
 There's a balance between easing life for those who are 'in', and 
 turning off those trying to arrive. The trick is finding it! =dn
 
 
 - Original Message -
 From: SpamSucks86 [EMAIL PROTECTED]
 To: 'PHP-General' [EMAIL PROTECTED]
 Sent: 23 January 2002 23:46
 Subject: RE: [PHP] Need opinion On sessions - Cookies mandatory?
 
 
  The idea of building a website is largely to accommodate as large a 
  portion of your visitors as possible. I'm not worried about people 
  bookmarking sessionID's, but what if someone copy/pastes the URL to 
  a friend and they use the section. My friend gave me an excellent 
  idea, and that is to check their IP and store the IP in the session.

  If the IP doesn't match, then start a new session. This would be 
  perfect, because there's a double check. If someone disconnects to 
  the internet but never closes their browser, I don't think they 
  should be allowed to continue their session anyway, they should be 
  required to login again.
 
  -Original Message-
  From: Nick Wilson [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, January 23, 2002 3:35 AM
  To: [EMAIL PROTECTED]
  Subject: Re: [PHP] Need opinion On sessions - Cookies mandatory?
 
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
 
  * and then Jason G. blurted
   If cookies do not work, then you must have a session_id appended 
   to
  the
   URL.  HTTP is a stateless protocol.  So every time you make a
  request via
   HTTP, you must let PHP know what the session_id is either through
  cookies,
   or url query strings (or possibly posted with a form).
 
  Yep, now I'm with you. The amount of times you'd see that kind of 
  ugly URL would be fairly minimal in most situations as most users 
  these days aren't even aware they *can* disable cookies.
 
 
disable cookies, but appending the session ID could be a 
security
  risk.
Consider this: Someone is viewing a page and says oh cool, I 
want
  Joe
to see this. He then copy/pastes the URL, sessionID and all, 
to
  Joe,
who then loads up the page using his friend's SessionID. With
  cookies,
this would not happen.
   
   Not a problem. The session is *destroyed* as soon as a user 
   closes
  the
   browser.
  
   A session will only be *destroyed* if it uses a cookie. PHP never
  knows
   when you close the browser, but the browser will remove the 
   cookie.
  Next
   time you fire up the browser, it will not send the cookie, and a
  different
   session will be started.
 
  Sure. But there is some kind of clean on the host machine right? You

  couldn't expect to continue a session a week later because you've 
  bookmarked a URL containind a SID. I think this is controlled by 
  something like a timeout var in the php.ini.
 
   In my personal experience, using cookies only has not proven to be

   a problem.  Your call.
 
  When you say using cookies only do you mean 'requiring' the user to 
  have cookies enabled?
 
  - --
 
  Nick Wilson
 
  Tel: +45 3325 0688
  Fax: +45 3325 0677
  Web: www.explodingnet.com
 
 
 
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.0.6 (GNU/Linux)
 
  iD8DBQE8TnW3HpvrrTa6L5oRAthOAJ0WOpUWC5fFMokhYF2QsaQaQolp+wCfQWHL
  03BrqRN2kLf+VWC/tzDSHho=
  =Gek0
  -END PGP SIGNATURE-
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, 

Re: [PHP] Increment help..please

2002-01-24 Thread Tyler Longren

Why don't you just set auto_increment on the id field in the database table?

Tyler

- Original Message -
From: will hives [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 1:43 PM
Subject: [PHP] Increment help..please


 please help I'm a newb and this is really messing with my head. All I want
 to know is what do I need to add to this script to allow it to increment
the
 ID number. pleasee.
 thank you very much for a simple boy

 Will
 ?

 $db_name = altone;

 $table_name = author;



 $connection = @mysql_connect(www.myserver.net, test, will) or die
 (couldn't connect.);

 $db = @mysql_select_db($db_name, $connection) or die (couldn't select
 database.);

 $sql = INSERT INTO $table_name (id, name, email, picture_name)
 VALUES ('$id', '$name', '$email', '$picture_name') ;

 $result = @mysql_query($sql, $connection) or die (couldn't execute
query);





 if ($picture != ) {


 move_uploaded_file($picture, /home/mine/yep/php/$picture_name);


 }




 ?


 html
 head
 titlemy contact management system: add a contact/title
 /head
 body

 table cellspace=3 cellpadding=5
 tr
 thName  email information/th
 th /th
 /tr
 tr
 td valign=top

 pstongfont size=-2 face=Verdana, Arial, Helvetica,
 sans-serifname:/fontbr
 ? echo $table_name; ?br
 ? echo $name; ?br
 ? echo $id; ?
 /p
 pstongfont size=-2 face=Verdana, Arial, Helvetica,
 sans-serifemail:/fontbr? echo $email; ?

 br
 /p
 font size=-2 face=Verdana, Arial, Helvetica, sans-serifFile
 to Upload:/fontbr
 img src=? echo http://www.myserver.net/php/$picture_name;; ?
 pstong/p
 /td
 td valign=top /td
 /tr
 tr
 td align=center colspan=2
 div align=leftbr
 /div
 p align=left
 input type=submit name=submit value=add to contact system
 /p
 div align=left/div
 /td
 /tr
 /table
 /body
 /html


 Cheers
 Will


 --
 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] Increment help..please

2002-01-24 Thread Jason Bell

In your database, make the ID column AUTO_INCREMENT, and then simply don't
specify a value for it when you insert.

- Original Message -
From: will hives [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 11:43 AM
Subject: [PHP] Increment help..please


 please help I'm a newb and this is really messing with my head. All I want
 to know is what do I need to add to this script to allow it to increment
the
 ID number. pleasee.
 thank you very much for a simple boy

 Will
 ?

 $db_name = altone;

 $table_name = author;



 $connection = @mysql_connect(www.myserver.net, test, will) or die
 (couldn't connect.);

 $db = @mysql_select_db($db_name, $connection) or die (couldn't select
 database.);

 $sql = INSERT INTO $table_name (id, name, email, picture_name)
 VALUES ('$id', '$name', '$email', '$picture_name') ;

 $result = @mysql_query($sql, $connection) or die (couldn't execute
query);





 if ($picture != ) {


 move_uploaded_file($picture, /home/mine/yep/php/$picture_name);


 }




 ?


 html
 head
 titlemy contact management system: add a contact/title
 /head
 body

 table cellspace=3 cellpadding=5
 tr
 thName  email information/th
 th /th
 /tr
 tr
 td valign=top

 pstongfont size=-2 face=Verdana, Arial, Helvetica,
 sans-serifname:/fontbr
 ? echo $table_name; ?br
 ? echo $name; ?br
 ? echo $id; ?
 /p
 pstongfont size=-2 face=Verdana, Arial, Helvetica,
 sans-serifemail:/fontbr? echo $email; ?

 br
 /p
 font size=-2 face=Verdana, Arial, Helvetica, sans-serifFile
 to Upload:/fontbr
 img src=? echo http://www.myserver.net/php/$picture_name;; ?
 pstong/p
 /td
 td valign=top /td
 /tr
 tr
 td align=center colspan=2
 div align=leftbr
 /div
 p align=left
 input type=submit name=submit value=add to contact system
 /p
 div align=left/div
 /td
 /tr
 /table
 /body
 /html


 Cheers
 Will


 --
 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] Increment help..please

2002-01-24 Thread Dennis Moore

All you need to do is the set the field type for the id similar to :

ID smallint not null primary key auto_increment

you do not need to refer to ID in your insert statement.

/dkm

- Original Message -
From: will hives [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 2:43 PM
Subject: [PHP] Increment help..please


 please help I'm a newb and this is really messing with my head. All I want
 to know is what do I need to add to this script to allow it to increment
the
 ID number. pleasee.
 thank you very much for a simple boy

 Will
 ?

 $db_name = altone;

 $table_name = author;



 $connection = @mysql_connect(www.myserver.net, test, will) or die
 (couldn't connect.);

 $db = @mysql_select_db($db_name, $connection) or die (couldn't select
 database.);

 $sql = INSERT INTO $table_name (id, name, email, picture_name)
 VALUES ('$id', '$name', '$email', '$picture_name') ;

 $result = @mysql_query($sql, $connection) or die (couldn't execute
query);





 if ($picture != ) {


 move_uploaded_file($picture, /home/mine/yep/php/$picture_name);


 }




 ?


 html
 head
 titlemy contact management system: add a contact/title
 /head
 body

 table cellspace=3 cellpadding=5
 tr
 thName  email information/th
 th /th
 /tr
 tr
 td valign=top

 pstongfont size=-2 face=Verdana, Arial, Helvetica,
 sans-serifname:/fontbr
 ? echo $table_name; ?br
 ? echo $name; ?br
 ? echo $id; ?
 /p
 pstongfont size=-2 face=Verdana, Arial, Helvetica,
 sans-serifemail:/fontbr? echo $email; ?

 br
 /p
 font size=-2 face=Verdana, Arial, Helvetica, sans-serifFile
 to Upload:/fontbr
 img src=? echo http://www.myserver.net/php/$picture_name;; ?
 pstong/p
 /td
 td valign=top /td
 /tr
 tr
 td align=center colspan=2
 div align=leftbr
 /div
 p align=left
 input type=submit name=submit value=add to contact system
 /p
 div align=left/div
 /td
 /tr
 /table
 /body
 /html


 Cheers
 Will


 --
 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] Executing files?

2002-01-24 Thread Dennis Moore

All you need to do is the edit the php application type in your httpd.conf
file if you want to apply globally or insert a .htaccess file in the
directory you want to apply the change.

AddType application/x-httpd-php .php .waw-file

/dkm





- Original Message -
From: Mårten Andersson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 24, 2002 2:19 PM
Subject: [PHP] Executing files?


 Hello.

 I want to execute a .waw-file with PHP, I's there any way to do this? I'm
 almost sure I've read how to do this somewhere in the documentation i
 PHP.net, but I can't find it now..

 Does anyone know how to do this?



 --
 Mårten Andersson
 Loddbygatan 2
 60218 Norrköping

 URL: http://www.vanvett.net/marten
 email: [EMAIL PROTECTED]
 ICQ: 86515830


 _
 Chatta med vänner online, prova MSN Messenger: http://messenger.msn.se


 --
 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] Increment help..please

2002-01-24 Thread will hives

I did that with this script and it works fine, but the reason I am doing it
is so I can then give the image which is uploaded the story ID. But for some
reason I can't get it to work... here is the auto_increment script any ideas
of how to add the ID to the image?? I would be very great ful if you
could amend the script (as I am a newb I can work things out once they have
been done if that makes any sense)

cheers will
?

$db_name = main;

$table_name = main;



$connection = @mysql_connect(www.main.net, main, main) or die
(couldn't connect.);

$db = @mysql_select_db($db_name, $connection) or die (couldn't select
database.);

$sql = INSERT INTO $table_name (id, name, email, picture_name)
VALUES ('$id', '$name', '$email', '$picture_name') ;

$result = @mysql_query($sql, $connection) or die (couldn't execute query);








if ($picture != ) {


 move_uploaded_file($picture, /home/main/main/main/$picture_name);


}



? 


html
head
titlemy contact management system: add a contact/title
/head
body

  table cellspace=3 cellpadding=5
tr 
  thName  email information/th
  thnbsp;/th
/tr
tr 
  td valign=top
pstongfont size=-2 face=Verdana, Arial, Helvetica,
sans-serifname:/fontbr
? echo $table_name; ?
  ? echo $name; ?
/p
pstongfont size=-2 face=Verdana, Arial, Helvetica,
sans-serifemail:/fontbr? echo $email; ?
  
  br
/p
font size=-2 face=Verdana, Arial, Helvetica, sans-serifFile
to Upload:/fontbr
  img src=? echo http://www.main.net/images/$picture_name;; ?
  pstong/p
  /td
  td valign=topnbsp;/td
/tr
tr 
  td align=center colspan=2
div align=leftbr
/div
p align=left
  input type=submit name=submit value=add to contact system
/p
div align=left/div
/td
/tr
  /table
/body
/html 


in article 004501c1a511$642b4930$a023b1cf@win2k, Tyler Longren at
[EMAIL PROTECTED] wrote on 24/1/02 7:57 pm:

 Why don't you just set auto_increment on the id field in the database table?
 
 Tyler
 
 - Original Message -
 From: will hives [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, January 24, 2002 1:43 PM
 Subject: [PHP] Increment help..please
 
 
 please help I'm a newb and this is really messing with my head. All I want
 to know is what do I need to add to this script to allow it to increment
 the
 ID number. pleasee.
 thank you very much for a simple boy
 
 Will
 ?
 
 $db_name = altone;
 
 $table_name = author;
 
 
 
 $connection = @mysql_connect(www.myserver.net, test, will) or die
 (couldn't connect.);
 
 $db = @mysql_select_db($db_name, $connection) or die (couldn't select
 database.);
 
 $sql = INSERT INTO $table_name (id, name, email, picture_name)
 VALUES ('$id', '$name', '$email', '$picture_name') ;
 
 $result = @mysql_query($sql, $connection) or die (couldn't execute
 query);
 
 
 
 
 
 if ($picture != ) {
 
 
 move_uploaded_file($picture, /home/mine/yep/php/$picture_name);
 
 
 }
 
 
 
 
 ?
 
 
 html
 head
 titlemy contact management system: add a contact/title
 /head
 body
 
 table cellspace=3 cellpadding=5
 tr
 thName  email information/th
 th /th
 /tr
 tr
 td valign=top
 
 pstongfont size=-2 face=Verdana, Arial, Helvetica,
 sans-serifname:/fontbr
 ? echo $table_name; ?br
 ? echo $name; ?br
 ? echo $id; ?
 /p
 pstongfont size=-2 face=Verdana, Arial, Helvetica,
 sans-serifemail:/fontbr? echo $email; ?
 
 br
 /p
 font size=-2 face=Verdana, Arial, Helvetica, sans-serifFile
 to Upload:/fontbr
 img src=? echo http://www.myserver.net/php/$picture_name;; ?
 pstong/p
 /td
 td valign=top /td
 /tr
 tr
 td align=center colspan=2
 div align=leftbr
 /div
 p align=left
 input type=submit name=submit value=add to contact system
 /p
 div align=left/div
 /td
 /tr
 /table
 /body
 /html
 
 
 Cheers
 Will
 
 
 --
 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] session problem Warning: open(/tmp\sess_..., O_RDWR) failed: m (2)

2002-01-24 Thread Freddy

I am getting the folloing error whenever I try to open a session.
Warning: open(/tmp\sess_0929ece4254c982def371c8f1ccd8164, O_RDWR) failed: m (2)
It seems like a permissions issue to me but I do not know where to look for
addressing the problem. I am using apache on win2k.
 Thanks,
 Frederic


-- 
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] session problem Warning: open(/tmp\sess_..., O_RDWR) failed: m (2)

2002-01-24 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Freddy blurted
 I am getting the folloing error whenever I try to open a session.
 Warning: open(/tmp\sess_0929ece4254c982def371c8f1ccd8164, O_RDWR) failed: m (2)
 It seems like a permissions issue to me but I do not know where to look for
 addressing the problem. I am using apache on win2k.

Win2k doesn't /have/ permissions. Does it?
Check in your php.ini for (i think) the session_save_path or something
very similar. I'll bet /tmp doesn't exist on your machine and you just
need to put a path liek C:\\Windows\temp or something.
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UG43HpvrrTa6L5oRAmTRAJ9DMZMNu54HgIuf6t7tbxZSDSS/9wCgmvRM
TiZKEvsXZvV4MvW6mAsY8rg=
=P7KG
-END PGP SIGNATURE-

-- 
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] Dual Pentium Pro 200 vs. Single Pentium II 450

2002-01-24 Thread Phil Schwarzmann

I have two PCs, one is a Dual Pentium Pro 200Mhz and the other is a
Pentium II 450Mhz (both have 64MB)
 
I want to set one of them up using Linux Red Hat 7.2, Apache, MySQL,
and PHP.  I only plan to have about 1-3 users accessing it at any one
time.
 
Which of those CPUs do you think is better?  Will Linux take full
advantage of those Dual Processors?
 
Thanks for your advice!



[PHP] Re: Dual Pentium Pro 200 vs. Single Pentium II 450

2002-01-24 Thread Mike Frazer

For such a small userload it doesn't matter.  I'm working on a day-to-day
basis with a local ISP to help get everything running at tip-top shape and
right now he's running his main hosting server on a single p200, his
firewall on a p75 and his primary nameserver on a 486 100.  No holdups in
the system anywhere, and his userload at any one time on any of those
systems is higher than what you expect by far.  The biggest concern is to
get the systems set up properly, like configuring Apache and PHP.  Those two
will suck of RAM if you aren't careful, not to mention CPU resources.

Mike Frazer



Phil Schwarzmann [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have two PCs, one is a Dual Pentium Pro 200Mhz and the other is a
 Pentium II 450Mhz (both have 64MB)

 I want to set one of them up using Linux Red Hat 7.2, Apache, MySQL,
 and PHP.  I only plan to have about 1-3 users accessing it at any one
 time.

 Which of those CPUs do you think is better?  Will Linux take full
 advantage of those Dual Processors?

 Thanks for your advice!




-- 
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] directory structure list

2002-01-24 Thread sean

Hello,

I need to print out a list of directories, which is a piece of cake, just do something 
out of the manual:
?php
$handle = opendir('.');
while (false != ($file = readdir($handle))) {
if ( ($file != .)  ($file != ..)  (is_dir ($file)) )
echo li$file/li\n;
}
closedir($handle);
?

The thing is, I need the sub-directories, and the sub-directories under them... ad 
infinitum in a list format. 
i.e.
*Dir1
  *SubDir1of1
  *SubDir2of1
*Dir2
  *SubDir1of2
*SubSubDir1of2
... etc.

There are some truly great php applications for this, such as:
http://freshmeat.net/projects/phpmyexplorer/
But it's way ahead of what I need.

Any crafty suggestions?

Thanks for any input,

Sean




-- 
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]




  1   2   >