0 ) echo "Setting paths to ignore to: " . join( ", ", $configurable_options[ 'paths_to_ignore' ] ) . "\n"; if( isset( $configurable_options[ 'friendly_urls' ] ) && is_bool( $configurable_options[ 'friendly_urls' ] ) ) echo "Setting Friendly URLs to: " . ( $configurable_options[ 'friendly_urls' ] ? "Enabled" : "Disabled" ) . "\n"; if( isset( $configurable_options[ 'metadata_delimiter' ] ) && is_string( $configurable_options[ 'metadata_delimiter' ] ) && trim( $configurable_options[ 'metadata_delimiter' ] ) ) echo "Setting MetaData Delimiter to: " . $configurable_options[ 'metadata_delimiter' ]; if( ( isset( $configurable_options[ 'auto_update' ] ) && is_bool( $configurable_options[ 'auto_update' ] ) && $configurable_options[ 'auto_update' ] === true ) || ! is_file( $path_to_local_file ) ) { echo "\nAttempting to fetch latest " . $project_name . " code from GitHub: " . $path_to_latest_code_on_github . "\n"; $latest_code = ""; $github_headers = @get_headers( $path_to_latest_code_on_github ); if( $github_headers && strpos( $github_headers[ 0 ], '200' ) ) $latest_code = file_get_contents( $path_to_latest_code_on_github ); else { echo "\nAttempting to fetch latest " . $project_name . " code from GitLab: " . $path_to_latest_code_on_gitlab . "\n"; $gitlab_headers = @get_headers( $path_to_latest_code_on_gitlab ); if( $gitlab_headers && strpos( $gitlab_headers[ 0 ], '200' ) ) $latest_code = file_get_contents( $path_to_latest_code_on_gitlab ); } if( $latest_code == "" ) { echo "\nUnable to access latest code on GitHub or GitLab. Please check your network connection.\n\n"; echo "\nThank you for using the " . $project_name . " Launcher!\n\n"; exit; } echo "Saving to local path " . $path_to_local_file . "\n"; file_put_contents( $path_to_local_file, $latest_code ); echo "Verifying local file...\n"; if( ! is_file( $path_to_local_file ) && file_get_contents( $path_to_local_file ) != $latest_code ) { echo "Local file check failed!\n\n"; echo "\nThank you for using the " . $project_name . " Launcher!\n\n"; exit; } } echo "Loading " . $project_name . "...\n"; include $path_to_local_file; if( class_exists( $project_name ) ) { echo "Running " . $project_name . "...\n\n"; if( isset( $configurable_options ) && is_array( $configurable_options ) ) $project = new $project_name( $configurable_options ); else $project = new $project_name(); } if( isset( $configurable_options[ 'auto_update' ] ) && is_bool( $configurable_options[ 'auto_update' ] ) && $configurable_options[ 'auto_update' ] === true ) { echo "\n\nRemoving local " . $project_name . " file...\n"; unlink( $path_to_local_file ); } echo "\nThank you for using the " . $project_name . " Launcher!\n\n";