heroine
09-05-2007, 12:36 PM
Hi all,
May I know, how can I generalize my php script and how would that script be like based on these description:
1--The new script should be a ONE php-program that takes a file name (URL) to download as command line parameter.
2--Depending on the extension of the file to download, the program should choose between downloading and unpacking (.ext1 extension), or just downloading (.ext2 and .ext3).
How would I proceed in scripting the php then ? is there anywhere i could get a sample code working as described here????
How to proceed with the coding with respect to the flowchart...?
overall working flowchart.....
.
|
|
---------------
|file extension|---ext1---set ext1=true----
--------------- |
| |
|ext2, ext3 |
| |
--------------- |
|set ext1=false| |
--------------- |
| |
|--------------------------------------
|
--------------
|download |
--------------
|
|
|
-------- ---------
|ext1 |------true----- unzip |
-------- ---------
| |
| |
| |
false ready
May I know, how can I generalize my php script and how would that script be like based on these description:
1--The new script should be a ONE php-program that takes a file name (URL) to download as command line parameter.
2--Depending on the extension of the file to download, the program should choose between downloading and unpacking (.ext1 extension), or just downloading (.ext2 and .ext3).
How would I proceed in scripting the php then ? is there anywhere i could get a sample code working as described here????
How to proceed with the coding with respect to the flowchart...?
overall working flowchart.....
.
|
|
---------------
|file extension|---ext1---set ext1=true----
--------------- |
| |
|ext2, ext3 |
| |
--------------- |
|set ext1=false| |
--------------- |
| |
|--------------------------------------
|
--------------
|download |
--------------
|
|
|
-------- ---------
|ext1 |------true----- unzip |
-------- ---------
| |
| |
| |
false ready