Hello, I need help to find the external links from given string and then replace it using RegExp. e.g. my domain is abc.com and i want that from the given string any external link should be replaced like ... abc.com/rediector.php?id=externalURL any help will be highly appreciated.
i think that external url is not going to be same in all the case. any way please have look into str_replace It could help else you will need regular expression. If url is going to be dynamic,you can use some php url filter functions to extract url then match it against your url, if it doesnt match replace it with your url.
thanks for you reply, str_replace not gonna to be work... i need regex to do it all at once, i am trying to do it... if i be successful , i will post it here too, in the mean time any help will be appreciated