[PHP] receiving XML stream as server via PHP

2002-12-31 Thread Kristopher Yates
Hi,

Using PHP with cURL, I am currently able to dynamically create XML 
documents and HTTP POST to a remote server, receive an XML response, and 
parse XML as needed.

What I am having trouble finding information on is doing the reverse. 
Basically, I am trying to create a PHP script that acts as a server, so 
that a remote computer can HTTP POST XML to said script and then I parse 
and respond in XML.  Again, I already have the reverse working using 
CURL - so basically I have created a client and now I need to create the 
server.

The only part I need help understanding is how do I get the XML into an 
array/variable when my script is hit with someone using HTTP POST to 
pass XML to it. I have an idea below (vague)..

I had the server guy HTTP POST some XML to a script which just had


I see in the HTTP Request Headers of the phpinfo() output that it 
received  content type text/xml but nowhere do I see what was actually 
received (the actual xml that was sent).  I thought maybe PHP would take 
the stuff after the header and push it into an array/variable but no 
such luck (argv?).

I am wondering if anyone has any helpful information.  I imagine 
something like the following psuedo code:

if($HTTP_CONTENT_TYPE=="text/xml"){
   //use some php function(s) to pass incoming xml stream to an array 
that I can then pass to my
   //xml parser
   }

I hope this gives you enough information to figure out my dilema.  If 
someone can shed a little light on this subject it would be GREATLY 
appreciated.

Thanks,

Kris
[EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] receiving XML stream as server via PHP

2003-01-02 Thread Kristopher Yates
Hi,

I thought there was only one XML standard (1.0)?

I guess my question should have been, when someone commits an HTTP POST 
sending me raw xml data to my PHP script, I imagine PHP would store it 
in some global variable. What variable is that?

Thanks,

Kris

Jimmy Brake wrote:

depends on which xml standard you are using  the xml-rpc is what I
have been using to ACCEPT xml -- but it does have a server to accept xml


http://pear.php.net/package-search.php?pkg_name=xml&bool=AND&submit=Search

On Tue, 2002-12-31 at 13:20, Kristopher Yates wrote:
 

Hi,

Using PHP with cURL, I am currently able to dynamically create XML 
documents and HTTP POST to a remote server, receive an XML response, and 
parse XML as needed.

What I am having trouble finding information on is doing the reverse. 
Basically, I am trying to create a PHP script that acts as a server, so 
that a remote computer can HTTP POST XML to said script and then I parse 
and respond in XML.  Again, I already have the reverse working using 
CURL - so basically I have created a client and now I need to create the 
server.

The only part I need help understanding is how do I get the XML into an 
array/variable when my script is hit with someone using HTTP POST to 
pass XML to it. I have an idea below (vague)..

I had the server guy HTTP POST some XML to a script which just had


I see in the HTTP Request Headers of the phpinfo() output that it 
received  content type text/xml but nowhere do I see what was actually 
received (the actual xml that was sent).  I thought maybe PHP would take 
the stuff after the header and push it into an array/variable but no 
such luck (argv?).

I am wondering if anyone has any helpful information.  I imagine 
something like the following psuedo code:

if($HTTP_CONTENT_TYPE=="text/xml"){
   //use some php function(s) to pass incoming xml stream to an array 
that I can then pass to my
   //xml parser
   }

I hope this gives you enough information to figure out my dilema.  If 
someone can shed a little light on this subject it would be GREATLY 
appreciated.

Thanks,

Kris
[EMAIL PROTECTED]

   



.

 





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] receiving XML stream as server via PHP

2003-01-02 Thread Kristopher Yates
AH!  That is my ticket!  Thanks.  Yes, my client was posting to my 
"wanna be server script" with mime type text/xml.  I should be able to 
easilly take $HTTP_RAW_POST_DATA and pass it straight on to my XML 
parser.  I imagine, when someone posts xml, $HTTP_RAW_POST_DATA will 
appear as an array.  Just what I need.

Thanks,

Kris

Timothy Hitchens (HiTCHO) wrote:

You can post to your server with a mimetype of "text/xml"
and in your script pickup the raw post as:

$HTTP_RAW_POST_DATA

Then just process this string as XML and return to buffer or not.

Have fun.


Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED]


HiTCHO | Open Platform Web Development
Consutling - Outsourcing - Training - Support


