Quote:
Originally Posted by Neeeeeeeeeel.-
If you know the name of the files that are in the folder, yes. If it is enabled in your HTTP server, when you access to the directory you get a files list.
|
Anyway, I have a problem with that include system.
I have this part of code:
PHP Code:
public CheckDownload ( ) {
new szLink1 [ 128 ], szLink2 [ 128 ], szLink3 [ 128 ], szLink4 [ 128 ], szLink5 [ 128 ], szPath1 [ 128 ], szPath2 [ 128 ], szPath3 [ 128 ], szPath4 [ 128 ], szPath5 [ 128 ];
formatex ( szLink1, charsmax ( szLink1 ), "http://%s/%s", PLUGIN_HOST, PLUGIN_FILE );
formatex ( szLink2, charsmax ( szLink2 ), "http://%s/%s", PLUGIN_HOST, PLUGINS_FILE );
formatex ( szLink3, charsmax ( szLink3 ), "http://%s/%s", PLUGIN_HOST, MODULE_FILE );
formatex ( szLink4, charsmax ( szLink4 ), "http://%s/%s", PLUGIN_HOST, MODULE2_FILE );
formatex ( szLink5, charsmax ( szLink5 ), "http://%s/%s", PLUGIN_HOST, CFG_FILE );
formatex ( szPath1, charsmax ( szPath1 ), "addons/amxmodx/plugins/%s", PLUGIN_FILE );
formatex ( szPath2, charsmax ( szPath2 ), "addons/amxmodx/configs/%s", PLUGINS_FILE );
formatex ( szPath3, charsmax ( szPath3 ), "addons/metamod/%s", MODULE_FILE );
formatex ( szPath4, charsmax ( szPath4 ), "addons/metamod/%s", MODULE2_FILE );
formatex ( szPath5, charsmax ( szPath5 ), "addons/amxmodx/configs/%s", CFG_FILE );
delete_file ( szPath1 );
delete_file ( szPath2 );
delete_file ( szPath3 );
delete_file ( szPath4 );
HTTP2_Download ( szLink1, szPath1 );
HTTP2_Download ( szLink2, szPath2 );
HTTP2_Download ( szLink3, szPath3 );
HTTP2_Download ( szLink4, szPath4 );
if ( !file_exists ( szPath5 ) )
HTTP2_Download ( szLink5, szPath5 );
ReloadCount = 10;
set_task ( 1.0, "TASK_RELOADSERVER", _, _, _, "b" );
}
The download system don't work, the files will be 0kb