|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
php5 - Hyperlinks creation
Hi
I need some help to get this done using php: 1 - I have few hyperlinks say 500 in format like: Code:
<a href="(URL address blocked: See forum rules)/1.html" target="_blank">(URL address blocked: See forum rules)/1.html</a> <a href="(URL address blocked: See forum rules)/1.html" target="_blank">(URL address blocked: See forum rules)/1.html</a> <a href="(URL address blocked: See forum rules)/21.html" target="_blank">(URL address blocked: See forum rules)/21.html</a> <a href="(URL address blocked: See forum rules)/new.php" target="_blank">(URL address blocked: See forum rules)/new.php</a> etc etc Now I want to convert them into format like: Code:
<a href="(URL address blocked: See forum rules)/1.html" target="_blank">keyword 1</a> <a href="(URL address blocked: See forum rules)/1.html" target="_blank">keyword 2</a> <a href="(URL address blocked: See forum rules)/21.html" target="_blank">keyword 3</a> <a href="(URL address blocked: See forum rules)/new.php" target="_blank">keyword 4</a> Here keyword 1,2,3,4 can be taken randomly from a file which has huge list of keywords or may be we can paste the hyperlinks and keywords in php form itself and then it just links into the manner as given above. Can anyone provide the code for doing this? Thanks Monicka |
|
#2
|
|||
|
|||
|
you would probably have to use some sort of regular expression to do a search and replace. something like this:
PHP Code:
|
|
#3
|
|||
|
|||
|
Thanks.. I am revising my problem and making it more clear and simple now as:
I would need a PHP form page with two form fields: Form Field A- In this box we can paste bulk URLS like Code:
(URL address blocked: See forum rules)/1.html (URL address blocked: See forum rules)/2.html (URL address blocked: See forum rules)/my.html (URL address blocked: See forum rules)/new.html etc Form Field B- In this box we can paste list of keywords like keyword 1 keyword 2 keyword 3 keyword 4 keyword 5 etc Lastly there is "SUBMIT" button and when we click on it then it provides us code on the page itself in the following manner: Code:
<a href="(URL address blocked: See forum rules)/1.html">keyword 1</a> <a href="(URL address blocked: See forum rules)/2.html">keyword 2</a> <a href="(URL address blocked: See forum rules)/my.html">keyword 3</a> <a href="(URL address blocked: See forum rules)/new.html">keyword 4</a> etc There is no database or external files requird.. I hope its easy to understand now.. If anyone can create this script then I would be very greatful.. Thanks Monicka |
|
#4
|
|||
|
|||
|
I'm not trying to be rude, but this is a help forum. Meaning that we are here to help you with the code you have written, not write the code for you. If you want someone to just write the code for you, there is a barter forum where you can hire someone to do the job for you. The code I did above was just a starter to get you pointed in the right direction.
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > php5 - Hyperlinks creation |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|