Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Is automated Links possible?
Old 04-07-2007, 12:52 PM 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
 
 
Register now for full access!
Old 04-07-2007, 02: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

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
EngAdven is offline
Reply With Quote
View Public Profile
 
Old 04-07-2007, 02:28 PM Re: Is automated Links possible?
Tom_M's Avatar
Ultra Talker

Posts: 250
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, 04: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, 04:22 PM Re: Is automated Links possible?
Banned

Posts: 421
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.
webcosmo is offline
Reply With Quote
View Public Profile Visit webcosmo's homepage!
 
Old 04-07-2007, 05:42 PM Re: Is automated Links possible?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,515
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
what server side code can you run ??
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-07-2007, 10:28 PM Re: Is automated Links possible?
Tom_M's Avatar
Ultra Talker

Posts: 250
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 10:29 PM..
Tom_M is offline
Reply With Quote
View Public Profile
 
Old 04-07-2007, 11:24 PM Re: Is automated Links possible?
EGS
EGS's Avatar
Banned

Posts: 862
Name: Justice McCay
Location: New Jersey
Trades: 2
Make sure the PHP file also ends in .php as well..
EGS is offline
Reply With Quote
View Public Profile
 
Old 04-08-2007, 04: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...
__________________

Please login or register to view this content. Registration is FREE
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.27600 seconds with 12 queries