dunnsearch Posted September 15, 2008 Share Posted September 15, 2008 How would i anonymize all of the links on a website and forum? What would i put into the template? P.S I want the anonymizer to be http://www.dunnsearch.org Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/ Share on other sites More sharing options...
dunnsearch Posted September 15, 2008 Author Share Posted September 15, 2008 sorry, i want it to be anonymized to dunnsearch.us not .org Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-642382 Share on other sites More sharing options...
jordanwb Posted September 16, 2008 Share Posted September 16, 2008 What are you trying to do? I have the same script on my server. Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-642468 Share on other sites More sharing options...
dunnsearch Posted September 16, 2008 Author Share Posted September 16, 2008 Anonymize all out going links? possible? Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-642726 Share on other sites More sharing options...
jordanwb Posted September 16, 2008 Share Posted September 16, 2008 Uhhhh. When you select "Use base64 encodng on the address" you're using an encoding method to turn http://phpfreaks.com into a bunch of letters and numbers. Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-642844 Share on other sites More sharing options...
dunnsearch Posted September 16, 2008 Author Share Posted September 16, 2008 i know. i said dunnsearch.us instead of dunnsearch.org. please help Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-642901 Share on other sites More sharing options...
jordanwb Posted September 16, 2008 Share Posted September 16, 2008 Oh ok. Gotcha. You'd have to register multiple domain names and have them point to your server. You'd have to get the IP address of your server, have the domain name point to that IP and set up a Parked domain on your server. You can do the later through CPanel if you have it. Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-642940 Share on other sites More sharing options...
dunnsearch Posted September 16, 2008 Author Share Posted September 16, 2008 thanks. but is there a code you could i could put into my template or all of my html pages? Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-643261 Share on other sites More sharing options...
rarebit Posted September 16, 2008 Share Posted September 16, 2008 i'm glad you two know what your on about because i'm not too sure. Are the links on your site, to your site, or from else where to yours. Is it the page or the domain your wanting to hide, because eventually they'll be in the know... unless another site cURLs them for you, but i'd have to ask why... Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-643278 Share on other sites More sharing options...
unkwntech Posted September 16, 2008 Share Posted September 16, 2008 @jordanwb - you seem to be lost. @dunnsearch - There is going to need to be some API that you can post the link to and have the anonomyzed link sent back. Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-643291 Share on other sites More sharing options...
jordanwb Posted September 16, 2008 Share Posted September 16, 2008 i'm glad you two know what your on about because i'm not too sure. I'm not either. thanks. but is there a code you could i could put into my template or all of my html pages? What? @jordanwb - you seem to be lost. Not really. I understand what he wants to do now that he's explained it more clearly. Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-643295 Share on other sites More sharing options...
dunnsearch Posted September 17, 2008 Author Share Posted September 17, 2008 Not incoming, Just out Going? Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-643901 Share on other sites More sharing options...
jordanwb Posted September 17, 2008 Share Posted September 17, 2008 Not incoming, Just out Going? I'm in a state of utter confusion again. Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-643955 Share on other sites More sharing options...
dunnsearch Posted September 17, 2008 Author Share Posted September 17, 2008 what is confusing? all links posted on my website to get dunnsearch.us/? before them. i have made a script for my .htaccess, but it will make links from my website to my website anonymous to! i only want the links from my website that are linked to another website outside my websites url. any ideas? Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-644243 Share on other sites More sharing options...
Goldeneye Posted September 17, 2008 Share Posted September 17, 2008 You could do something like this: <?php $text = preg_replace('/http:\/\/([^\/]+)[^\s]*/', '<a href="http://dunnsearch.us/?$0" target="_blank">$1</a>', $text); ?> You'll have to tell me if the above code doesn't work or need help implementing it. I haven't exactly tested it. Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-644283 Share on other sites More sharing options...
dunnsearch Posted September 18, 2008 Author Share Posted September 18, 2008 You could do something like this: <?php $text = preg_replace('/http:\/\/([^\/]+)[^\s]*/', '<a href="http://dunnsearch.us/?$0" target="_blank">$1</a>', $text); ?> You'll have to tell me if the above code doesn't work or need help implementing it. I haven't exactly tested it. Doesnt seem to work for me? Thank you so much any way do Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-645042 Share on other sites More sharing options...
Goldeneye Posted September 19, 2008 Share Posted September 19, 2008 Well you'll have to put it inside a function like so: <?php function anonymize_links($text){ $text = preg_replace('/http:\/\/([^\/]+)[^\s]*/', '<a href="http://dunnsearch.us/?$0" target="_blank">$1</a>', $text); } ?> And then to actually use it: <?php $string = 'Hello world! Check out http://foobar.com right now!'; anonymize_links($string); //Will output "Hello world! Check out <a href="http://dunnsearch.us/?http://foobar.com">http://foobar.com</a> right now!" ?> I just tested this and it works for me. So you might not have it set up correctly. Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-645269 Share on other sites More sharing options...
GravityFX Posted November 2, 2008 Share Posted November 2, 2008 I was looking for something like this too ;-) Thank you, Goldeneye Link to comment https://forums.phpfreaks.com/topic/124390-anonymize-all-links/#findComment-680343 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.