Jump to content

Take links from a form


xionhack

Recommended Posts

Hello. I have a form in my website where people will put their html code. What I want to do is to be able to take all the links in that html and swap them with something else. So that would be 2 processes, first get all the links and then swap them. For example

 

If i submit:

 

 

<html>
Hello <br />
<a href="http://www.google.com" > Google</a>
<a href="http://www.yahoo.com" > Yahoo</a>
</html>

 

 

That would become

 

<html>
Hello <br />
<a href="http://www.link_1" > Google</a>
<a href="http://www.link_2" > Yahoo</a>
</html>

Link to comment
https://forums.phpfreaks.com/topic/206556-take-links-from-a-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.