- Original Message - 
From: "Kristopher Yates" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 01, 2003 7:20 AM
Subject: [PHP] receiving XML stream as server via PHP


 

Hi,

Using PHP with cURL, I am currently able to dynamically create XML 
documents and HTTP POST to a remote server, receive an XML response, and 
parse XML as needed.

What I am having trouble finding information on is doing the reverse. 
Basically, I am trying to create a PHP script that acts as a server, so 
that a remote computer can HTTP POST XML to said script and then I parse 
and respond in XML.  Again, I already have the reverse working using 
CURL - so basically I have created a client and now I need to create the 
server.

The only part I need help understanding is how do I get the XML into an 
array/variable when my script is hit with someone using HTTP POST to 
pass XML to it. I have an idea below (vague)..

I had the server guy HTTP POST some XML to a script which just had


I see in the HTTP Request Headers of the phpinfo() output that it 
received  content type text/xml but nowhere do I see what was actually 
received (the actual xml that was sent).  I thought maybe PHP would take 
the stuff after the header and push it into an array/variable but no 
such luck (argv?).

I am wondering if anyone has any helpful information.  I imagine 
something like the following psuedo code:

if($HTTP_CONTENT_TYPE=="text/xml"){
   //use some php function(s) to pass incoming xml stream to an array 
that I can then pass to my
   //xml parser
   }

I hope this gives you enough information to figure out my dilema.  If 
someone can shed a little light on this subject it would be GREATLY 
appreciated.

Thanks,

Kris
[EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

   


.

 





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] receiving XML stream as server via PHP

2003-01-02 Thread Kristopher Yates
Hi Chris,

Long time no talk to!  Hope you had a good new year.

Thanks for the info.  My development is basically similar to SOAP and 
XML-RPC like that used for RSS.  I'll probably get more into it [SOAP] 
when they [PEAR gurus] get past the beta testing stage.  

I am happy with what I have to work with as is for now (PHP with cURL 
for client side scripts and reuse all that code to create server side 
scripts) but definitely interested in the alternatives.

Can you email me the URL to NuSOAP and the PEAR SOAP pages?  

Also, do you (or anyone) have any comparative information on these two 
methods/classes?  

Thanks again Chris.  Good to hear from ya.

Kris


Boget, Chris wrote:

> Using PHP with cURL, I am currently able to dynamically
> create XML documents and HTTP POST to a remote server,
> receive an XML response, and parse XML as needed.
> What I am having trouble finding information on is doing
> the reverse. Basically, I am trying to create a PHP script
> that acts as a server, so

You might want to look into SOAP.  It sounds like it will fit
your needs very well.  PEAR has a SOAP implementation that's
still in testing and there is a class out there called NuSOAP
that's supposedly very good.  I just started toying around with
it recently and it seems to work very well.

Chris






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] phpinfo() and HTTP_RAW_POST_DATA

2003-01-02 Thread Kristopher Yates
Hi,

I was just curious, is there a reason $HTTP_RAW_POST_DATA isn't included 
in the phpinfo() function?  I would imagine one could see all globals 
via phpinfo().. Is $HTTP_RAW_POST_DATA global or is it only global if 
globals are registered (php.ini setting)?  From what I can tell, this 
var is not global, regardless of the registered_globals setting in php.ini.

Not an important issue, but curious what ye creators of PHP language 
opinion/thoughts on this is.

Regards
Kris


Timothy Hitchens (HiTCHO) wrote:

You can post to your server with a mimetype of "text/xml"
and in your script pickup the raw post as:

$HTTP_RAW_POST_DATA

Then just process this string as XML and return to buffer or not.

Have fun.


Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED]


HiTCHO | Open Platform Web Development
Consutling - Outsourcing - Training - Support


- Original Message - 
From: "Kristopher Yates" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 01, 2003 7:20 AM
Subject: [PHP] receiving XML stream as server via PHP


 

Hi,

Using PHP with cURL, I am currently able to dynamically create XML 
documents and HTTP POST to a remote server, receive an XML response, and 
parse XML as needed.

What I am having trouble finding information on is doing the reverse. 
Basically, I am trying to create a PHP script that acts as a server, so 
that a remote computer can HTTP POST XML to said script and then I parse 
and respond in XML.  Again, I already have the reverse working using 
CURL - so basically I have created a client and now I need to create the 
server.

