Find text inside javascript tag using PHP Simple HTML DOM Parser

前端 未结 1 1539
南旧
南旧 2020-12-20 08:40

I\'m trying to find a text change regularly inside javascript tag :



        
相关标签:
1条回答
  • 2020-12-20 09:08

    You can do it with regular expression:

    preg_match ($pattern, $java_script, $matches);

    Pattern depends, if the variable 'wmsAuthSign' is unique. For example:

    $pattern = '/wmsAuthSign=(.*?)==/';

    preg_match ($pattern, $java_script, $matches);

    echo $matches[1];

    But you can always start your pattern from 'streamer' for example if 'wmsAuthSign' is not unique.

    0 讨论(0)
提交回复
热议问题