I'm building an email program, that finds and replaces reference codes for urls to be tracked through a click thru manger program.
Basically the program needs a ton of custom reference codes that turn into URLS...
Here's an example:
!link_example turns in to http://www.disney.com
Basically getting the text from a form text field (message)...
Doing something like a str_replace to find and replace all the refernce codes...
There is a MySql table full of custom reference codes and urls...
1000s
How can I search through text quickly comparing the reference codes in the text to the reference codes in the database...
$text = str_replace('!link_disney.com','http://www.disney.com',$text);
I know something link this would work...
But there are 1000s of reference codes...
How can I do this efficiently?