The only part I need help understanding is how do I get the XML into an 
array/variable when my script is hit with someone using HTTP POST to 
pass XML to it. I have an idea below (vague)..

I had the server guy HTTP POST some XML to a script which just had


I see in the HTTP Request Headers of the phpinfo() output that it 
received  content type text/xml but nowhere do I see what was actually 
received (the actual xml that was sent).  I thought maybe PHP would take 
the stuff after the header and push it into an array/variable but no 
such luck (argv?).

I am wondering if anyone has any helpful information.  I imagine 
something like the following psuedo code:

if($HTTP_CONTENT_TYPE=="text/xml"){
   //use some php function(s) to pass incoming xml stream to an array 
that I can then pass to my
   //xml parser
   }

I hope this gives you enough information to figure out my dilema.  If 
someone can shed a little light on this subject it would be GREATLY 
appreciated.

Thanks,

Kris
[EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

   


.

 





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] phpinfo() and HTTP_RAW_POST_DATA

2003-01-02 Thread Kristopher Yates
Hi Chris,

I made your suggested change to php.ini and I show local value 1 and 
master value 1.  Does it mean raw data populates the variable 
$HTTP_RAW_POST_DATA when this is == 1 or does it mean that raw data is 
visible within phpinfo() when value ==1 in php.ini file?  Just curious 
because, though the val is now 1 in my php.ini (and I restarted apache), 
I dont see any data in phpinfo() output related to this var.  Did I miss 
something?

Thanks

Kris

Chris Shiflett wrote:

That data is only populated when
always_populate_raw_post_data is on (check your php.ini).

Chris

--- Kristopher Yates <[EMAIL PROTECTED]> wrote:
 

I was just curious, is there a reason $HTTP_RAW_POST_DATA
isn't included  in the phpinfo() function?  I would
imagine one could see all globals via phpinfo().. Is
$HTTP_RAW_POST_DATA global or is it only global if 
globals are registered (php.ini setting)?  From what I
can tell, this var is not global, regardless of the
registered_globals setting in php.ini.
   


.

 





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] cURL and HTTP request header field/XML 2b

2002-09-03 Thread Kristopher Yates

Hi,

I recently took a few minutes to install cURL library.  A few minutes 
later, I had a working PHP script, which uses cURL to send some data to 
a remote server and get a response.  I then, of course, parse the 
response and PHP creates the appropriate page for output to end user. 
 Worked great!

Now I am on the next level.  I need to do the same thing, except send an 
XML document to a remote server.  This is not a problem but the remote 
server wants me to pass an HTTP request header field before the XML 
document.  How do you do this?

Please examine this snippet and let me know what I need to add to my 
$outgoing_data in order to pass an http request header before the xml 
goes out...



0
Test
$timestamp


This is a test message.

";

$URL="http://omitted_from_example.com/fakeurl";;
exec("/usr/local/bin/curl -m 120 -d \"$outgoing_data\" $URL -L", 
$return_message_array, $return_number);
?>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] cURL and HTTP request header field/XML 2b

2002-09-03 Thread Kristopher Yates

I added the header and blank line to my $outgoing_data but no luck.  It 
was like...

..xml document..";

..curl exec (see prev message or email me)..
?>

Any cURL XML phreaks out there?  Or someone that can tell me how to pass 
an HTTP header through cURL before sending my XML.  I can provide code 
if you cant find my original post.   Maybe it is the way I am exec'ing 
curl???  help!

thanks,

Kris

Tomasz Orzechowski wrote:

>Kristopher Yates wrote on Tue, Sep 03, 2002 at 04:14:35PM -0500:
>  
>
>>Please examine this snippet and let me know what I need to add to my 
>>$outgoing_data in order to pass an http request header before the xml 
>>goes out...
>>
>>
>
>something like:
>
>POST http://www.blah.org/readme.php HTTP/1.0
>
>followed by a blank line.  i'm not sure I got the arguments to POST
>right, check the HTTP spec on w3.org or google for it.  but in general
>this is what you need to do.  the xml stuff needs to be the 'body' of
>the 'POST' HTTP request.
>
>HTH,
>  
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] xml parsing (while loop question)

2002-09-05 Thread Kristopher Yates

Hi,

