Re: [PHP] Strange array access problem

2005-10-25 Thread Ken Tozier
Got it working. Thanks for all your help Rob. Ken -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Strange array access problem

2005-10-25 Thread Robert Cummings
> On Wed, 2005-10-26 at 00:28, Ken Tozier wrote: > > I'm having a major problem with what seems, on it's face, to be a > > really basic array function. > > > > What happens is on the browser end, I've written some javascript code > > that packages up javascript variables in native PHP format a

Re: [PHP] Java editor

2005-10-25 Thread Angelo Zanetti
also check out solmetra.com I think, not sure if its open source... HTH John Taylor-Johnston wrote: Is there a OS java (or other) html editor I can implement on a Web page. I want a user to type text, use bold, italics, etc. I would then store the html in a MySQl record and then use php to ins

Re: [PHP] Strange array access problem

2005-10-25 Thread Ken Tozier
Rob , Very helpful, Thanks! I'll try to rewrite the serializer on the javascript end to encode integer keys as integers. Ken On Oct 26, 2005, at 1:23 AM, Robert Cummings wrote: On Wed, 2005-10-26 at 01:06, Robert Cummings wrote: I did some more investigating. Your problem appears to b

[PHP] fopen

2005-10-25 Thread John Taylor-Johnston
It does what I want, but I worry 4096 may not be big enough. Possible? Is there a way to detect the filesize and insert a value for 4096? $buffer = fgets($dataFile, $filesize); Is this what it is for? John http://ca3.php.net/fopen $filename = "/var/www/html2/assets/about.htm" ; $dataFile = fope

Re: [PHP] Strange array access problem

2005-10-25 Thread Robert Cummings
On Wed, 2005-10-26 at 01:06, Robert Cummings wrote: > > I did some more investigating. Your problem appears to be PHP5 specific. > I manually created the serialize string I assumed you had, but PHP4 was > smarter than me and auto converted the string key to an integer once > again; however, PHP5 fo

Re: [PHP] fopen

2005-10-25 Thread Joe Wollard
On Oct 26, 2005, at 12:54 AM, John Taylor-Johnston wrote: It does what I want, but I worry 4096 may not be big enough. Possible? Is there a way to detect the filesize and insert a value for 4096? $buffer = fgets($dataFile, $filesize); Is this what it is for? John http://ca3.php.net/fopen

Re: [PHP] create HTML page on the fly

2005-10-25 Thread Angelo Zanetti
Hi Miles. Well the system that I wrote generates HTML newsletters using templates etc... and before the newsletter is sent out it has to go to moderators for approval.So a moderator will have a link in his email received and it will point to the newsletter in HTML format, also it is needed so

Re: [PHP] fopen

2005-10-25 Thread Stephen Leaf
if all you want to do is read the entire file try $contents = file_get_contents($filename); On Tuesday 25 October 2005 11:54 pm, John Taylor-Johnston wrote: > It does what I want, but I worry 4096 may not be big enough. Possible? > Is there a way to detect the filesize and insert a value for 4096?

Re: [PHP] Strange array access problem

2005-10-25 Thread Robert Cummings
On Wed, 2005-10-26 at 00:28, Ken Tozier wrote: > I'm having a major problem with what seems, on it's face, to be a > really basic array function. > > What happens is on the browser end, I've written some javascript code > that packages up javascript variables in native PHP format and sends >

[PHP] Strange array access problem

2005-10-25 Thread Ken Tozier
I'm having a major problem with what seems, on it's face, to be a really basic array function. What happens is on the browser end, I've written some javascript code that packages up javascript variables in native PHP format and sends the packed variables to a PHP script on the server via a

RE: [PHP] Re: cURL to re-post form iinformation - SOLVED SORTA

2005-10-25 Thread Jay Blanchard
[snip] > Now, this works OK...save for one little problem that I cannot seem to > figure out. The URL now reads > >http://TEST20051010/NameOfProcessingScript.php instead of > FMSRegister.php. [/snip] I kinda' solved this, but not reallyit was more of a mental adjustment. FMSRegister.ph

