[PHP] Re: test for ascii or binary string

2002-11-30 Thread Paul Chvostek
On Fri, Nov 29, 2002 at 10:27:05PM -0600, Jonathan Sharp wrote: Is there a way to determine if a string has ascii or binary data in it? You could always see if it matches a regular expression that represents the ascii range you're considering. I.e., ereg('[^a-zA-Z0-9]',$string) will return

[PHP] Re: Hello ! How to write a programme in PHP which executes a routine at a given time ?

2002-11-30 Thread Paul Chvostek
PHP itself does not have any facility for running things according to a schedule in the way you describe. It looks like you need to run some additional software using cron (or your operating system's equivalent). Unix systems have a command called at which can be used to execute things at

[PHP] Re: Multidimensional array

2002-11-30 Thread Paul Chvostek
A multidimensional array is just an array whose values are themselves arrays. So ... $thing=2002-11; // or whatever $issue=array(); $issue[$thing]=array(); $issue[$thing]['number']=this; $issue[$thing]['headline']=that; And if you ksort($issue), the key/value associations will be maintained;

Re: [PHP] OpenSSL Encryption to a browser.

2002-11-30 Thread Tony Earnshaw
fre, 2002-11-29 kl. 12:50 skrev Comunica2 s. coop.: I would like to use OpenSSL to send encrypted information to a browser. The information would be encrypted to a public key that has its private counterpart installed in the browser. The idea is that the information would be decrypted

php-general Digest 30 Nov 2002 12:31:53 -0000 Issue 1735

2002-11-30 Thread php-general-digest-help
php-general Digest 30 Nov 2002 12:31:53 - Issue 1735 Topics (messages 126506 through 126526): Method for displaying downline 126506 by: Daren Cotter 126510 by: Daren Cotter 126512 by: Daren Cotter Re: How Do I install php on Apache 2.0 126507 by: -[ Rene

[PHP] Re: Multidimensional arrays (more and more...)

2002-11-30 Thread Paul Chvostek
Well, counting is easy... count($issue) will be correct. If you want to count things that match only specific elements, use things like: $c=0; foreach($issue as $what) if ( $year==2003 $month=5 ) $c++; As I said in the previous email, to sort by array elements, you'd need to

Re: [PHP] test for ascii or binary string

2002-11-30 Thread Beth Gore
Morgan Hughes wrote: On Fri, 29 Nov 2002, Jonathan Sharp wrote: Is there a way to determine if a string has ascii or binary data in it? I just wrote this, it seems to work. I've used mhash to generate a binary string. It will fail if: a) The strings use obscure ASCII control

[PHP] Re: Multidimensional arrays (more and more...)

2002-11-30 Thread Paul Chvostek
On Thu, Nov 28, 2002 at 10:19:38AM -0800, Mako Shark wrote: ... My problem is I need to loop through these. So I can't just assume that the count is count($issue[]) divided by 8, because that won't work in a for loop. I suppose I could just iterate through my for loop in jumps of 8, but that

Re: [PHP] Method for displaying Downline

2002-11-30 Thread Rick Widmer
At 06:47 PM 11/29/02 -0800, Daren Cotter wrote: Must you send three separate requests to the list? One is enough. You might find some useful information here: http://marc.theaimsgroup.com/?l=php-generalm=95423103630080w=2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Method for displaying Downline

2002-11-30 Thread Rick Widmer
IT IS CONSIDERED VERY RUDE TO SPAM THE LIST WITH REPEATED MESSAGES ONE IS ENOUGH!! Yes, I am shouting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] test for ascii or binary string

2002-11-30 Thread Ernest E Vogelsinger
At 13:38 30.11.2002, Beth Gore said: [snip] Add a break statement once you've detected binary, for optimization (binary might be just some length...) ?php function isbinary($input) { /* This simple function returns true if there's any

Re: [PHP] Test links?

2002-11-30 Thread Rob Packer
Well, the reason I didn't do that at first was that I could have done any of the methods that I've tried incorrectly, which is why I figured I'd ask what works and then focus on that method... but, I've tried to ping them, use fopen, and use fsocketopen... but nothing says that I've used any of

[PHP] Quota function

2002-11-30 Thread EdwardSPL
Dear all, How to write a Quota function with php code ? Require : different Server machine, userid and password also Mine is Linux Redhat system... Thank for your help ! Edward. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Quota function

2002-11-30 Thread Jason Wong
On Saturday 30 November 2002 21:47, [EMAIL PROTECTED] wrote: Dear all, How to write a Quota function with php code ? Require : different Server machine, userid and password also Mine is Linux Redhat system... if ($current $quota) { echo Quota exceeded; } IOW please elaborate on what

[PHP] Language codes to textual languages.

2002-11-30 Thread Noodle Snacks
Via $_SERVER['HTTP_ACCEPT_LANGUAGE'] you can get the default language of a browser (usually). Does anyone know of a list that has the conversion from say: en-au to Australia or en-us to U.S.A? -- JJ Harrison [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP] About Speech

2002-11-30 Thread Mark Charette
-Original Message- From: Ing. Raúl González Rodríguez [mailto:[EMAIL PROTECTED]] I need to know if it's possible generate a wav, mid or mp3 file from php. You could write a custom interface to _generate_ the file (MIDI is _very_ different than the other two types; are you sure you

Re: [PHP] Test links?

2002-11-30 Thread Jason Wong
On Saturday 30 November 2002 21:40, Rob Packer wrote: Well, the reason I didn't do that at first was that I could have done any of the methods that I've tried incorrectly, which is why I figured I'd ask what works and then focus on that method... but, I've tried to ping them, use fopen, and

Re: [PHP] Quota function

2002-11-30 Thread EdwardSPL
Jason Wong wrote: On Saturday 30 November 2002 21:47, [EMAIL PROTECTED] wrote: Dear all, How to write a Quota function with php code ? Require : different Server machine, userid and password also Mine is Linux Redhat system... if ($current $quota) { echo Quota exceeded; } IOW

Re: [PHP] How Do I install php on Apache 2.0

2002-11-30 Thread Tweak2x
I got it working, thanks guys. I just Put on Apache 1.0.3 and emaild support. They game me some thing to add into the httpd.conf. My site address is http://tweak2x.yi.org -- [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Adam Voigt, On 27 Nov 2002 11:44:49

Re: [PHP] Quota function

2002-11-30 Thread Michael Sims
On Sat, 30 Nov 2002 23:36:20 +0800, you wrote: There is a php code from Internet, it is enable Quota function with wu-imap server, but I can't run it into my server ( Linux Redhat system ) like There is a mailing list that is specifically for Imp. You'd have better luck getting answers if you

[PHP] Going Mad

2002-11-30 Thread Andy
Can someone please help, i think i am going mad. I have just installed Apache, php and Mysql, it all seems to be fine, the Apache server says it is ok, i think i have set the config file correctly, and Mysql look to be correct, but when i typed the code (My first code) ?php echo this is a php

Re: [PHP] Going Mad

2002-11-30 Thread Chris Hewitt
Andy wrote: ?php echo this is a php line; phpinfo(); ? and save it test.php when i look at it in explorer all i see the preceding html code. hat have i done wrong? I am using windows 2000 pro. It seems as though you have not added the AddType line for php in httpd.conf and restarted Apache.

Re: [PHP] Going Mad

2002-11-30 Thread Phil Driscoll
On Saturday 30 November 2002 5:31 pm, Chris Hewitt wrote: Andy wrote: ?php echo this is a php line; phpinfo(); ? and save it test.php when i look at it in explorer all i see the preceding html code. hat have i done wrong? I am using windows 2000 pro. It seems as though you have not added

Re: [PHP] Going Mad

2002-11-30 Thread Chris Hewitt
Andy Davey wrote: Hi Chris I have added AddType application/x-httpd-php .php to the httpd config file, and restarted it, but still no luck. Andy Hmm. I take it the file you are trying to get at (via http:// as Phil says) has got a php extension? I assume there are no IfModule or Directory

Re: [PHP] Going Mad

2002-11-30 Thread Andy
Chris Hewitt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Andy Davey wrote: Hi Chris I have added AddType application/x-httpd-php .php to the httpd config file, and restarted it, but still no luck. Andy Hmm. I take it the file you are trying to get

Re: [PHP] Going Mad

2002-11-30 Thread Chris Hewitt
Andy Davey wrote: There are two httpd config files, one of which is default, i take it that is the one you edit? I know it is something simple, which is why i cannot se it! There should only be one. I suggest you put some rubbish into one and restart apache. If it does not complain then it is

[PHP] How to override header info in mail()

2002-11-30 Thread Phil Powell
I am using this line: if (!mail($to, $subject, $body, From: . $from . ; . header(Content-type . $contentType))) {..} to use the mail() function in PHP to send simple text/plain or text/html email. However, upon attempting to send I get a warning message indicating that header information

[PHP] last updated ?

2002-11-30 Thread Paul O'Neil
Dumb question here but whats the general practice regarding putting a website last updated: entry on a web page? Does the web master manually enter in today's date in a database table entry and let PHP display. Is it statically added to the HTML page? Etc... -- PHP General Mailing List

Re: [PHP] Test links?

2002-11-30 Thread Rob Packer
Okay, I'm confused... file, fopen, and fsockopen seem to say not found on alot valid URLs... does this look to be correct usage? $url = $row[0]; // just get the url from the db $fp = implode ('', file ($url)); if (!$fp) {echo font color=redbUnable to access file/b/font; } else { fclose($fp);

Re: [PHP] last updated ?

2002-11-30 Thread Beth Gore
Paul O'Neil wrote: Dumb question here but whats the general practice regarding putting a website last updated: entry on a web page? Does the web master manually enter in today's date in a database table entry and let PHP display. Is it statically added to the HTML page? Etc... I've just

[PHP] PHP confirmation window

2002-11-30 Thread Lars Espelid
Hello, Working in php, the problem is how to create a window with some optional text in it and get true or false in return. A confirmation window. Example in javascript: function formSubmit() { window.event.returnValue = false; if (confirm(Er du sikker på at du vil slette boenheten?))

[PHP] Page break

2002-11-30 Thread Lars Espelid
Hello, Is there some way to insert page breaks in a php document so that it becomes more printer friendly. thanks lars -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Test links?

2002-11-30 Thread Jason Wong
On Sunday 01 December 2002 02:06, Rob Packer wrote: Okay, I'm confused... file, fopen, and fsockopen seem to say not found on alot valid URLs... does this look to be correct usage? $url = $row[0]; // just get the url from the db $fp = implode ('', file ($url)); if (!$fp) {echo font

Re: [PHP] Going Mad

2002-11-30 Thread Phil Driscoll
On Saturday 30 November 2002 5:32 pm, Andy Davey wrote: Hi Phil It took me a while to get the local host to show the apache welcome screen, but now that I have I am still unable to see the page, I have the file saved on my desktop, should I have the test.php file saved anywhere else? I

Re: [PHP] How to override header info in mail()

2002-11-30 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, The correct way of doing that is: if (!mail($to, $subject, $body, From: . $from .\r\nContent-type. $contentType)) {..} HTH! ~Paul On Saturday 30 November 2002 12:58 pm, Phil Powell wrote: I am using this line: if (!mail($to, $subject, $body,

Re: [PHP] Going Mad

2002-11-30 Thread Chris Hewitt
Andy wrote: Chris Hewitt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Can i type anything into the file or should it be code, you will have to Yes, anything. If apache does not understand it then it will not start up. Don't put a hash at the beginning of

Re: [PHP] last updated ?

2002-11-30 Thread Chris Hewitt
Paul O'Neil wrote: Dumb question here but whats the general practice regarding putting a website last updated: entry on a web page? Does the web master manually enter in today's date in a database table entry and let PHP display. Is it statically added to the HTML page? Etc... If you want

Re: [PHP] Test links?

2002-11-30 Thread Beth Gore
Rob Packer wrote: Okay, I'm confused... file, fopen, and fsockopen seem to say not found on alot valid URLs... does this look to be correct usage? $url = $row[0]; // just get the url from the db $fp = implode ('', file ($url)); if (!$fp) {echo font color=redbUnable to access file/b/font; } else

[PHP] OS X and cURL Issues

2002-11-30 Thread Weston Houghton
I'm working on getting the following install working under OS 10.2.2: ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/share/man \ --with-apxs=/usr/sbin/apxs \ --with-mysql \ --with-gd=/usr/local \ --with-png-dir=/usr/local \ --with-zlib-dir=/usr/local \

Re: [PHP] Test links?

2002-11-30 Thread Chris Hewitt
Rob Packer wrote: Okay, I'm confused... file, fopen, and fsockopen seem to say not found on alot valid URLs... does this look to be correct usage? $url = $row[0]; // just get the url from the db $fp = implode ('', file ($url)); if (!$fp) {echo font color=redbUnable to access file/b/font; } else

Re: [PHP] PHP confirmation window

2002-11-30 Thread Jason Sheets
If you are wanting to do it on the client side you will need to do it in javascript, not in PHP. If you just want to make a confirmation screen in PHP you just present an intermediate screen between the requested action and completing that action. An example would be: 1. Administrator clicks

Re: [PHP] OS X and cURL Issues

2002-11-30 Thread Sterling Hughes
you need to upgrade the bundled cURL to version 7.9.8 (soon to be 7.10.2), or install a special version of the cURL library for PHP's installation. -Sterling I'm working on getting the following install working under OS 10.2.2: ../configure --prefix=/usr \ --sysconfdir=/etc \

Re: [PHP] Going Mad

2002-11-30 Thread Chris Hewitt
Phil Driscoll wrote: There's your problem. Assuming you haven't messed about too much with the apache config, your php file needs to live inside apache's htdocs directory. Can't remember exactly where that would be on a windows box - something like c:/program files/apache group/apache/htdocs

[PHP] Redirect opening in a new window

2002-11-30 Thread Troy May
Hello, I'm playing with a portal system now and I need to edit a module to redirect to another site/page. I have done this with a header() redirection, but it takes the current window. How can I do this and have it open a new window for the redirect? -- PHP General Mailing List

[PHP] Function passed as argument to function

2002-11-30 Thread Jeffrey B . Ferland
std_layout(Title here, list_writings(poetry)) both std_layout and list_writings are user-defined functions. std_layout() echo's the two arguments that it takes at select points in its execution. I want to the output of list_writings() to be an argument for std_layout(). -Jeff SIG: HUP --

Re: [PHP] Redirect opening in a new window

2002-11-30 Thread Jason Sheets
Look at javascript, you could use javascript to both open a new window and set the location or you could use javascript to open the new window to a PHP script that uses header() to forward the user. Be aware that some users disable javascript completely or just disable new windows to avoid popups

RE: [PHP] Redirect opening in a new window

2002-11-30 Thread Troy May
That easy solution is not so easy for me. This portal system is PHP-Nuke. There's different themes, pages, etc. It would take me 3 weeks to find and edit all the links in a 2000 file directory. I just need to be able to do this from the called module itself, and that would take care of all the

[PHP] Read Files

2002-11-30 Thread Randum Ian
Hi all, I have a directory of files which are split up into sections based on 'full', 'summary' and 'competitions'. This is shown in the filename as follows: ministry-full-6122002.inc I want to be able to search thru the dir looking for all the 'full' files, then sorting them by date and

[PHP] Read Files

2002-11-30 Thread Randum Ian
Hi all, I have a directory of files which are split up into sections based on 'full', 'summary' and 'competitions'. This is shown in the filename as follows: ministry-full-6122002.inc I want to be able to search thru the dir looking for all the 'full' files, then sorting them by date and

Re: [PHP] Function passed as argument to function

2002-11-30 Thread Jason Wong
On Sunday 01 December 2002 03:54, Jeffrey B.Ferland wrote: std_layout(Title here, list_writings(poetry)) both std_layout and list_writings are user-defined functions. std_layout() echo's the two arguments that it takes at select points in its execution. I want to the output of list_writings()

Re: [PHP] Read Files

2002-11-30 Thread Chris Wesley
On Sat, 30 Nov 2002, Randum Ian wrote: I have a directory of files which are split up into sections based on 'full', 'summary' and 'competitions'. This is shown in the filename as follows: ministry-full-6122002.inc I want to be able to search thru the dir looking for all the 'full' files,

Re: [PHP] Function passed as argument to function

2002-11-30 Thread Jeffrey B . Ferland
On Saturday 30 November 2002 03:14 pm, you wrote: On Sunday 01 December 2002 03:54, Jeffrey B.Ferland wrote: std_layout(Title here, list_writings(poetry)) both std_layout and list_writings are user-defined functions. std_layout() echo's the two arguments that it takes at select points in

RE: [PHP] Read Files

2002-11-30 Thread Randum Ian
Thanks a lot Chris that was a great help. The date is in the last part of the filename. In the example I have posted below: Ministry is the name of the club. Full is the type of the content. 6122002 is the date - It is in the form ddmm so the example here is 6th December 2002. Is there a

[PHP] domxml?

2002-11-30 Thread Devin
I am trying to compile PHP 4.3RC2 and enable the domxml library but when I compile PHP it doesn't seem to work? ./configure --with-xml --with-domxml Any ideas? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Read Files

2002-11-30 Thread Randum Ian
Would it just be easier to do it by file last modified date then? -Original Message- From: Jeffrey B.Ferland [mailto:[EMAIL PROTECTED]] Sent: 30 November 2002 21:57 To: Randum Ian Subject: Re: [PHP] Read Files On Saturday 30 November 2002 04:47 pm, you wrote: Thanks a lot Chris that

Re: [PHP] Function passed as argument to function

2002-11-30 Thread Jason Wong
On Sunday 01 December 2002 04:43, Jeffrey B.Ferland wrote: For reference, see http://autocracy.homelinux.org/template.php and http://autocracy.homelinux.org/error.php Unless you have a good reason to do otherwise please post your code here. People would be less inclined to help if they have to

Re: [PHP] Test links?

2002-11-30 Thread Rob Packer
Thanks for the help and suggestions everybody! I think some of my problems stemmed from the affiliate links being redirected and PHP saw that as dead(so to speak)... but I think I got it now. I made another column in the database to note a redirection for ones that the url fails but the $url[host]

Re: [PHP] How to override header info in mail()

2002-11-30 Thread Paul Nicholson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ok, what is on line 13 and on line 104? That error is saying that you have a header() call on line 104 that I don't think should be there(The header command is not used with mail)if it should you'll have to look at output buffering. ~Pauly

php-general Digest 1 Dec 2002 00:36:26 -0000 Issue 1736

2002-11-30 Thread php-general-digest-help
php-general Digest 1 Dec 2002 00:36:26 - Issue 1736 Topics (messages 126527 through 126580): Re: Multidimensional arrays (more and more...) 126527 by: Paul Chvostek 126529 by: Paul Chvostek Re: test for ascii or binary string 126528 by: Beth Gore 126532 by:

Re: [PHP] last updated ?

2002-11-30 Thread Morgan Hughes
Dumb question here but whats the general practice regarding putting a website last updated: entry on a web page? Does the web master manually enter in today's date in a database table entry and let PHP display. Is it statically added to the HTML page? Etc... If you want website last updated

RE: [PHP] Read Files

2002-11-30 Thread Chris Wesley
On Sat, 30 Nov 2002, Randum Ian wrote: Ministry is the name of the club. Full is the type of the content. 6122002 is the date - It is in the form ddmm so the example here is 6th December 2002. Is there a simple way I can just grab the date and sort it by order? Should I change the

[PHP] login_script_help needed.

2002-11-30 Thread Karl James
http://www.ultimatefootballleague.com/Create_Account.phps hey people I was wondering if anyone can tell me why I cant get this script to work. Or do you have an easier one I can use.. Thanks Karl

Re: [PHP] Page break

2002-11-30 Thread Justin French
This is totally not PHP related. There is a page-break: before; (or similar) in CSS, so I suggest you go look around some CSS sites... like the W3.org. Justin on 01/12/02 5:26 AM, Lars Espelid ([EMAIL PROTECTED]) wrote: Hello, Is there some way to insert page breaks in a php document so

Re: [PHP] login_script_help needed.

2002-11-30 Thread Maxim Maletsky
what is on your line 22? -- Maxim Maletsky [EMAIL PROTECTED] On Sat, 30 Nov 2002 20:46:12 -0800 Karl James [EMAIL PROTECTED] wrote: http://www.ultimatefootballleague.com/Create_Account.phps hey people I was wondering if anyone can tell me why I cant get this script to

Re: [PHP] Redirect opening in a new window

2002-11-30 Thread Maxim Maletsky
isn't there an only module you could modify? Do you really need to edit 2000 pages? I am not NUKE fan, but I am sure there is an easier way -- Maxim Maletsky [EMAIL PROTECTED] On Sat, 30 Nov 2002 12:09:33 -0800 Troy May [EMAIL PROTECTED] wrote: That easy solution is not so easy for me. This

[PHP] Problem importing LARGE text file.....

2002-11-30 Thread CDitty
Hello all, I am trying to import a 400 meg pipe delimited text file, but I am having problems. For some reason, it will only read in 320 lines and then it will cause a core dump. I have used this same script to import a 350 meg file with no problems. I have talked with my support and they

Re: [PHP] Test links?

2002-11-30 Thread Hugh Danaher
Not sure how to supress the warning message that PHP automatically does when you haven't got a valid URL though. should be able to surpress errors by adding an * before the result variable *$fp = fopen($linkdata['linkurl'],r); Hope this helps--or even works for this particular problem. Hugh