Delphi获取网络上的时间错误

老大i 2018-01-04 09:58:17
断点调试出了这样的错误

附上获取时间的代码

function TfrmLogin.GetInternetTime: string;
begin
with TIdHTTP.Create(nil) do
begin
try
Result:=Get('https://www.czk667.top/time/GetDateTime.php');
except
Result:='';
end;
Free;
end;
end;


附上网站代码

<html>
<link rel="shortcut icon" type="image/x-icon" href="/static/img/favicon/favicon_czk.ico"/>
<title>当前日期时间</title>
<script type="text/jscript" src="/js/jquery-3.2.1.min.js"></script>
<body bgcolor="#CCC">
<script type="text/javascript" >
function updata(){
$("#datetime").load("GetDateTime.php #datetime");
}
setInterval(updata, 1000);
</script>
<p id='datetime' class="datetime">
<?php
date_default_timezone_set("Asia/Beijing");
echo date('Y-m-d h:i:s');
?>
</p>
</body>
</html>
...全文
573 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
老大i 2018-01-06
  • 打赏
  • 举报
回复
引用 5 楼 DelphiGuy 的回复:
https://stackoverflow.com/questions/6683127/delphi-idhttpssl
感谢!!
老大i 2018-01-05
  • 打赏
  • 举报
回复
引用 2 楼 DelphiGuy 的回复:
http://indyproject.org/Sockets/SSL.EN.aspx/
404啊,打不开???
  • 打赏
  • 举报
回复
indy的作者说了:由于美国技术出口的限制,他不能把SSL的代码直接写在indy中,但是有接口支持SSL,只是需要用第三方的DLL,他还列出了两个美国之外网站的下载链接。 如果你看不到的话,可以搜一下中文的“indy中使用SSL”、“Delphi中使用SSL”,能找到很多。
老大i 2018-01-04
  • 打赏
  • 举报
回复
顶顶看哇哇哇

1,593

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 网络通信/分布式开发
社区管理员
  • 网络通信/分布式开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