Thanks,

I need to call this from PHP code, I believe that wget is only available as
an external executable. Have I got this wrong?

I'll check out file_get_contents(). I need to get some information out of
the headers (Particularly the HTTP status and Location: header) and a quick
read suggests that I can get those from $http_response_header after the
file_get_contents() call.

Still interested in exploring cURL if it's reasonably widely available.

Bruce

On Thu, Jun 7, 2012 at 2:40 PM, Paul Bennett <[email protected]> wrote:

> Hi Bruce,
>
> Third times a charm :)
> Do you need to POST data? If not could you use wget? (which from what I'm
> aware is much more widely available)
>
> Or even file_get_contents() which is now usually URL compatible (provided
> the server being referenced doesn't block requests).
>
> Regards,
> Paul Bennett
> MoveForward - Web Development for Design Companies
> http://www.moveforward.co.nz
> 06 308 9722
> 027 255 8495
>
>
>
> On Thu, Jun 7, 2012 at 2:33 PM, Bruce Clement 
> <[email protected]>wrote:
>
>> One of my side projects is resurrecting an ancient PHP directory script
>> (an old GPL 2 version of something that's later versions have been made
>> closed source by the original author). My revised version is publicly
>> available but not yet promoted.
>>
>> The original project checked URLs with its own logic using sockets and
>> file reads. Unfortunately it's either buggy or isn't very compatible with
>> modern PHP and I want to replace it rather than repair it.
>>
>> My preference is the cURL library but I just discovered that it isn't
>> available by default in Debian 6.0.5's Php stack (I've just switched my
>> debugging there from Wheezy because of the xdebug / php 5.4 incompatibility
>> issue).
>>
>> Yes I know it can be easily installed with Pecl or apt-get, but these
>> often aren't available to ordinary webmasters in shared hosting
>> environments.
>>
>> Before going too far down this path I'd like to know how much I'm
>> limiting my potential audience.
>>
>> Does anyone know how common cURL is in mainstream LAMP stacks, or know a
>> page giving this in a nice summary form? I know it's in Centos and missing
>> from Squeeze.
>>
>> Is there a better (more portable) option? (Must be GPL 2 compatible)
>>
>> Thanks
>>
>> Bruce
>>
>> PS I'm having a bad day today. This is my 3rd attempt to send this. Wrong
>> return address, wrong to address & hopefully 3rd time's lucky.
>>
>>
>> --
>> Bruce Clement
>>
>> Home:    http://www.clement.co.nz/
>> Twitter:    http://twitter.com/Bruce_Clement
>> Directory: http://www.searchme.co.nz/
>>
>> "Before attempting to create something new, it is vital to have a good
>> appreciation of everything that already exists in this field." Mikhail
>> Kalashnikov
>>
>> --
>> NZ PHP Users Group: http://groups.google.com/group/nzphpug
>> To post, send email to [email protected]
>> To unsubscribe, send email to
>> [email protected]
>
>
>  --
> NZ PHP Users Group: http://groups.google.com/group/nzphpug
> To post, send email to [email protected]
> To unsubscribe, send email to
> [email protected]




-- 
Bruce Clement

Home:    http://www.clement.co.nz/
Twitter:    http://twitter.com/Bruce_Clement
Directory: http://www.searchme.co.nz/

"Before attempting to create something new, it is vital to have a good
appreciation of everything that already exists in this field." Mikhail
Kalashnikov

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to