Good point. +10 if you can provide a handy example for Bruce, Brenda :)
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:56 PM, Brenda Wallace <[email protected]>wrote: > Many open source projects will have been through this already. > Anything that talks to an external api over like http, such as an > oauth library, will likely have code already that not only calls curl, > but also falls back gracefully to other methods of getting a http > response if curl isn't installed. > > As you're building another GPL project, you can copy their code directly. > > On 7 June 2012 14:51, Bruce Clement <[email protected]> wrote: > > 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] > > > > -- > Kotahi tamaiti, Kotahi rorohiko iti: Aotearoa > http://laptop.org.nz > > -- > 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]
