HTTP Object with protected web folders
I have put the same simple text file in two locations on the web. The HTTP object works great on the simple url.
The HTTP object fails on the longer url that includes a user name and passord for login.
The long url string works fine when pasted into the browser address bar but the exact same string fails in the HTTP Object.
Can anyone help with this? The user name and password in the code are for a valid account.
Thank you.
Andy Skinner
I have put the same simple text file in two locations on the web. The HTTP object works great on the simple url.
The HTTP object fails on the longer url that includes a user name and passord for login.
The long url string works fine when pasted into the browser address bar but the exact same string fails in the HTTP Object.
Can anyone help with this? The user name and password in the code are for a valid account.
PHP Code:
var ip = new Array(); // Internet Paramters
var InitialPass = true; // First Loop in main
function preMain() {
}
function main() {
if (InitialPass = true) {
if ( isLastBarOnChart() == true ) {
// Long Protected URL defined by st below won't work.
var st = "http://www.ramp-member-area.com/amember/plugins/protect/new_rewrite/login.php?";
st = st + "v=-24,20,19,18&";
st = st + "url=/ramp-scripts/test.txt&";
st = st + "amember_login=guest1&";
st = st + "amember_pass=testpassword";
// Simple test url that works fine.
// st = "http://www.ramprt.com//test.txt";
debugPrintln(st);
var i = 0;
var v = new HTTP(st);
v.open("rt");
if(v.open()) {
debugPrintln("start");
for (i = 1; i < 6; ++i) {
ip[i] = v.readln();
}
}
//f = null;
debugPrintln(ip);
debugPrintln("end");
InitialPass = false;
}
}
return;
}
Andy Skinner
Comment