I have Marc Robards article on XML Parsing with PHP 
(wirelessdevnet.com).. which talks about parsing an XML FILE.  My XML is 
from a remote server (used curl to get it back to PHP as a variable).

How do I change the following while to read from variable instead of 
file without getting these lame "XML error: junk after document element 
at line 1"?

while($data=fread($fp, 4096)){
if(!xml_parse($sml_parser, $data, feof($fp))){
   die.
}
}

What I tried was $data being the variable containing xml from remote 
host.. so I say
while($data){
}
which works but when it gets to the end it dies with:
XML error: junk after document element at line 1

Can anybody help me?  Can anybody see?  Sundays on the phone with 
monday.. sorry beatles flashback.  I am not the walrus but I'm not a 
newbie either.. so very sorry for this newbie-esque question.

Kris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] OSX compile problem (TSRM libs)

2002-11-04 Thread Kristopher Yates
Hello,

I'm trying to compile PHP4.2.3 for Mac OSX 10.2 (Jaguar).  Has anyone 
else had this problem (see below)?

#./configure --with-apxs=/usr/sbin/apxs
#make

ld: multiple definitions of symbol _virtual_stat
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of _virtual_stat 
in sectio
n (__TEXT,__text)
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of _virtual_stat 
in sectio
n (__TEXT,__text)
ld: multiple definitions of symbol _virtual_unlink
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of _virtual_unlink 
in sect
ion (__TEXT,__text)
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of _virtual_unlink 
in sect
ion (__TEXT,__text)
ld: multiple definitions of symbol _virtual_utime
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of _virtual_utime 
in secti
on (__TEXT,__text)
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of _virtual_utime 
in secti
on (__TEXT,__text)
/usr/bin/libtool: internal link edit command failed
make[1]: *** [libphp4.la] Error 1
make: *** [all-recursive] Error 1

I have done this countless times on i386 boxes under RedHat and FreeBSD.
Unfortunately, I have never encountered this problem before, as this is 
my first attempt
on OSX.

Just FYI, before attempting to compile/install PHP, I successfully 
compiled/installed Apache 1.3.27,
which seems to work as expected.  I also upgraded to the latest Apple 
Developers Kit, and related update
patches.

Any ideas?

Thanks,

Kris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] 4.2.3 compile problem on OSX

2002-11-04 Thread Kristopher Yates
Hello,

I'm trying to compile PHP4.2.3 for Mac OSX 10.2 (Jaguar).  Has anyone 
else had this problem (see below)?


./configure --with-apxs=/usr/sbin/apxs
make

ld: multiple definitions of symbol _virtual_stat
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of _virtual_stat 
in sectio
n (__TEXT,__text)
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of _virtual_stat 
in sectio
n (__TEXT,__text)
ld: multiple definitions of symbol _virtual_unlink
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of _virtual_unlink 
in sect
ion (__TEXT,__text)
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of _virtual_unlink 
in sect
ion (__TEXT,__text)
ld: multiple definitions of symbol _virtual_utime
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of _virtual_utime 
in secti
on (__TEXT,__text)
TSRM/.libs/libtsrm.al(tsrm_virtual_cwd.lo) definition of _virtual_utime 
in secti
on (__TEXT,__text)
/usr/bin/libtool: internal link edit command failed
make[1]: *** [libphp4.la] Error 1
make: *** [all-recursive] Error 1

Forgive my ignorance but HUH?  WTF?

I have done this countless times on i386 boxes under RedHat and FreeBSD.
Unfortunately, I have never encountered this problem before.

Just FYI, before attempting to compile/install PHP, I successfully 
compiled/installed Apache 1.3.27,
which seems to work as expected.  I also upgraded to the latest Apple 
Developers Kit, and related update
patches.

Any ideas?

Thanks,

Kris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] upgrade 4.1.2 to 4.2.2 (passing vars problem with 4.2.2)

2002-07-22 Thread Kristopher Yates

Hi,

I have been running 4.1.2 for a while with no problems.  This morning, I 
downloaded 4.2.2, did a configure/make/make install.  All seemed to have 
gone well.  However, it broke all my sites that use PHP.  Here is a 
description of how it appeared to be broken.  This is just an example, 
as I dont really own fakename.com.

User goes to http://www.fakename.com/index.php

User clicks on "help" and gets the main index page instead of the help 
page.

The URL for help is.. http://www.fakename.com/index.php?target=help

