Reply
Is automated Links possible?
Old 04-07-2007, 11:52 AM Is automated Links possible?
Novice Talker

Posts: 6
Trades: 0
Ok, So here is the deal, I have around 300 flash files in a folder. Instead of just going into the directory and clicking on them individually. Is there a way to automatically create a webpage (doesn't matter type of code) that links to each file individually in a list?


If this is possible help me out because I don't wanna get stuck doing each one individually.

Thanks
pierreblake is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 04-07-2007, 01:26 PM Re: Is automated Links possible?
EngAdven's Avatar
Experienced Talker

Posts: 37
Name: Gary Molton
Trades: 0
If they have sequenced names then you could write a small routine to load them automatically.
You can create list of files in a directory automatically and put this list in a drop down list box.
__________________
Gary Molton - Engineering Adventures Ltd
Search engine optimized CMS - CD content managemen software
CSS design wizard - Promotional software gifts
EngAdven is offline
Reply With Quote
View Public Profile
 
Old 04-07-2007, 01:28 PM Re: Is automated Links possible?
Tom_M's Avatar
Ultra Talker

Posts: 251
Name: Tom Maurer
Location: Pennslvania, USA
Trades: 0
If your server supports PHP, Try this:

PHP Code:
<?php
/**   
*  Change  the  path  to  your  folder.   
*   
*  This  must  be  the  full  path  from  the  root  of  your   
*  web  space.  If  you're  not  sure  what  it  is,  ask  your  host.   
*   
*  Name  this  file  index.php  and  place  in  the  directory.   
*/   
                                                           
//  Define  the  full  path  to  your  folder  from  root   
$path  =  "CHANGE THIS TO YOUR PATH";   
                                                           
//  Open  the  folder 
$dir_handle  =  @opendir($path)  or  die("Unable  to  open  $path"); 

// Start the ordered list
echo "<ol>";

//  Loop  through  the  files 
while  ($file  =  readdir($dir_handle))  { 
    
    if(
$file  ==  "."  ||  $file  ==  ".."  ||  $file  ==  "index.php"  
    
    continue; 
    echo  
"<li><a href=\"$file\">$file</a></li>"


// Close the ordered list
echo "</ol>";

//  Close 
closedir($dir_handle); 

?>
Tom_M is offline
Reply With Quote
View Public Profile
 
Old 04-07-2007, 03:07 PM Re: Is automated Links possible?
Novice Talker

Posts: 6
Trades: 0
I couldn't get the php to work, any other ideas?
pierreblake is offline
Reply With Quote
View Public Profile
 
Old 04-07-2007, 03:22 PM Re: Is automated Links possible?
webcosmo's Avatar
Ultra Talker

Posts: 420
Location: Boston, MA
Trades: 1
You can use javascript also.
Make two arrays of same length. One with display text, another with actual filenames.
Then loop through them to show on the page. Its not dynamic though. php was a better solution for that.
If you need help on coding let me know.
__________________
JOIN US * FAST GROWING WEBMASTER FORUM * JOIN US
Join the fun loving, helpful community of webmasters
Free Classified Ads
webcosmo is offline
Reply With Quote
View Public Profile Visit webcosmo's homepage!
 
Old 04-07-2007, 04:42 PM Re: Is automated Links possible?
chrishirst's Avatar
Super Moderator

Posts: 26,507
Location: Blackpool. UK
Trades: 0
what server side code can you run ??
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | Crowded Nightclub? | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-07-2007, 09:28 PM Re: Is automated Links possible?
Tom_M's Avatar
Ultra Talker

Posts: 251
Name: Tom Maurer
Location: Pennslvania, USA
Trades: 0
Yea what code can you use. The code I posted works, and I use it myself on some sites. Make sure you change:
PHP Code:
//  Define  the  full  path  to  your  folder  from  root   
$path  =  "CHANGE THIS TO YOUR PATH"
to point to the folder you want listed. That is of course your server supports PHP.

Last edited by Tom_M; 04-07-2007 at 09:29 PM..
Tom_M is offline
Reply With Quote
View Public Profile
 
Old 04-07-2007, 10:24 PM Re: Is automated Links possible?
EGS
EGS's Avatar
King of Webmaster-Talk

Latest Blog Post:
Can Links Hurt Rankings?
Posts: 856
Name: Justice McCay
Location: New Jersey
Trades: 2
Make sure the PHP file also ends in .php as well..
__________________
Green talkupation is always appreciated. =]
Free Online Games - Cheap Power Leveling - Pontiac Grand Am
EGS is offline
Reply With Quote
View Public Profile
 
Old 04-08-2007, 03:13 AM Re: Is automated Links possible?
Skilled Talker

Posts: 96
Name: Tudor Barbu
Trades: 0
Do you have PHP running on your server? Maybe you're on an ASP server...
__________________
www.it-base.ro
Tudor.b is offline
Reply With Quote
View Public Profile Visit Tudor.b's homepage!
 
Reply     « Reply to Is automated Links possible?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12184 seconds with 13 queries