TecBrat Posted April 17, 2007 Share Posted April 17, 2007 I think I need to learn one function, or one complex regular expression and I'd be okay. This is actually to parse xml returned from authorize.net automatic recurring billing. if there are any other soulutions that you know of, I am definatly interested in hearing them. Here's the php code: function parse_return($content) { $refId = substring_between($content,'<refId>','</refId>'); $resultCode = substring_between($content,'<resultCode>','</resultCode>'); $code = substring_between($content,'<code>','</code>'); $text = substring_between($content,'<text>','</text>'); $subscriptionId = substring_between($content,'<subscriptionId>','</subscriptionId>'); return array ($refId, $resultCode, $code, $text, $subscriptionId); } Quote Link to comment Share on other sites More sharing options...
marcus Posted April 17, 2007 Share Posted April 17, 2007 http://www.cs.wcupa.edu/rkline/perl2php/ I suggest reading/looking threw that. Quote Link to comment Share on other sites More sharing options...
TecBrat Posted April 19, 2007 Author Share Posted April 19, 2007 ... This is actually to parse xml returned from authorize.net automatic recurring billing... I found a Perl Module called XML::Simple that gives me a good start. Quote Link to comment Share on other sites More sharing options...
Ninjakreborn Posted April 19, 2007 Share Posted April 19, 2007 http://www.google.com/search?hl=en&q=PHP+to+Perl+converter&btnG=Google+Search Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.