我有一個遠程頁面,下面顯示了它的源代碼,PHP的捲曲遠程頁面的JavaScript提取
<!DOCTYPE html>
<html>
<head>
<title>somethingg blabla</title>
</head>
<body>
<script type="text/javascript">
function blala() { /*** code **/ }
var sitedata = {
"count": 1,
"threads": {
"38752": {
"thread_id": 38752,
"node_id": 4,
"title": "The ShadyCraft Beta Launch!",
"prefix_id": 19,
"content": {
"count": 1,
"content": {
"226167": {
"post_id": 226167
}
}
}
}
}
};
var extra_codes_here = 'blabla';
</script>
<h1>Hello world</h1>
</body>
</html>
我有捲曲碼這個頁面,我得到這個源代碼,但是如何讓價值var sitedata
到php數組,
您想要在PHP數組javascript變量? – Akshay
是的,我想javascript到php數組 –