Jump to content

Generalized php scripts


deesse

Recommended Posts

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).

 

overall working archi.....

.

|

|

-------------

file extension |------ext1-----set ext1=true---

-------------                                            |

        |      ext2, ext3                                |

        |                                                    |

---------------                                        |                                         

set ext1=true                                            |

---------------                                        |

        |                                                    |

        |--------------------------------------

---------------

download

---------------

        |

        |

---------------                    ------------

ext1              | ------true---- unzip

---------------                    ------------

        |                                    |

      false                                ready

Link to comment
https://forums.phpfreaks.com/topic/68019-generalized-php-scripts/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.