Re: [PHP] PDF printing under windows.

2005-10-25 Thread tg-php
This is really dumb and overly simple, which is probably why it was missed/not brought up, but it just occurred to me that, assuming you have a browser-based interface to your app, why don't you just send the PDF to the browser for printing? Then it should use the Acrobat Reader plugin to open

RE: [PHP] GUID or any other unique IDs

2005-10-25 Thread Jasper Bryant-Greene
On Tue, 2005-10-25 at 14:47 +0400, Denis Gerasimov wrote: > > $unique_id = sha1( uniqid( mt_rand(), true ) ); > > > > which should be very unique and suitable for most purposes. > > I really need millions of unique IDs - hashing is not suitable for this task > (I think so) :-(. Any more ideas? T

Re: [PHP] Re: Help with a regular expression for 0,1 or 2 decimal places

2005-10-25 Thread John Nichel
Phillip Oertel wrote: hi, i'm not a regex guru myself, but the following regex should work - tabke a look at my regex test setup ... Escape the decimal point. $regex = '/^\d+(\.\d{1,2})?$/'; -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (

Re: [PHP] Re: Help with a regular expression for 0,1 or 2 decimal places

2005-10-25 Thread Florent Monnier
Phillip Oertel a écrit : > hi, > > i'm not a regex guru myself, but the following regex should work - tabke > a look at my regex test setup ... > > > $test = array( > "1", > "1.", > "1.2", > "1.23", > "1.234", > > "1234", > "1234.", > "1234.5", > "1234.56", >

[PHP] Re: cURL to re-post form iinformation

2005-10-25 Thread Al
Jay Blanchard wrote: Howdy all, I am trying a new technique, for me, when processing a form. The form is filled out and submitted, during processing it is determined that there is an error with the posted data...such as a blank or mismatched password, I want to return the form with the data fill

[PHP] Re: Help with a regular expression for 0,1 or 2 decimal places

2005-10-25 Thread Phillip Oertel
hi, i'm not a regex guru myself, but the following regex should work - tabke a look at my regex test setup ... \n"; } ?> i don't think there's a difference between \d and [0-9], but again, i am no expert ... regards, phillip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP] SMTP & PHP: Spam Tagging Problem

2005-10-25 Thread Richard Lynch
On Tue, October 25, 2005 3:27 am, Cabbar Duzayak wrote: > I am having a problem with my system when sending e-mails to yahoo > accounts, and it has been baffling me for the last couple of days, > actually I should say it is driving me crazy... > > As I mentioned, I have a cpanel and have 2 domains/

Re: [PHP] GUID or any other unique IDs

2005-10-25 Thread Richard Lynch
On Tue, October 25, 2005 4:01 am, Denis Gerasimov wrote: > I am in a need of GUID generator but it seems that PHP doesn't have > this as > a built-in feature. There is some discussion here you may find useful: http://www.php.net/uniqid > I really need "true" unique identifiers - md5() hash is no

RE: [PHP] cURL to re-post form iinformation

2005-10-25 Thread Jay Blanchard
[snip] I don't think cURL is the right weapon to keep form/content separate from processing... [/snip] It may not be, but it was a thought. As they say, there is more than one way to skin a cat. In this case I was hoping to save a trip to a database or flat file so that the URL wouldn't have to be

RE: [PHP] cURL to re-post form iinformation

2005-10-25 Thread Richard Lynch
On Tue, October 25, 2005 11:40 am, Jay Blanchard wrote: > [snip] > If you want their browser to surf there, you have to send "Location: " > headers, and you'd need to include whatever GET parameters you could > to make the request come out like you want, but, at that point, > there's not much reaso

[PHP] Re: ICQ

2005-10-25 Thread Michelle Konzack
Hello John, Am 2005-10-12 13:13:49, schrieb John Hinton: > Al Hafoudh wrote: > > >is it possible to connect to icq, send messages and etc? thanx > > > I looked all over that place for such a function some time back. I did > find several, but all were very old. The problem was they were all base

RE: [PHP] cURL to re-post form iinformation

2005-10-25 Thread Jay Blanchard
[snip] If you want their browser to surf there, you have to send "Location: " headers, and you'd need to include whatever GET parameters you could to make the request come out like you want, but, at that point, there's not much reason for cURL to be involved... [/snip] I wanted to avoid using GET

Re: [PHP] cURL to re-post form iinformation

2005-10-25 Thread Richard Lynch
On Tue, October 25, 2005 8:36 am, Jay Blanchard wrote: > I am trying a new technique, for me, when processing a form. The form > is > filled out and submitted, during processing it is determined that > there is > an error with the posted data...such as a blank or mismatched > password, > I want to

Re: [PHP] create HTML page on the fly

2005-10-25 Thread Miles Thompson
At 10:26 PM 10/25/2005, Angelo Zanetti wrote: Hi guys. I've created a small newsletter application and the content of the newsletter is stored in a DB (the HTML). However once the newsletter is complete and the user clicks a button I want the newsletter/html file to be created on the server

Re: [PHP] PDF printing under windows.

2005-10-25 Thread Dave Lists
[EMAIL PROTECTED] wrote: Two (and a half) things: 1. Even though DOS/Windows machines don't have, specifically, /dev/printer or /dev/lpr or whatever the *nix specific is, it does have a LPTx: device According to the page listed below, it may be possible to do: copy /b filename LPTx The /b in

Re: [PHP] create HTML page on the fly

2005-10-25 Thread David Tulloh
Angelo Zanetti wrote: > ... > > I assume that I will use fwrite() to add the HTML to the file, I need to > know how to actually create the file before adding the content to it. > You need to open the file before you can write to it, you do that using fopen(). You can choose to create a file or

Re: [PHP] create HTML page on the fly

2005-10-25 Thread Angelo Zanetti
thanks guys, bruce's answer was what I was looking for. regards Angelo David Tulloh wrote: Angelo Zanetti wrote: ... I assume that I will use fwrite() to add the HTML to the file, I need to know how to actually create the file before adding the content to it. You need to open the file b

RE: [PHP] PDF printing under windows.

2005-10-25 Thread Finner, Doug
Not sure how this might work in PHP, but there is something called WSH (go to MS and poke around) that gives you access to a ton of really interesting Windows bits and pieces. The following is a script I run in Lotus Notes (LotusScript is rather like VBA) and it allows you to set the default print

Re: [PHP] create HTML page on the fly

2005-10-25 Thread Adrian Bruce
I think you can use a different handle when using fwrite() which will make php create a file if one is not already there: something like if ($fp = fopen($file,"x+")){ echo"opened"; } fwrite($fp,$content); fclose($fp); Ade Angelo Zanetti wrote: Hi guys. I've created a small

Re: [PHP] php Slow with Mac OS X 10.4

2005-10-25 Thread Nicolas Ross
Still, with fs_usage PID, I get more the 57k lines of stuff... I've found another tool that is more appropriate to monitor system calls : sc_usage. This tool gave me this : = httpd 5 preemptions7 context switches1 thread 08:45:51 0 faults

[PHP] create HTML page on the fly

2005-10-25 Thread Angelo Zanetti
Hi guys. I've created a small newsletter application and the content of the newsletter is stored in a DB (the HTML). However once the newsletter is complete and the user clicks a button I want the newsletter/html file to be created on the server. How do I go about this? I assume that I wi

Re: [PHP] PDF printing under windows.

2005-10-25 Thread tg-php
Two (and a half) things: 1. Even though DOS/Windows machines don't have, specifically, /dev/printer or /dev/lpr or whatever the *nix specific is, it does have a LPTx: device According to the page listed below, it may be possible to do: copy /b filename LPTx The /b indicates it's a binary file.

Re: [PHP] How to protect a php script that sends variables to itself

2005-10-25 Thread Graham Anderson
thanks, Richard :) The simplest solution is usually the best As you suggested, I used php to created a 'log in' movie which upon authentication loads the playlist of movies Also, as you suggested, I think I'll create a session id with a master password, can see everything, and a 'movie spe

