Problems using PHP and CURL

Craig Hoffman choffman at eclimb.net
Fri Jan 23 08:36:29 PST 2009


> what does the following PHP example do?  I get this:
You have reached this web page by typing "example.com", "example.net",  
or "example.org" into your web browser.
These domain names are reserved for use in documentation and are not  
available for registration. See RFC 2606, Section 3.

Ok, I guess CURL is working. Excellent.  I wonder why my script  
doesn't work with MacPorts PHP...

_______________________
Craig Hoffman
iChat / AIM: mountain.dog
_______________________





On Jan 23, 2009, at 9:23 AM, Chris Janton wrote:

> On 2009-01-23 , at 08:57 , Craig Hoffman wrote:
>
>> Thanks for responding.  I pasted a code snippet below.  Basically  
>> it sends an array to Authorize.Net for processing.   Authorize.Net  
>> responds with transaction details (approved, declined, wrong  
>> address, etc...).
>> When CURL is working, using Liyanage PHP I get this response:
>
>
> what does the following PHP example do? In theory it will return the  
> text of the web page which reads like this
> "
> You have reached this web page by typing "example.com",  
> "example.net", or "example.org" into your web browser.
> These domain names are reserved for use in documentation and are not  
> available for registration. See RFC 2606, Section 3.
>
> "
>
>
> <?php
> $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL, 'example.com');
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
> $output = curl_exec($ch);
> curl_close($ch);
> echo $output;
> ?>
>
> 8)
> ----------------------------------
> Chris Janton  - face at CentosPrime dot COM
> Netminder for Opus1.COM
>
>



More information about the macports-users mailing list