使用AppleScript将数据发布到网址

我试图获取用户输入并将数据发送到我的网站上的网址,以对我的数据库进行一些检查.在我的PHP脚本中,我无法显示任何POST变量.好像没有发送数据.我是AppleScript的新手,所以也许我没有正确地做到这一点?

AppleScript的:

set email to the text returned of (display dialog "Enter in your Email:" default answer "")

set productKey to the text returned of (display dialog "Enter in your Product Key:" default answer "")

display dialog "Email: " & email & "
Product Key: " & productKey

set theURL to "http://mysite/testing.PHP?email=email&productKey=productKey"
do shell script "curl " & quoted form of theURL

PHP

<?PHP
echo "made it before post";


    if (!empty($_POST))
    {
        $email  = $_POST["email"];
        $productKey = $_POST["productKey"];
        echo "Made it here";
        echo $email;
        echo $productKey;
    }
?>

解决方法:

虽然我无法彻底测试您的问题,但由于我无法访问您的网站,但以下代码行格式不正确:

set theURL to "http://mysite/testing.PHP?email=email&productKey=productKey"

它应该是以下形式:

set theURL to "http://mysite/testing.PHP?email=" & email & "&productKey=" & productKey

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...