PHP hyperlinks generator - HELP plz


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

Hi

I need some help to get this done using php:

Did you know?Explore Trending and Topic pages for more stories like this.

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?

Thanks
No comments posted yet

Your Answer:

Login to answer
91 Like 38 Dislike
Previous forums Next forums
Other forums

phpmailer class & pop.gmail.com?
Code: <?php
$mail->IsSMTP();
$mail->Host = "pop.gmail.com";

Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
i want to know the queries issued by various users accessing a database...

Calculus Help (and by help I mean homework)
Hrmmm, I hate posting about math homework, partly because it's homework, and partly because I hate w

Multidimensional array problems in $_POST
I'm having trouble with a three-dimensional $_POST array. It starts as a two-dimensional array on th

type check while uploading
Hi Everyone,

How can I check the exact type of a file while uploading on my site?

Here

RadioButtonList item spacing
I have a RadioButtonList and I can't put any spacing between the items. They are arranged verticall

Weird Problem with curl while sending data
I am facing a weird problem with sending data to a site via curl.

If i send the value by this

Image upload - determine folder
I have an upload script that may be accessed from different directories. Problem is, the script is m

Empty text file when there is over XXXX lines of text.

define("RANDOM_FILE","/public_html/random.txt");
$randomEntry = "

Checking if multidimensional array is empty?
I have a for with multiple test input fields. Specifically the user submits multiple names and ages

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