Tell me, please, how to parse the js-code from the site? More precisely, I even know a line of code, but how to parse is not.
- Parse, in the sense of downloading js file and find in it a certain piece of code (text)? - KoVadim
- @KoVadim to find a certain piece of code in it, or rather its link, there is a line like document.hation = '', then you need to match it in quotes. - Lektor
- You get content and parsing into variable with regular expressions. $ url = preg_replace ("/.+ document \ .location \ .href = \" (. +?) \ ". + /", "$ 1", $ content); I did not check the code, but something like this. It would be nice to see the exact fragment of js code where the link appears. - Nik555
- @ Nik555 not working :( - Lektor
- @Lektor, give the js code snippet so that I can accurately write reg. expression. - Nik555
|