system() with wget should be the easiest route, then read the result via fopen