Feature #10638

Support for PHP file requests

Added by ArMaTeC over 5 years ago. Updated over 5 years ago.

Status:New Start date:05/13/2010
Priority:Normal Due date:
Assignee:Yoma % Done:

0%

Category:AutoImportUri
Target version:-

Description

Hi yoma I'm adapting your system to work along side a forum system with usergroup permissions but I'm having issues with serving the file back to yoma.

this is a sample of the file serving php script

[code]
$user = $_GET['user'];
$pass = $_GET['pass'];
//
//Validation Functions Removed for ease or reading
//
$repopath = "full_path_to_repo\repo.7z";
header("Content-type: application/force-download");
header("Content-Transfer-Encoding: Binary");
header("Content-length: " . filesize($repopath));
header('Content-Disposition: inline; filename="' . $repopath . '"');
header("Content-Disposition: attachment; filename=\"" . basename($repopath) . "\";");
readfile($repopath);
?>
[/code]

it serves my the file as it should from IE and firefox and the vars are being passed from yama to the script

I.E.

http://WEBSITE.com/getfile.php?user=USERNAME&pass=PASSWORD

Any help or an alternative solution that uses PHP would be fantastic

History

Updated by Yoma over 5 years ago

What is your exact goal?

You could serve the thing through a

yashttp://www.mydomain.com/myrepo.7z

-in your code you don't use the login in any way? Ah i just noticed you removed them...
-You could do something like make a function that verifies the login/username combo
and then do something like

if(VerifyLogin()){
 Redirect("yashttp://www.mydomain.com/myrepo.7z");
}

-Whatever you are using forum wize probably has an authentication script somewhere inside, reuse it.
-The redirect could simply be done in plain html or with http headers.
(redirect to this url and the tool will pop up and ask for import)
-There is no real reason for trying to fetch the autoconfig.7z file, a user won't be able to use it anyway. Use the
yashttp://
links to link directly to the autoconfig file.

However the only real form of authentication the tool knows is "basic authentication".
If you need more help we could look into it together.

Also available in: Atom PDF