RE: [PHP] How to read word document by php script

2005-10-25 Thread Jay Blanchard
[snip] How can I read data from word document (*.doc) use by php script ? I konw only how to write and how to open word document. [/snip] http://www.php.net/com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: How to read word document by php script

2005-10-25 Thread Oliver Grätz
Roman Duriancik schrieb: > How can I read data from word document (*.doc) use by php script ? > I konw only how to write and how to open word document. Convert the .doc to a .txt document before opening it with PHP. There are external tools available to do this but I won't do the searching for y

[PHP] How to read word document by php script

2005-10-25 Thread Roman Duriancik
How can I read data from word document (*.doc) use by php script ? I konw only how to write and how to open word document. Thanks roman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PDF printing under windows.

2005-10-25 Thread Dave Lists
Richard Lynch wrote: On Mon, October 24, 2005 1:48 pm, Dave Lists wrote: I'm generating PDFs under windows using PDFlib and all is easy. What I am wondering though, and google reveals nothing usefull, can I print the PDF to a network printer from windows? I'm presuming to print the file I wo

[PHP] cURL to re-post form iinformation

2005-10-25 Thread Jay Blanchard
Howdy all, I am trying a new technique, for me, when processing a form. The form is filled out and submitted, during processing it is determined that there is an error with the posted data...such as a blank or mismatched password, I want to return the form with the data filled out using curlas

