4
나는 그리스 몽키의 GM_xmlhttpRequest()
와 GET
요청을 발사하고 => 워드 프레스와 관련된 몇 가지 데이터를 반환Greasemonkey AJAX 요청이 데이터를 보내지 않고 있습니까?
<?php
print_r($_REQUEST);
print_r($_GET);
echo "Hello friends".$_GET['vid'];
?>
$_REQUEST
: 여기
$(".getReview").click(function(){
var videoId = $(this).parents("li").find("a").attr("href");
alert(videoId);
GM_xmlhttpRequest({
method: "GET",
url: "http://www.amitpatil.me/demos/ytube.php",
data: "username=johndoe&password=xyz123",
headers: {
"User-Agent": "Mozilla/5.0", // If not specified, navigator.userAgent will be used.
"Accept": "text/xml" // If not specified, browser defaults will be used.
},
onload: function(response) {
console.log(response);
}
});
을하고하는 것은 서버 코드 ytube.php에게 있습니다. $_GET
=> 공백 배열을 반환합니다.
무엇이 잘못되었는지 알 수 없습니다. 나는 심지어 POST
방법을 시도했다.