Re[2]: [PHP] equivalent to perl shift function

2008-05-01 Thread Richard Luckhurst
name to shift, while in perl if the array name is omitted the @_ function list is used. Is ther a php equivalent to the @_ list or how might I use array_shift to achieve the same result as in perl? C> Richard Luckhurst wrote: >> Hi All >> >> I am in the process of porting a

[PHP] equivalent to perl shift function

2008-05-01 Thread Richard Luckhurst
Hi All I am in the process of porting a perl script and I am trying to fin out if there is a php equivalent to the perl shift function? I have been looking at the php manual and google searching so far with no luck. Regards, Richard Luckhurst -- PHP General Mailing

[PHP] Sending data to PS

2008-04-30 Thread Richard Luckhurst
Hi List In Perl it is possible to use the syntax $0 = "$LISTENER: accepting connections on $SERVER_PORT"; to set a meaningful test string for ps. Is such a thing, or anything similar, available for PHP? Regards, Richard Luckhurst -- PHP General Ma

[PHP] preg_replace Question

2008-04-03 Thread Richard Luckhurst
to see if this might be a length issue and then %Amount was just 4 Am I doing something obviously wrong here? I have checked the php manual and I appear to be using preg_replace correctly. Regards, Richard Luckhurst Product Development Exodus Systems - Sydney, Austral

[PHP] Help with preg_replace

2007-11-07 Thread Richard Luckhurst
ml); When I run this I find $html is empty rather than containing the file with the %ResID replaced with the contents of $bookid. I would appreciate any help with my understanding of preg_replace. Regards, Richard Luckhurst Product Development Exodus Systems - Sydney,

Re[2]: [PHP] PHP equivalent to Perl $0

2007-01-31 Thread Richard Luckhurst
te the specification had this thing about ps showing a nice string instead of the program name actually running. Of course I know that this is what ps is supposed to do and Perl allows you to tell nice lies to ps :-) Regards, Richard Luckhurst Product Development Exodus Systems - Sydney, Australia.

[PHP] PHP equivalent to Perl $0

2007-01-31 Thread Richard Luckhurst
or a while and can not see one way or the other if it is possible. Regards, Richard Luckhurst Product Development Exodus Systems - Sydney, Australia. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Regular Expression Problem

2007-01-24 Thread Richard Luckhurst
Hi Jochem, JM> JM> you be needing an ungreedy modifier on yer regex. JM> JM> see here: JM> http://php.net/manual/en/reference.pcre.pattern.modifiers.php RL Thanks very much. That solved my problem and I my now getting exactly what I RL want. I had seen the reference to greedy and ungre

Re[2]: [PHP] Regular Expression Problem

2007-01-24 Thread Richard Luckhurst
Hi Roman, RN> Are you doing this to learn regular expressions or are you actually RN> trying to do work? Because you're going the wrong way. RN> It's XML, why do you treat it as text? I am well aware it is XML and I could use an XML parser or simpleXML. I am trying to learn regular expressions as

[PHP] Regular Expression Problem

2007-01-24 Thread Richard Luckhurst
g_match to have matched from the first . I suspect I do not have the regular expression correct. I would great appreciate any help on sorting out the regular expression so that it only returns the first chunk of the string. Regards, Richard Luckhurst -- PHP General Mailing List (http://www.ph

[PHP] Re: socket_write buffer problem

2007-01-21 Thread Richard Luckhurst
lse as the string is now only 497 bytes left in the $ypsilon string. I see nothing returned to the client by the socket_write here however the print "$yresponse \n"; prints the data. I can not work out why the socket_write is not writing the data to the socket at this point. Does a

Re[2]: [PHP] socket_write buffer problem

2007-01-21 Thread Richard Luckhurst
write ($client, $buffer); What I found was that the first 1024 bytes was sent but I still never saw the second 1024 bytes. It seem the second socket_write is not happening. Am I on the right track here? >> >> >> >> >> Regards, >> Richard Luck

Re[2]: [PHP] socket_write buffer problem

2007-01-21 Thread Richard Luckhurst
write ($client, $buffer); What I found was that the first 1024 bytes was sent but I still never saw the second 1024 bytes. It seem the second socket_write is not happening. Am I on the right track here? >> >> >> >> >> Regards, >> Richard Luck

[PHP] socket_write buffer problem

2007-01-21 Thread Richard Luckhurst
on how I can make sure the entire contents of $yresponse are passed back to the client? Regards, Richard Luckhurst Product Development Exodus Systems - Sydney, Australia. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP] XML Parsing simpleXML Arrays Question

