1
我想从链接源代码的哈希和股票它在一个可变 的源代码获取哈希值是:从源代码的preg_match
Profile.init({"user_id":37462,"loc":null,"back":"Leeter Leeter","last_names":[],"max_name_len":280,"hash_hash":"8cc8f7b2dcb4331676"});
我想哈希是:8cc8f7b2dcb4331676
我试着用这段代码,但没有奏效。
<?php
$data = file_get_contents("Link");
if (preg_match("/hash_hash":"([a-zA-Z0-9]+)"/i", $data, $matches))
print "The hash is: $matches[1]";
else
print "The page doesn't have a hash";
“链接” 是$数据=的file_get_contents(”链接“)只是一个字符串。 Profile.init来自哪里? –