AppleScript cURL请求始终返回false

时间:2017-04-13 20:14:50

标签: php curl applescript

我有一个Applescript,它接受一些用户输入并根据我的数据库进行检查。

的AppleScript

set domain to "mysite.com"
set keyURL to domain & "/product.php?email=" & email & "&productKey=" & 
productKey & ""
set curlURL to (do shell script "curl " & keyURL)
open location keyURL
display dialog curlURL

PHP

$query = "SELECT * FROM table where email = '".$email."' AND `key` = '".$productKey."' ";

$result = $mysqli->query($query);


if (mysqli_num_rows($result) > 0) {

    while($row = mysqli_fetch_assoc($result)) {

            $email = $row["email"];
            $key  = $row["key"];
}

    echo "true";

}else {

echo "false";
}

我的服务器获取数据并将其与我的数据库进行检查,并向我显示真或假。无论是真的还是假的,我的curURL总是错误的。数据库检查将在我的网站上返回true,但我的Applescript对话框将始终为false。有谁知道为什么会这样?

0 个答案:

没有答案
相关问题