PHP hyperlinks generator


Posted on 16th Feb 2014 07:03 pm by admin

Hi

I need some help to get this done using php:


1 - I have few hyperlinks say 500 in format like:

<a href="http://domaina.com/1.html" target="_blank">http://domaina.com/1.html</a>
<a href="http://domainb.com/1.html" target="_blank">http://domainb.com/1.html</a>
<a href="http://domainc.com/21.html" target="_blank">http://domainc.com/21.html</a>
<a href="http://domaind.com/new.php" target="_blank">http://domaind.com/new.php</a>

etc etc

Now I want to convert them into format like:

<a href="http://domaina.com/1.html" target="_blank">keyword 1</a>
<a href="http://domainb.com/1.html" target="_blank">keyword 2</a>
<a href="http://domainc.com/21.html" target="_blank">keyword 3</a>
<a href="http://domaind.com/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?

No comments posted yet

Your Answer:

Login to answer
153 Like 51 Dislike
Previous forums Next forums
Other forums

Do something every fifth time?
I'm trying to write a loop, but I want it to do something different after every fifth instance. Like

selectbox+database connection retrive problem
Code: [Select]
<tr>
<th align="left" scope="c

Making multiple rows with one query
I have a table called efed_handler_characters with two fields handler_id and bio_id. What query 2 is

PHP not creating file.
Its supposed to create a .ini file in the /scriptfiles/users/ with the name they entered into the fi

serializing objects - loses methods - the point being?
Hi

I know that serializing an object will lose the methods. But whats the point in that? What

php mailer
How can i send a mail to large no, say 50,000 reciepients using [color=#0000FF]php mailer[/color]

function to return url
Hi,

Can you guys help me giving a function that takes all the contents in a particular field

Save username into DB
OkaY so I got my blog to actually save the posts and whatever, all I need now is for it to keep the

Problem displaying "scraped" XML data
I'm basicly having trouble displaying XML data scraped from an URL using cURL.

What the code

Applet JTextField Size Problem
Hello,

I recently started making an applet to calculate certain values for airplanes. However

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash