ajaxで別ドメインのphpにデータをpostしようと思っています。
今使っているサーバがCGI非対応なので、phpファイルだけ別のサーバに置こうと思っていますが、phpを置くサーバがSSL非対応のため、
Mixed Content: The page at 'https://XXX/index.html' was loaded over HTTPS,
but requested an insecure script 'http:/XYZ/example.php'.
This request has been blocked; the content must be served over HTTPS.
とエラーが出ます。
何か対策はありますでしょうか?
jquery
1 $.ajax({ 2 type: 'POST', 3 url: 'http:/XYZ/example.php', 4 data: {name:value}, 5 }).done(function(){ 6 console.log("OK"); 7 }).fail(function(){ 8 console.log("ng"); 9 });
PHP
1 $name = $$_POST['name'];
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。