It is like PHP gets passed variables and "forgets" them immediately.

What do I need to do?  I reinstalled 4.1.2 and things are working again. 
Naturally, I would like to safely upgrade to 4.2.2.

Thanks in advance for any help out there. I am at a loss for ideas on 
solving this myself.

Kris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] upgrade 4.1.2 to 4.2.2 (passing vars problem with 4.2.2)

2002-07-22 Thread Kristopher Yates

I notice the INSTALL file in 4.2.2 mentions that people "should write 
their scripts to work with this [register_globals] turned off".  Based 
on what I've mentioned below, what can I do to conform to this statement 
made by the PHP authors?  From what I know about programming, I am 
setting globals where appropriate already.. but apparently I am 
incorrect, since upgrading to 4.2.2 broke all my stuff unless I turn 
[register_globals] on.  Any suggestions?

Thanks for your reply,

Kris

1LT John W. Holmes wrote:

>Upgrade and turn on register_globals in php.ini.
>
>---John Holmes...
>
>- Original Message - 
>From: "Kristopher Yates" <[EMAIL PROTECTED]>
>To: "php-general" <[EMAIL PROTECTED]>
>Sent: Monday, July 22, 2002 3:51 PM
>Subject: [PHP] upgrade 4.1.2 to 4.2.2 (passing vars problem with 4.2.2)
>
>
>  
>
>>Hi,
>>
>>I have been running 4.1.2 for a while with no problems.  This morning, I 
>>downloaded 4.2.2, did a configure/make/make install.  All seemed to have 
>>gone well.  However, it broke all my sites that use PHP.  Here is a 
>>description of how it appeared to be broken.  This is just an example, 
>>as I dont really own fakename.com.
>>
>>User goes to http://www.fakename.com/index.php
>>
>>User clicks on "help" and gets the main index page instead of the help 
>>page.
>>
>>The URL for help is.. http://www.fakename.com/index.php?target=help
>>
>>It is like PHP gets passed variables and "forgets" them immediately.
>>
>>What do I need to do?  I reinstalled 4.1.2 and things are working again. 
>>Naturally, I would like to safely upgrade to 4.2.2.
>>
>>Thanks in advance for any help out there. I am at a loss for ideas on 
>>solving this myself.
>>
>>Kris
>>
>>
>>-- 
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>
>
>
>  
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Credit card checks?

2002-07-23 Thread Kristopher Yates

You should contact Visa International Service Association to determine 
what constitues a "valid" credit card number.  Just FYI, a valid format 
is 16 digits; ---.  I believe VISA normally begins with 
"41" as the first two digits, however, I am not a Visa Int. agent but I 
am a client. Ultimately, you would need a merchant account to verify its 
validity, AFTER you have verified its format for accuracy.  HTH Kris

Jas wrote:

