Hello everyone,
I need to search some text (submitted by a user) for all URL's within the text. Then I want to add some info to the URL. I have been searching on how to do this, and so far I can't find the information I need.
If there is a link in the text submitted by the user I need to add "&adminID=12".
I was trying to think of how explode and split might help me, but I don't think that can work because there could be multiple links in the text, and the links can be anywhere in the document. Also the a href tag could have double or single quotes, or have targets etc.
Anyways I was looking up parsing. There seems to be many types, but I need one that will get my URL from my link.
I've never used parsing before so i'm not sure what I need to do, or if that is even the right direction for me to go in.
Thanks for your time. Any help is greatly appreciated.