0
response to my previous questionのおかげで、コードが別のサイトにある場合は私に電子メールを送信するようにしました。ここでPHP関数を呼び出すAjax
は彼らのウェブサイトにそれらを取るために潜在的なコード泥棒のために意図された私のジャバスクリプトです:
<script type="text/javascript">
var mypostrequest=new ajaxRequest()
mypostrequest.onreadystatechange=function(){
if (mypostrequest.readyState==4){
if (mypostrequest.status==200 || window.location.href.indexOf("http")==-1){
document.getElementById("result").innerHTML=mypostrequest.responseText
}
else{
alert("An error has occured making the request")
}
}
}
var url = document.domain;
var joel="www.joelhoskin.net76.net";
if (url!=joel)
{
mypostrequest.open("POST", "http://www.joelhoskin.net76.net/email.php", true)
mypostrequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
mypostrequest.send(url)
}
</script>
、ここではjoelhoskin.net76.net/email.php
`<?php
$url=$_POST['url'];
if(isset($url))
{
$to = '[email protected]';
$from = '[email protected]';
$subject = 'Stolen Page';
$content = $url."Site Stolen";
$result = mail($to,$subject,$content,'From: '.$from."\r\n");
die($result);
}
?>`
でPHPです
それは
おかげさまで私が使っていたリファレンスを振り返りましたが、私はそのビットを見逃していました しかし、それでも私は電子メールを送信していません – Joel