from FGC to Curl

Changed all Filegetcontents to curl with a timeout and fixed a small error.