| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Member Join Date: Jun 2007
Posts: 141
![]() | Creating multiple links with php ! I am having a list of 15,000 web sites.Now I want to add live links to all sites. I will make it little more clear ; I am having some sites : xxx.com and need to convert them to : www.xxx.com (live link ; when clicked open in new page) Please help me ! I think it can be done with php.But not getting an idea for it ! Plz help ! |
| |
| | #2 (permalink) |
| Senior Member Join Date: Oct 2006 Location: http://akshayjain.org
Posts: 2,830
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | here u go.. live demo at http://www.champrock.uk.to/test/index.php Code: <?php
if(isset($_POST['submit'])) {
$urls = explode("\n", $_POST['domains']);
foreach ($urls as $url) {
$url = trim($url);
$link= "http://".$url;
echo '<a href='.$link.'>'.$url.'</a><br>';
ob_flush();
flush();
}
}
?>
<div style="text-align: center">
<form action="index.php" method="post">
<textarea name="domains" cols="50" rows="15"></textarea>
<br /><input type="submit" name="submit" value="Create URL" style="font-size: 15pt;" />
</form>
</div> |
| |
| | THREAD STARTER #3 (permalink) |
| NamePros Member Join Date: Jun 2007
Posts: 141
![]() | Great ! I just modify something to make it mine !
__________________ Free Tools for Webmasters 6000 Manual Directory Submission for $170 :p Find Best WebHosting Solutions :p |
| |