The uncommented sights work but the one that is // commented out does not... get can not connect error.
If I paste it in a browser it comes up just fine.
Any ideas?
Openssl 1.0.2 is installed
procedure tform1.mainp;
var
Source: string;
PersonalPath: array[0..MaxPathLen] of char; //Allocate memory
filepath: string;
begin
with TFPHttpClient.Create(nil) do
try
try
if radiobuttonearth.Checked = True then
Source := '
http://www.goes.noaa.gov/FULLDISK/GEVS.JPG'
else
//Source := '
https://sdo.gsfc.nasa.gov/assets/img/latest/latest_1024_0193.jpg'; source:='
https://sohowww.nascom.nasa.gov/data/realtime/eit_284/1024/latest.jpg'; if memolog.Lines.Count > 50 then
memolog.Lines.Delete(0);
memolog.Lines.Add(trim(FormatDateTime('h:nn:ss AM/PM', now) +
' ' + FormatDateTime('MM/DD/YYYY', now)) + ' GET: ' + Source);
PersonalPath := '';
SHGetSpecialFolderPath(0, PersonalPath, CSIDL_PERSONAL, False);
filepath := PersonalPath + '\Spacegetti\';
if not directoryexists(filepath) then
createdir(filepath);
get(Source,filepath + 'source.jpg');
setdesktop(filepath + 'source.jpg');
finally
Free;
end;
except
on E: Exception do
DumpExceptionCallStack(E, 'log');
end;
end;