I have been trying to mount my NAS via NASmount simply by switching the NAS on. I know it's a bit lazy.
I have worked out that I can mount my NAS from anywhere on my local network by going to the URL:
http://{Foxsat-IP}/plugin/NASMount/cgi-bin/DoSingleReMount.jim?MountNo=8'
and it will mount provided I am logged in. MountNo 8 holds the details of the NAS. It was 32 before I messed up DoSingleReMount.jim and had to do a re-install.
To automate the login process I have tried using PHP cURL to log in :
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
then :
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
It failed! Then :
curl_setopt($ch, CURLOPT_POSTFIELDS, 'username='.$username.'&password='.$password);
but I'm getting a 401.
I have no idea about webif auth. I see no evidence of stored cookies, so what am I missing? Session ID?
Thanks for your help.
I have worked out that I can mount my NAS from anywhere on my local network by going to the URL:
http://{Foxsat-IP}/plugin/NASMount/cgi-bin/DoSingleReMount.jim?MountNo=8'
and it will mount provided I am logged in. MountNo 8 holds the details of the NAS. It was 32 before I messed up DoSingleReMount.jim and had to do a re-install.
To automate the login process I have tried using PHP cURL to log in :
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
then :
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
It failed! Then :
curl_setopt($ch, CURLOPT_POSTFIELDS, 'username='.$username.'&password='.$password);
but I'm getting a 401.
I have no idea about webif auth. I see no evidence of stored cookies, so what am I missing? Session ID?
Thanks for your help.