>Yeah, I have looked at that class file and I don't want someone elses
>example to use, I want to build my own but have no way of knowing what makes
>up a valid visa number etc
>Jas
>
>"Richard Baskett" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>  
>
>>Try this:
>>
>>http://www.AnalysisAndSolutions.com/code/ccvs-ph.htm
>>
>>Rick
>>
>>A sense of humor can help you over look the unattractive, tolerate the
>>unpleasant, cope with the unexpected, and smile through the unbearable. -
>>Moshe Waldoks
>>
>>
>>
>>>From: "Jas" <[EMAIL PROTECTED]>
>>>Date: Tue, 23 Jul 2002 12:09:48 -0600
>>>To: [EMAIL PROTECTED]
>>>Subject: [PHP] Credit card checks?
>>>
>>>Just wondering if anyone has come across the need to develop a class to
>>>  
>>>
>test
>  
>
>>>a string of numbers based on a credit card type.  If you have where
>>>  
>>>
>would I
>  
>
>>>be able to get information on what string of numbers is consistent with
>>>  
>>>
>each
>  
>
>>>of the different credit cards?  Any help would be appreciated!
>>>Jas
>>>
>>>
>>>
>>>--
>>>PHP General Mailing List (http://www.php.net/)
>>>To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>  
>>>
>
>
>
>  
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Credit card checks?

2002-07-23 Thread Kristopher Yates

Correct.  Your first "parsing" of the credit card number could be done 
by the web server, just to check its length and format:  you could use 
strlen() function in PHP to count the digits, to verify it is correct. 
 You could strip the dashes with ereg_replace("-", "", 
$credit_card_number) then count its length.

To actually verify that the card submitted is a number assigned by VISA, 
your system would have to connect via LinkPoint, AuthorizeNet, or a 
service like that.  They do address comparisson, bank assigner id 
comparison, and much much more.  Without a merchant account, your PHP 
could only verify that it "appears" to be a valid credit card number. 
 The only other option is to get your local bank to hook you up with a 
merchant account and transaction equipment, and you could just run the 
cards "by hand".  That option doesnt sound very fun but some folks 
prefer doing biz that way.

I dont know about AuthorizeNet, but LinkPoint has an API written in PHP 
that is supposed to be inexpensive, and easilly integratable into any 
PHP apps.  I heard it was only $125.00..  Not a bad price for a few 
hundred lines of code.  I am in no way affiliated with or trying to 
advertise for these companies.  Hope this helps,  Kris

Jas wrote:

>So there is no way to use some sort of string comparison to check the number
>then?  I would have to have a merchant account?  Sorry for being nieve, just
>never tried to work with credit card numbers etc.
>Jas
>
>"Kristopher Yates" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>  
>
>>You should contact Visa International Service Association to determine
>>what constitues a "valid" credit card number.  Just FYI, a valid format
>>is 16 digits; ---.  I believe VISA normally begins with
>>"41" as the first two digits, however, I am not a Visa Int. agent but I
>>am a client. Ultimately, you would need a merchant account to verify its
>>validity, AFTER you have verified its format for accuracy.  HTH Kris
>>
>>Jas wrote:
>>
>>
>>
>>>Yeah, I have looked at that class file and I don't want someone elses
>>>example to use, I want to build my own but have no way of knowing what
>>>  
>>>
>makes
>  
>
>>>up a valid visa number etc
>>>Jas
>>>
>>>"Richard Baskett" <[EMAIL PROTECTED]> wrote in message
>>>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>>>
>>>
>>>  
>>>
>>>>Try this:
>>>>
>>>>http://www.AnalysisAndSolutions.com/code/ccvs-ph.htm
>>>>
>>>>Rick
>>>>
>>>>A sense of humor can help you over look the unattractive, tolerate the
>>>>unpleasant, cope with the unexpected, and smile through the
>>>>
>>>>
>unbearable. -
>  
>
>>>>Moshe Waldoks
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>From: "Jas" <[EMAIL PROTECTED]>
>>>>>Date: Tue, 23 Jul 2002 12:09:48 -0600
>>>>>To: [EMAIL PROTECTED]
>>>>>Subject: [PHP] Credit card checks?
>>>>>
>>>>>Just wondering if anyone has come across the need to develop a class to
>>>>>
>>>>>
>>>>>  
>>>>>
>>>test
>>>
>>>
>>>  
>>>
>>>>>a string of numbers based on a credit card type.  If you have where
>>>>>
>>>>>
>>>>>  
>>>>>
>>>would I
>>>
>>>
>>>  
>>>
>>>>>be able to get information on what string of numbers is consistent with
>>>>>
>>>>>
>>>>>  
>>>>>
>>>each
>>>
>>>
>>>  
>>>
>>>>>of the different credit cards?  Any help would be appreciated!
>>>>>Jas
>>>>>
>>>>>
>>>>>
>>>>>--
>>>>>PHP General Mailing List (http://www.php.net/)
>>>>>To unsubscribe, visit: http://www.php.net/unsub.php
>>>>>
>>>>>
>>>>>
>>>>>  
>>>>>
>>>
>>>
>>>
>>>  
>>>
>>
>>
>>
>
>
>
>  
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] bug in php4 with postgres?

2001-04-06 Thread Kristopher Yates

How come sometimes I get this message and sometimes I dont?

[Fri Apr  6 13:49:15 2001] [error] PHP Warning:  3 is not a valid 
PostgreSQL lin
k resource in /usr/local/apache/htdocs/ltt-dev/htdocs/formproc.php3 
on line 134

It worked fine until I upgraded to PHP4 and now a bunch of code is 
broken - so I'm having to rewrite it.  That really sucks.  Anybody 
else have this problem?  I really would like to get in touch with 
someone who uses postgres with php but i dont know any one else 
that uses this software.  Any help is appreciated
kris

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