get hidden input tag value as string using PHP simple HTML DOM

陌路散爱 提交于 2019-12-04 12:08:41

I tried the code and this works for me, I think your $data->find is not correct:

include('../simple_html_dom.php');


  $seed = 'https://www.bu.edu/link/bin/uiscgi_studentlink.pl/1346752597?ModuleName=univschr.pl&SearchOptionDesc=Class+Subject&SearchOptionCd=C&KeySem=20133&ViewSem=Fall+2012&Subject=&MtgDay=&MtgTime=';
  web_scrape($seed);

  function web_scrape($url)
{
   $data = file_get_html($url);
    //$data = new simple_html_dom();  
   // $data->load_file($url);
    $nodes = $data->find("input[type=hidden]");

    foreach ($nodes as $node) {
    $val = $node->value;
    echo $val . "<br />";
    }

}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!