2007-01-14 Thread Richard Luckhurst
h values that I would expect. Can anyone point me in the right direction here. Regards, Richard Luckhurst Product Development Exodus Systems - Sydney, Australia. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Parsing an XML return from a POST - resend with a little more information

2007-01-10 Thread Richard Luckhurst
uot;11429926" ["adtBuy"]=> string(6) "714.83" ["adtSell"]=> string(6) "714.83" ["chdBuy"]=> string(6) "714.83" ["chdSell"]=> string(6) "714.83" ["infBuy"]=> string(6) "714.83" ["infSell"]=> string(6) "714.83" ["topCar"]=> string(5) "false" ["topHotel"]=> string(5) "false" } ["fareXRefs"]=> object(SimpleXMLElement)#13 (1) { ["fareXRef"]=> string(8) "11429926" } } } } ["taxes"]=> object(SimpleXMLElement)#4 (2) { ["@attributes"]=> array(1) { ["currency"]=> string(3) "USD" } ["tax"]=> string(6) "201.52" } ["vcrSummary"]=> object(SimpleXMLElement)#5 (1) { ["vcr"]=> array(2) { [0]=> string(2) "AA" [1]=> string(2) "PR" } } } So I can clearly see the data I want is there. However I have tried the following foreach ($data->fares as $fares) { print "{$fares->fares} \n"; } And that just produces a blank line. It is obvious to me that I am not on the right track. Regards Richard Luckhurst -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Parsing an XML return from a POST - resend with a little more information

2007-01-09 Thread Richard Luckhurst
f course there is always the options of using regular expressions or simple JM> string manipulation functions to extract the relevant data from the string of JM> 'xml' - technically there is no need to go anywhere near a 'real' xml parser JM> as such. So far I have had

Re[2]: [PHP] Parsing an XML return from a POST - resend with a little more information

2007-01-09 Thread Richard Luckhurst
ny of the examples at http://php.net/manual/en/ref.simplexml.php use a RN> string variable as the source. Yes I know they do but the examples for xml_parse() do not use a string. Regards, Richard Luckhurst Product Development Exodus Systems - Sydney, Australia. [EMAIL PROTECTED] -- P

[PHP] Parsing an XML return from a POST - resend with a little more information

2007-01-09 Thread Richard Luckhurst
201.52 AA PR I would certainly appreciate any help I can get. Thanks in advance. Regards, Richard Luckhurst Product Development Exodus Systems - Sydney, Australia. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To

[PHP] Parsing an XML return from a POST

2007-01-08 Thread Richard Luckhurst
AA PR I would certainly appreciate any help I can get. Thanks in advance. Regards, Richard Luckhurst Product Development Exodus Systems - Sydney, Australia. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re[2]: [PHP] XML API, libcurl, POST Help Needed

2007-01-07 Thread Richard Luckhurst
equest-test.php'; JM> ... and have your-curl-request-test.php write all it's recieved headers, etc JM> to a log file. Probably a good idea for debugging. Thanks for your help. Regards, Richard Luckhurst Product Development Exodus Systems - Sydney, Australia. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] XML API, libcurl, POST Help Needed

2007-01-07 Thread Richard Luckhurst
$curl); } print "$response\n\n\n"; ?> I thank you in advance for any help. Regards, Richard Luckhurst Exodus Systems - Sydney, Australia. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Extended Ascii Characters

2006-06-02 Thread Richard Luckhurst
Hi Tedd, I had a hunt in the archives and couldn't find anything. Do you have any clue about when it was? Richard t> At 9:46 AM +1000 6/2/06, Richard Luckhurst wrote: >>Hi All >> >>I am in the process of cleaning up an application that was left half >>finished.

[PHP] Extended Ascii Characters

2006-06-01 Thread Richard Luckhurst
us scripts throughout the application. When I try what I get is a test representation rather than the actual ascii code. Ie I get \xFF instead of the ascii character ΓΏ Is there any way to actually do this in php? Regards, Richard Luckhurst Product Development Exodus System