Hi Im trying to access a script remotely script is located on a password protected directory and i tried to access it like this with a javascript in a php file document.location = 'http://username:password@192.168.1.1/cgi-bin/test.cgi'; Code (markup): problem is when the url calls im getting a confirm box contain "You are about to log into the site "192.168.1.1" with the username '' " is there way to avoid that confirm box? or better authentication method? it doesnt need to be a javascript, i need a way to do this in php without having this confirm message that giving by browser. sorry for language errors. Thanks
You can try Soonpy php class to access password protected pages - http://sourceforge.net/projects/snoopy/
Thanks AsHinE, it works fine with authentication but once i click on script button it doesnt do the job. seems it just echo page
So as far as I understand you want your script to use that password change script? If so then you have just submit this form which can be done by Snoopy submit method.
Thanks it works with submit can you tell me how to show output in a nice way ? snoopy returns html codes