Does anyone have a regex to retrieve all JavaScript URLS from a HTML page with PHP?

__adrian

after you authenticate the app, then make sure the request makes sense.

BeeAdmin

__adrian, that was not narcistic, it was just a question

__adrian

ok

BeeAdmin

but there is a requestfor the token first

__adrian

if you authenticate that the request does indeed come from the app, then cool.

BeeAdmin

yep

__adrian

after that, make sure the request makes sense.

BeeAdmin

how so

__adrian

then respond. that's it.you should know what info you expect in the request.

UniOn

<script src="THIS"></script>Need anything in between the src tag

__adrian

make sure the info you get conforms to those expectations.

BeeAdmin

oke

__adrian

Uni0n, !+pcre vs dom

php-bot

Uni0n, We don't recommend using regular expressions to parse HTML or XML. It's best to use a parser designed to do this instead like http://php.net/DOM also see http://stackoverflow.com/a/702222/1878262 for reasons why a regex will result in many failures. HTML/XML is wild/faulty and difficult to handle with regex.

skinux

How truly popular is PhpStorm? Also, how many devs use PhpStorm EAP??

laszlof

!+ides:(

tw2113

you typo'd laszlof

UniOn

__adrian: Thanks, do you happen to have any examples about how to parse all the JavaScript urls included in a HTML document with a DOM parser?

tw2113

maybei thought you meant ideas

laszlof

no, bot doesnt like me enough yet

tw2113

i use PHPStorm whenever I canbut i haven't been on an EAP since 8 came out

laszlof

Questions about specific IDEs and IDE discussion in general usually degrades rapidly due to personal preference. It is not a valid topic for ##php.

ProNoob13

UniOn: Why are you trying to do so, if I can ask?

UniOn

ProNoob13: A friend of mine has a traffic exchange website, and he wants me to make a simple function that checks if a website (including all the JavaScripts on that page) have alertsTrying to fiddle around with the dom parser now, but not getting anywhere really :pSo help would be appreciated