Wilcox
01-26-2006, 06:46 PM
Hello!
I am new to php and am not real sure where to get started on a script I need for my site. I have an idea how I want it to work, but just do not have the skills to do it. Let me tell you what I am going to do with it, I am going to create a Linux download site and the script needs to select from a list of multiple mirrors.
Now here is my idea of how I need this script to work. Lets say that the script is called download.php and the download to the slackware distrobution is slackware_CD_1.iso The URL that I would need to generate is mysite.com/download.php/32/slackware_CD_1.iso
The 32 in the URL is referring to the mirrors that would need to be randomly selected and the last part of the link "slackware_CD_1.iso" is the same on all of the servers so that would not need to be changed. The script would have hundreds of mirrors and CD's to manage so the 32 was just an example.
Now I am not sure how to create this script. I am sure you would have to put the mirrors in an array and use the srand() to randomize the selection.
If someone could help me with this script I would really appreciate it!
Thanks,
Brett Wilcox
I am new to php and am not real sure where to get started on a script I need for my site. I have an idea how I want it to work, but just do not have the skills to do it. Let me tell you what I am going to do with it, I am going to create a Linux download site and the script needs to select from a list of multiple mirrors.
Now here is my idea of how I need this script to work. Lets say that the script is called download.php and the download to the slackware distrobution is slackware_CD_1.iso The URL that I would need to generate is mysite.com/download.php/32/slackware_CD_1.iso
The 32 in the URL is referring to the mirrors that would need to be randomly selected and the last part of the link "slackware_CD_1.iso" is the same on all of the servers so that would not need to be changed. The script would have hundreds of mirrors and CD's to manage so the 32 was just an example.
Now I am not sure how to create this script. I am sure you would have to put the mirrors in an array and use the srand() to randomize the selection.
If someone could help me with this script I would really appreciate it!
Thanks,
Brett Wilcox