Re: [PHP] selected index

2005-10-25 Thread Sascha Braun
Hi, just take a look at this function: http://www.php.net/manual/en/function.array-keys.php __ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 -- PHP General Mailing

Re: [PHP] GUID or any other unique IDs

2005-10-25 Thread Ben Litton
While not ideal, you could do a select on a db. MS SQL and MySQL both have functions to generate unique id's and I imagine the other databases do as well. While running a "SELECT uuid()" and hitting the database for each one of these things is annoying, it is one possible pseudo-solution. O

[PHP] Re: GUID or any other unique IDs

2005-10-25 Thread Rosty Kerei
I would use simple auto_increment DB's feature.. Sincerely, Rosty Kerei <[EMAIL PROTECTED]> ""Denis Gerasimov"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello list, > > > > I am in a need of GUID generator but it seems that PHP doesn't have this > as > a built-in feature. >

[PHP] Re: selected index

2005-10-25 Thread Al
Ross wrote: Hi, I have an array $people= array ("ross", "bob", "chris") I have a variable $selected_person = "chris" I want to do the find out the index of the $selected_person in the $people array. Is there a function that can do this?? ta, Ross It appears you are learning php. I

Re: [PHP] php 5.0.5 segfaults apache2 on ubuntu, 5.0.4 ok

2005-10-25 Thread Petr Smith
I just found this is known bug and was already fixed in CVS. http://bugs.php.net/bug.php?id=34450&edit=2 thanks to all! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: selected index

2005-10-25 Thread Rosty Kerei
try array_search() Sincerely, Rosty Kerei <[EMAIL PROTECTED]> ""Ross"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have an array > > $people= array ("ross", "bob", "chris") > I have a variable > > $selected_person = "chris" > > > > I want to do the find out the index

Re: [PHP] Re: Email Validation built-in? RFC

2005-10-25 Thread Robin Vickery
On 10/25/05, Mark Charette <[EMAIL PROTECTED]> wrote: > Ben Litton wrote: > > > You could certainly write an extension to do so. That's what I did > > (mostly I was writing one for another purpose and added a function I > > stole from O'Reilly. > > As you stated in your article, it isn't rfc822 c

RE: [PHP] Problem reading SimpleXML array NOT SOLVED but NO LONGER A PROBLEM

