[pmwiki-users] Quick/easy way to check if page is passwd protected?
christian.ridderstrom at gmail.com
christian.ridderstrom at gmail.com
Sun Feb 12 10:02:42 CST 2006
On Sun, 12 Feb 2006, Patrick R. Michaud wrote:
> On Sun, Feb 12, 2006 at 04:28:57PM +0100, christian.ridderstrom at gmail.com wrote:
> > On Sat, 11 Feb 2006, Ben Wilson wrote:
> > > I have a script that allows me to edit PmWiki pages without using a web
> > > browser. However, since some pages may be read or edit protected. Right
> > > now, every time I go to a site, I send the authentication information,
> > > even if it is not needed, because I have no way to determine if
> > > authentication is needed.
> >
> > Going on a tangent here, I wonder if it'd make sense for me to adapt
> > pmwiki-mode in Emacs to use the same script. The advantage would be to
> > have a single mechanism to access a page rather than both of us
> > implementing the same thing twice. In addition, this script then of course
> > works with arbitrary editors.
>
> This is a good idea.
>
> > PS. There's also something called 'libCurl' for use with programs.
>
> In fact, I just noticed that libCurl is built-in to PHP on my site. I
> wonder how many PHP installations have libCurl already built-in?
I have no idea unfortunately.
> If it's fairly common, then it ought to be relatively easy for us to
> create a command-line PHP script that can grab page text and post edits
> (and handle passwords appropriately).
But do people in general have PHP installed? This script would run on the
user's machine, not the server. I don't on my laptop for instance,
although that does have a rather old installation (RedHat 7.3...)
At least initially, I was just thinking of a BASH script that invokes
curl. I was also thinking of making a script called something like
'pmwiki-upload.sh' for making it easy to upload/download attachments.
Actually, I even started on it but ran out of time.
For windows users, I guess PHP is even less likely to be available...
There is a curl for Windows though. Of course, you're not likely to have
bash there...
Still, I think it'd be a good start just to be able to use 'curl' to
access pages in a "robust" way.
/Christian
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list