由于项目似乎不知何故被弃用,还有其他解决方案吗?
Paul van Assen写了一个库(https://github.com/pvanassen/steam-api),它有助于登录和使用Steam进行其他交互.
唯一对我不起作用的是登录部分.我的登录方式:
public void login(String cookies) {
this.steamService = StoreFactory.getSteamStore(cookies, "[Username]");
try {
steamService.getLoginService().login("[Username]", "[Password]");
} catch (SteamGuardException ex) {
String steamGuard = JOptionPane.showInputDialog("SteamGuardCode:");
steamService.getLoginService().loginSteamGuard("[Username]",
"[Password]", ex.getEmailSteamId(), "[NameOfDeviceInSteamGuard]",
steamGuard);
} catch (CapchaException ex) {
System.out.println(ex.getCapchaUrl());
String captcha = JOptionPane.showInputDialog("CaptchaCode:");
steamService.getLoginService().loginCapcha("[Username]",
"[Password]", ex.getCapchaGid(), captcha);
} catch (VerificationException e) {
System.out.println("Not working ... \n " + e.toString());
}
}
Run Code Online (Sandbox Code Playgroud)
我的cookie字符串如下所示:
"Steam_Language=english; steamCountry=[XYZ]; steamLogin=[XYZ]; steamLoginSecure=[XYZ]; sessionid=[XYZ]; webTradeEligibility=[XYZ]; steamRememberLogin=[XYZ]";
Run Code Online (Sandbox Code Playgroud)
如果我尝试打印错误消息,我得到的只是一个空字符串.
我现在启用了Mobile Authenticator,如果这有帮助的话!
但其他事情,例如列出来自社区市场的可购买产品,正在使用此API.
//很长一段时间后仍然没有解决方案=( - 我还能做什么D:?
我在php编码中使用了mail()函数但是我没有发送任何邮件.在继续之前,我想详细说明使用mail()函数的上下文.
我没有托管我的网站,所以它在localhost上.我确实设置了smtp,端口sendmail_path等.
经过大量搜索后,我似乎需要下载邮件服务器.我下载了一个免费的sendmail服务器,并将其配置为网站建议.然而,一切都是徒劳的,有人告诉我,我不能使用邮件功能,直到我不仅在localhost上托管我的网站.请指导我.
<?php
$from = "oooo@hotmail.com"; // sender
$subject = " My cron is working";
$message = "My first Cron :)";
// message lines should not exceed 70 characters (PHP rule), so wrap it
$message = wordwrap($message, 70);
// send mail
ini_set("SMTP","localhost");
ini_set("smtp_port","25");
ini_set("sendmail_from","00000@gmail.com");
ini_set("sendmail_path", "C:\wamp\bin\sendmail.exe -t");
mail("jXXXXXX@gmail.com",$subject,$message,"From: $from\n");
echo "Thank you for sending us feedback";
?>
Run Code Online (Sandbox Code Playgroud)
这是我的sendmail配置文件:
smtp_server=smtp.gmail.com
smtp_port=587
smtp_ssl=auto
;default_domain=domain.com
auth_username=jxxxx@gmail.com
auth_password=8888
force_sender=j*****@gmail.com
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: mail() [<a …Run Code Online (Sandbox Code Playgroud)