2005-10-25 Thread George Pitcher
Hi, Got round the problem by doing this instead: $param = array( 'country1' => 'uk', 'country2' => 'usa' ); $wsdl="http://www.xmethods.net/sd/2001/CurrencyExchangeService.wsdl";; $curr_client = new nusoapclient($wsdl, 'wsdl'); $rate = $curr_client->call('getRate' ,$param); The en

Re: [PHP] Re: Email Validation built-in? RFC

2005-10-25 Thread Robin Vickery
On 10/24/05, Manuel Lemos <[EMAIL PROTECTED]> wrote: > on 10/23/2005 07:21 PM Robin Vickery said the following: > >> > >>> ... would it not make sense for there to be a BUILT-IN PHP function of > >>> a TRUE email syntactic validation? > >> I don't see that being much better than passing a good regu

RE: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-25 Thread Jay Blanchard
[snip] This before or after you switched to Apache?... [/snip] Before...the switch to Apache solved many, many problems. [snip - for informational purposes] Can you surf to a static page? Can you surf to a static page in the same directory as the PHP page? PHP CGI or Service/Module? Anything i

Re: [PHP] selected index

2005-10-25 Thread Adrian Bruce
dont know of a function but this should work $size = count($array); for($i=0;$i<$size;$i++){ if($selected_person == $array[$i]){ echo"index: $i"; } } Adrian Ross wrote: Hi, I have an array $people= array ("ross", "bob", "chris") I have a variable $selected_person = "chris"

Re: [PHP] how to display GD graphic in web page

2005-10-25 Thread Chris
Thanks for the detailed explanation. I should have expanded further on my design goals though. I initiated my examination of this problem when I tried to generate my "on-the-fly" images with a class method like: // on_the_fly.php class on_the_fly { function on_the_fly() { } function a_graphic(

[PHP] selected index

2005-10-25 Thread Ross
Hi, I have an array $people= array ("ross", "bob", "chris") I have a variable $selected_person = "chris" I want to do the find out the index of the $selected_person in the $people array. Is there a function that can do this?? ta, Ross -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] Re: cleanly written shop-system (php5, object-oriented)?

2005-10-25 Thread Jochem Maas
James Benson wrote: Bad choice of words. I was comparing PHP4 to PHP5 and how long PHP4 has been around compared to PHP5, it's bound to be more stable aint it? is it. probably , yes, but not by definition. you can say that php4 has had more coverage which probably means it contains less bugs

RE: [PHP] GUID or any other unique IDs

2005-10-25 Thread Denis Gerasimov
Hello Jasper, > $unique_id = sha1( uniqid( mt_rand(), true ) ); > > which should be very unique and suitable for most purposes. I really need millions of unique IDs - hashing is not suitable for this task (I think so) :-(. Any more ideas? Is there a PHP extension or an external library for gene

Re: [PHP] GUID or any other unique IDs

2005-10-25 Thread Jasper Bryant-Greene
On Tue, 2005-10-25 at 13:01 +0400, Denis Gerasimov wrote: > I am in a need of GUID generator but it seems that PHP doesn't have this as > a built-in feature. > > I looked at http://pear.php.net and > http://pecl.php.net but found nothing suitable > t

Re: [PHP] GUID or any other unique IDs

2005-10-25 Thread Richard Davey
Hi Denis, Tuesday, October 25, 2005, 10:01:48 AM, you wrote: > I am in a need of GUID generator but it seems that PHP doesn't have > this as a built-in feature. uniqid() ? Bearing in mind of course that no unique ID generator can ever be 100% unique unless it keeps a record of previously genera

[PHP] SMTP & PHP: Spam Tagging Problem

2005-10-25 Thread Cabbar Duzayak
Hi, I am having a problem with my system when sending e-mails to yahoo accounts, and it has been baffling me for the last couple of days, actually I should say it is driving me crazy... As I mentioned, I have a cpanel and have 2 domains/sites with dedicated IP addresses on my system. The base acc