I was wondering How I can make a PHP script that fetch all active plugins from a external Wordpress website. So I can make easy a excel sheet from all the websites with active Wordpress plugins. I have already found a website (http://www.wpthemedetector.com) but I wan't to do it automatically.
You can't. And if you could some would argue that it is a information disclosure vulnerability of some sort.
The only sure way to get the current active plugins is by querying the database by using $active_plugins = get_option( 'active_plugins' );
. But that is only for the current web site and not exposed externally.
The reason services such as WP Theme Detector can detect the currently active theme is because the theme information is embedded in the theme's css file.