Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Summersleeps's User Defined PHP Functions


  • Please log in to reply
9 replies to this topic

#1 Guest_hollowface_*

Guest_hollowface_*

  • Guests
  • OFFLINE
  •  

Posted 03 January 2017 - 01:42 AM

Summersleeps's User Defined PHP Functions 0.2 Testing:

A while back I started a project called Generic PHP Interface, to save me work, by creating a generic interface I could use for many of the tools I make for Linux. On a similar note I've started this project, which is a collection of PHP functions I've made. PHP allows the creation of user defined functions, and that's what these are. By creating generic functions to use in my tools, I can make it easier to use the same code multiple times within a project, as well as across other projects. And of course you can too. This project is opensource, published under the Comprehensible Open License, a copy of which is included in the download.

Each function has comments in the code to explain which arguments need be passed, listing dependencies, etc. Aside from that the project doesn't include any instructions. Some functions may depend only on PHP itself, some may depend on other functions from the collection, and some may depend on additional programs (how you install these will vary by distro). It also specifies which OS the function was built and tested on, typically Lubuntu 16.04 AMD64.

To use a function, include the PHP file for that function into your project's PHP file, and then execute the function the same as you would any normal PHP function (eg: function();).

 

Functions:

- sudpf1483400000 = Recursively find all files in a directory, and output the results to a file.

- sudpf1483400001 = Recursively find all directories in a directory, and output the results to a file.

- sudpf1483400902 = Extract specified files from a zip archive, retaining paths.

- sudpf1483400906 = Create a zip archive from specified files, retaining paths.

- sudpf1483400907 = Create a zip archive from specified files, ignoring paths.

- sudpf1483401030 = Output an error message.

 

Download Links:

- Mega.nz: https://mega.nz/#!lpZ0karJ!o7jICi9Z3HNGQxy3MNrkpWn242B9kDpEjmvDq2z_W1Y

 

Checksums:

- SHA-512: 4708fa743a47ebc76e5531b56811265a1eab99a1c58b17f2b532e549dcfb37fb732da779c5bc0825dc2d7266cca11213a8fa26d7c885764fb686569f48359915

- SHA-256:c9b35b5e3d94d754a2dfaed63a9a89ea8e1dbc1ff21ad1249129948f26735d9c

- SHA-1:2bc5b21cbf8eb4e63a17cfa1a3a6c1cd85216f40

- MD5:7ff25cad07de09a23b3633b96ecd12ea



BC AdBot (Login to Remove)

 


#2 DeimosChaos

DeimosChaos

  • BC Advisor
  • 1,418 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:United States, Delaware

Posted 03 January 2017 - 11:06 AM

Nice work hollowface! That does help if you do a lot of coding!


OS - Ubuntu 14.04/16.04 & Windows 10
Custom Desktop PC / Lenovo Y580 / Sager NP8258 / Dell XPS 13 (9350)
_____________________________________________________
Bachelor of Science in Computing Security from Drexel University
Security +


#3 Guest_hollowface_*

Guest_hollowface_*

  • Guests
  • OFFLINE
  •  

Posted 07 January 2017 - 07:19 PM

My User Defined PHP Functions 1.0 Stable:

I've renamed the project from "Summersleeps's User Defined PHP Functions" to "My User Defined PHP Functions". This is the 3rd, and hopefully final rename of the project.

I created a project called Generic PHP Interface, to save me work, by creating a generic interface I could use for many of the tools I make for Linux. On a similar note I created this project, which is a collection of PHP functions I've made. By creating generic functions to use in my tools, I can make it easier to use the same code multiple times within a project, as well as across other projects. This project is opensource, published under the Comprehensible Open License, a copy of which is included in the download.

Not much instruction is provided, but each function has comments in the code to explain which arguments need be passed, and anything else you need to know. Some functions may depend on other functions, or on external programs. To use a function, include the PHP file for that function into your project's PHP file, and then execute the function the same as you would any normal PHP function (eg: function();).

Changes:
- Renamed project again.
- Added My User Defined PHP Function 1483818178
- Added My User Defined PHP Function 1483818179

Functions:
- My User Defined PHP Function 1483400000 = Recursively find all files in a directory, and output the results to a file.
- My User Defined PHP Function 1483400001 = Recursively find all directories in a directory, and output the results to a file.
- My User Defined PHP Function 1483400902 = Extract specified files from a zip archive, retaining paths.
- My User Defined PHP Function 1483400906 = Create a zip archive from specified files, retaining paths.
- My User Defined PHP Function 1483400907 = Create a zip archive from specified files, ignoring paths.
- My User Defined PHP Function 1483401030 = Output an error message.
- My User Defined PHP Function 1483818178 = Create a unique directory.
- My User Defined PHP Function 1483818179 = Return specified line contents from a file.

Download Links:
- Mega.nz: https://mega.nz/#!slowjRDK!zmCUt9SI16WfKkk8uKtNS4BUXt0wddEkg4pu-IiXHiU

Checksums:
- SHA-512: 81a13348f25143c706f314bba8dca2664c47de18e7848fb585a11b8e70ca82cec584875e02498742ef81d5228e87d5b258ba1d01cb48483cf9be1a3e2552af45



#4 Guest_hollowface_*

Guest_hollowface_*

  • Guests
  • OFFLINE
  •  

Posted 07 January 2017 - 07:29 PM

@DeimosChaos

That does help if you do a lot of coding!


Indeed.

One thing I'm considering to further help myself is putting the release number in the function name and filename, so that I can tell which release a tool is making use of. This could come in handy if the arguments or return changes down the road. As well as make it easier to use an older version of a function, and a newer version of a function in the same project.

#5 Guest_hollowface_*

Guest_hollowface_*

  • Guests
  • OFFLINE
  •  

Posted 14 January 2017 - 03:18 PM

My User Defined PHP Functions 2.0 Stable:

lznwgc.JPG

This project is a collection of PHP functions I've made. I create tools for linux written primarily in PHP, and by creating generic functions to use in my tools, I can make it easier to use the same code multiple times across a project, as well as within other projects. This project is opensource, in case you find them useful in your projects too :). A copy of the license is included in the download.

Each function has comments in the code to explain which arguments need be passed, and anything else you need to know. Some functions may depend on other functions, or on external linux programs. To use a function, include the PHP file for that function into your project's PHP file, and then execute the function (eg: function();).

Changes:
- Function names, and file names now include the release number.
- Added My User Defined PHP Function 1483818989.

Functions:
- My User Defined PHP Function 1483400000 = Recursively find all files in a directory, and output the results to a file.
- My User Defined PHP Function 1483400001 = Recursively find all directories in a directory, and output the results to a file.
- My User Defined PHP Function 1483400902 = Extract specified files from a zip archive, retaining paths.
- My User Defined PHP Function 1483400906 = Create a zip archive from specified files, retaining paths.
- My User Defined PHP Function 1483400907 = Create a zip archive from specified files, ignoring paths.
- My User Defined PHP Function 1483401030 = Output an error message.
- My User Defined PHP Function 1483818178 = Create a unique directory.
- My User Defined PHP Function 1483818179 = Return line contents from a file by line number.

- My User Defined PHP Function 1483818989 = Return line contents from a file by line starting contents.

Download Links:
- Mega.nz:https://mega.nz/#!l8JAjDaC!wfGeZn-U7MFNP8DgtDSTXX2dHc2Hb181Dj4jHaDECzw

Checksums:
- SHA-512:da5ecc5e2d770e94680f733afa1ead17f7b4922618ffa393f5d685398b813684f8db9754f7c293ce2508b829c927affe58c43e469969c911a020b3ee9aeca3b9



#6 Guest_hollowface_*

Guest_hollowface_*

  • Guests
  • OFFLINE
  •  

Posted 14 January 2017 - 07:09 PM

My User Defined PHP Functions 3.0 Stable:

I wasn't expecting to be releasing another release so soon, but I needed to make a function for use in another project I'm working on (a long overdue Cloudy release). My User Defined PHP Functions is a collection of user defined PHP functions I've made to reduce my workload when developing PHP tools for Linux. Creating generic functions makes it easier to use the same code over and over, and in many cases can help decrease the size of a project too. All good things. This project is opensource, so you can use this stuff in your projects too :). A copy of the license is included for convenience.

The functions contain comments explaining which arguments to pass, etc. Functions could depend on other functions, or on external linux programs, so read the comments. To use a function, include the function's PHP file into your project, and execute the function (eg: function();). Alternatively, copy the function code into your project directly. I recommend using the include approach.

Changes:
- Added My User Defined PHP Function 1483818990.

- Updated file names to reflect new release number.

Functions:
- My User Defined PHP Function 1483400000 = Recursively find all files in a directory, and output the results to a file.
- My User Defined PHP Function 1483400001 = Recursively find all directories in a directory, and output the results to a file.
- My User Defined PHP Function 1483400902 = Extract specified files from a zip archive, retaining paths.
- My User Defined PHP Function 1483400906 = Create a zip archive from specified files, retaining paths.
- My User Defined PHP Function 1483400907 = Create a zip archive from specified files, ignoring paths.
- My User Defined PHP Function 1483401030 = Output an error message.
- My User Defined PHP Function 1483818178 = Create a unique directory.
- My User Defined PHP Function 1483818179 = Return line contents from a file by line number.
- My User Defined PHP Function 1483818989 = Return line contents from a file by line starting contents.

- My User Defined PHP Function 1483818990 = Copy a file, and replace instances of string with string. (I created this with the intention of using it to replace \n line endings with <br> html tags, but decided to genericize the options so you can use it to replace other things to.)

 

Download Links:
- Mega.nz:https://mega.nz/#!hlxXEAgB!wDoHp8I-lCmr08why1N2Z91CyXu2xuxtrxB6GDuYaS0

Checksums:
- SHA-512:3e32301bdba3fbdbbe39d05872e3c37b540979869d627bae5ab18091934dc5b413611fa9af5920fc6359214a118fedc674e18d261de9e20430e0ef674522098c


Edited by hollowface, 14 January 2017 - 07:11 PM.


#7 Guest_hollowface_*

Guest_hollowface_*

  • Guests
  • OFFLINE
  •  

Posted 21 January 2017 - 12:52 AM

My User Defined PHP Functions 4.0 Stable:

MUDPF is a collection of user defined PHP functions for use in PHP tools running on GNU/Linux. It is opensource, published under the Comprehensible Open License (Release 1.0), a copy of which is included in the downloads. I created this project so that I could use the same code multiple times with a tool as well as within other tools.

Functions:
- My User Defined PHP Function 1483400000 = Recursively find all files in a directory, and output the results to a file.
- My User Defined PHP Function 1483400001 = Recursively find all directories in a directory, and output the results to a file.
- My User Defined PHP Function 1483400902 = Extract specified files from a zip archive, retaining paths.
- My User Defined PHP Function 1483400906 = Create a zip archive from specified files, retaining paths.
- My User Defined PHP Function 1483400907 = Create a zip archive from specified files, ignoring paths.
- My User Defined PHP Function 1483401030 = Output an error message.
- My User Defined PHP Function 1483818178 = Create a unique directory.
- My User Defined PHP Function 1483818179 = Return line contents from a file by line number.
- My User Defined PHP Function 1483818989 = Return line contents from a file by line starting contents.
- My User Defined PHP Function 1483818990 = Copy a file, and replace instances of string with string.

Changelog:
- Added support for "-" in path to mudpf1483818179.
- Added support for "-" in path to mudpf1483818989.
- Added support for "-" in path to mudpf1483818990.

Downloads:
Non-packaged:
- ZIP: https://mega.nz/#!UlJTASoS!OD3FAnU-rR7NL5Iun3M1nb5cADImQ4wj2HFoDN_xRQM

Packaged:
- DEB (Ubuntu 16.04 AMD64): https://mega.nz/#!s1Iw1TCL!y0SsU3oHxIfy4bQ-fHMvrsIdszGFcC9cnW_j6j4pji0
- DEB (Ubuntu 16.04 AMD64): https://www.dropbox.com/s/mxsfsnekdknz52c/mudpf_4.0-1.deb?dl=0

Checksums:
Non-packaged:
ZIP:
- SHA-512: dc75420aed3e0a18aca6417f3572c9f97e6c617364858ac6c9855efc830427c0beb2e592b641c8ee81a4a86cebd6ec0bd069c0aa493a240eb5779adb43669330

Packaged:
DEB:
- SHA-512: 817626b70c59c43fd84061cf1698b38e9776857e540a948c76e619a6f5b16b369fc160e72c939251d252583fe40e5213239bd134f6da1408560625cc113f2c31

Installation / Uninstallation:
MUDPF is available in packaged and non-packaged forms. Non-packaged being the default. Non-packaged is just an archive containing the project files. If a packaged form is available for your distro, it is recommended you install using that (as it's much easier/quicker), otherwise you will need to download in non-packaged form, and follow the included instructions.

Ubuntu 16.04 AMD64:


Caution! Please read for more information.

It is worth mentioning that this package installs to "/opt/mudpf". When uninstalling a debian package, package managers typically remove empty directories. If "/opt" is empty (it is by default), when uninstalling MUDPF, "/opt" will be removed. This is not an issue, but if for any reason you wish to avoid this, just put something in "/opt" before uninstalling MUDPF. Alternatively, you can always create a new "/opt" directory after uninstalling MUDPF.



Install:
 
cd ~/Downloads

wget --output-document=mudpf_4.0-1.deb "https://www.dropbox.com/s/mxsfsnekdknz52c/mudpf_4.0-1.deb?dl=1"

sudo apt-get update

sudo apt-get install gdebi

if [[ "817626b70c59c43fd84061cf1698b38e9776857e540a948c76e619a6f5b16b369fc160e72c939251d252583fe40e5213239bd134f6da1408560625cc113f2c31" == $(sha512sum mudpf_4.0-1.deb | sed 's/ .*//g' | tr -d '\n') ]]; then echo "File is good."; else echo "File is bad."; fi

sudo gdebi mudpf_4.0-1.deb

rm mudpf_4.0-1.deb

cd ~/

Uninstall:
 
sudo apt-get purge mudpf



#8 Guest_hollowface_*

Guest_hollowface_*

  • Guests
  • OFFLINE
  •  

Posted 21 January 2017 - 10:54 PM

My User Defined PHP Functions 5.0 Stable:

MUDPF (My User Defined PHP Functions) is an opensource library of user defined PHP functions for GNU/Linux PHP tools. It's published under the Comprehensible Open License (Release 1.0). I use this library as a dependency for some of the GNU/Linux PHP tools I make, as a way of saving myself work.

Functions:
- My User Defined PHP Function 1 = Recursively find all files in a directory, and output the results to a file.
- My User Defined PHP Function 2 = Recursively find all directories in a directory, and output the results to a file.
- My User Defined PHP Function 3 = Extract specified files from a zip archive, retaining paths.
- My User Defined PHP Function 4 = Create a zip archive from specified files, retaining paths.
- My User Defined PHP Function 5 = Create a zip archive from specified files, ignoring paths.
- My User Defined PHP Function 6 = Output an error message.
- My User Defined PHP Function 7 = Create a unique directory.
- My User Defined PHP Function 8 = Return line contents from a file by line number.
- My User Defined PHP Function 9 = Return line contents from a file by line starting contents.
- My User Defined PHP Function 10 = Copy a file, and replace instances of string with string.
- My User Defined PHP Function 11 = Recursively find all files in a directory, and return the results.
- My User Defined PHP Function 12 = Recursively find all files in a directory, and return the results as an array.
- My User Defined PHP Function 13 = Recursively find all directories in a directory, and return results.
- My User Defined PHP Function 14 = Recursively find all directories in a directory, and return the results as an array.

Changelog:
- Changed naming scheme, and re-named all existing functions. This makes it easier to use as a dependency of projects. The old approach was used because it made it easier for direct integration into projects.
- Added My User Defined PHP Function 11
- Added My User Defined PHP Function 12
- Added My User Defined PHP Function 13
- Added My User Defined PHP Function 14

Downloads:
Non-packaged:
- ZIP: https://mega.nz/#!YphQUajJ!aDaVXDJS-jAhxj9O4FNCply041WmZWe4WoedBDsxOFw

Packaged:
- DEB (Ubuntu 16.04 AMD64): https://mega.nz/#!N0RGHLrK!IJtDQlwJJ0JP55L4F_0erKLB16mvZd5LnhWPjF0fbZA
- DEB (Ubuntu 16.04 AMD64): https://www.dropbox.com/s/to6we9522e3wamr/mudpf_5.0-1.deb?dl=0

Checksums:
Non-packaged:
ZIP:
- SHA-512: 200d1ea6fc6e51c11cee1c1d4533e4b70de52122de06b82173f8fb8df975af1b136b38f0db72c0837e69c9b08bb6f007c0c53b1f277ca0df3166328d7bc5c30b

Packaged:
DEB:
- SHA-512: 20bf1ec9a95091a582e6a66c319bd7a01b22cb1d66210ef3d3b90bf8229ba7101ac4ed784069ca115e073032e6c15b246ee5f54c3d231ad4f406c23d09269f8b

Installation / Uninstallation:
MUDPF is available in packaged and non-packaged forms. Non-packaged being the default. Non-packaged is just an archive containing the project files. If a packaged form is available for your distro, it is recommended you install using that (as it's much easier/quicker), otherwise you will need to download in non-packaged form, and follow the included instructions.

Ubuntu 16.04 AMD64:


Caution! Please read for more information.
It is worth mentioning that this package installs to "/opt/mudpf". When uninstalling a debian package, package managers typically remove empty directories. If "/opt" is empty (it is by default), when uninstalling MUDPF, "/opt" will be removed. This is not an issue, but if for any reason you wish to avoid this, just put something in "/opt" before uninstalling MUDPF. Alternatively, you can always create a new "/opt" directory after uninstalling MUDPF.



Install:
 

cd ~/Downloads
wget --output-document=mudpf_5.0-1.deb "https://www.dropbox.com/s/to6we9522e3wamr/mudpf_5.0-1.deb?dl=1"
sudo apt-get update
sudo apt-get install gdebi
if [[ "20bf1ec9a95091a582e6a66c319bd7a01b22cb1d66210ef3d3b90bf8229ba7101ac4ed784069ca115e073032e6c15b246ee5f54c3d231ad4f406c23d09269f8b" == $(sha512sum mudpf_5.0-1.deb | sed 's/ .*//g' | tr -d '\n') ]]; then echo "File is good."; else echo "File is bad."; fi
sudo gdebi mudpf_5.0-1.deb
rm mudpf_5.0-1.deb
cd ~/
Uninstall:
 

sudo apt-get purge mudpf

Edited by hollowface, 21 January 2017 - 10:55 PM.


#9 Guest_hollowface_*

Guest_hollowface_*

  • Guests
  • OFFLINE
  •  

Posted 22 January 2017 - 04:34 PM

My User Defined PHP Functions 6.0 Stable:

MUDPF (My User Defined PHP Functions) is a development library of opensource user defined PHP functions for GNU/Linux PHP tools. It's published under the Comprehensible Open License (Release 1.0), a copy of which is included in the downloads. When creating tools, I use this library to make code re-use easier.

Functions:
- My User Defined PHP Function 1 = Recursively find all files in a directory, and output the results to a file.
- My User Defined PHP Function 2 = Recursively find all directories in a directory, and output the results to a file.
- My User Defined PHP Function 3 = Extract specified files from a zip archive, retaining paths.
- My User Defined PHP Function 4 = Create a zip archive from specified files, retaining paths.
- My User Defined PHP Function 5 = Create a zip archive from specified files, ignoring paths.
- My User Defined PHP Function 6 = Output an error message.
- My User Defined PHP Function 7 = Create a unique directory.
- My User Defined PHP Function 8 = Return line contents from a file by line number.
- My User Defined PHP Function 9 = Return line contents from a file by line starting contents.
- My User Defined PHP Function 10 = Copy a file, and replace instances of string with string.
- My User Defined PHP Function 11 = Recursively find all files in a directory, and return the results.
- My User Defined PHP Function 12 = Recursively find all files in a directory, and return the results as an array.
- My User Defined PHP Function 13 = Recursively find all directories in a directory, and return results.
- My User Defined PHP Function 14 = Recursively find all directories in a directory, and return the results as an array.
- My User Defined PHP Function 15 = Return line contents from a file by line starting contents, but exclude starting contents and line ending.
- My User Defined PHP Function 16 = Return line contents from a file by line number, but exclude line ending.

Changelog:
- Added My User Defined PHP Function 15
- Added My User Defined PHP Function 16

Downloads:
Non-packaged:
- ZIP: https://mega.nz/#!ooZEwBbI!c1__1kma3EU3cXad4KLCXZ2-49PNSNeYM6PzZtUtDuo

Packaged:
- DEB (Ubuntu 16.04 AMD64): https://mega.nz/#!ExZ0ELrZ!DbwMbjk-tsLAD-OYZRvMSBiqskD0n-glaj1hFu7ZDlw
- DEB (Ubuntu 16.04 AMD64): https://www.dropbox.com/s/ttl0wk5yru8e2na/mudpf_6.0-1.deb?dl=0

Checksums:
Non-packaged:
ZIP:
- SHA-512: a12a7a22faca75698e661a1312b4dd1ecb8c0704fc5dead8d491815ad250eb204d791d3d20120adb5b8d869256ba4c639738d37947acd757c624d6a72221d983

Packaged:
DEB:
- SHA-512: 0a0bb0c12ac7790065fcd76eefefa5e9320796d8926b6e5e2f291b9b4fbec48d81dfc5359d4eccb941db1f058409cb3f041121f38e47ab9accdac26657f46f77

Installation / Uninstallation:
MUDPF is provided in both packaged and non-packaged forms. Non-packaged form is the default. Non-packaged is an archive containing the project files. You must install it, and anything it depends on, manually, using the included instructions. If a packaged form is available for your distro, it is recommended you install that, as it's typically easier/quicker.

Ubuntu 16.04 AMD64:


Caution! Please read for more information.
It is worth mentioning that this package installs to "/opt/mudpf". When uninstalling a debian package, package managers typically remove empty directories. If "/opt" is empty (it is by default), when uninstalling MUDPF, "/opt" will be removed. This is not an issue, but if for any reason you wish to avoid this, just put something in "/opt" before uninstalling MUDPF. Alternatively, you can always create a new "/opt" directory after uninstalling MUDPF.



Install:


cd ~/Downloads
wget --output-document=mudpf_6.0-1.deb "https://www.dropbox.com/s/ttl0wk5yru8e2na/mudpf_6.0-1.deb?dl=1"
sudo apt-get update
sudo apt-get install gdebi
if [[ "0a0bb0c12ac7790065fcd76eefefa5e9320796d8926b6e5e2f291b9b4fbec48d81dfc5359d4eccb941db1f058409cb3f041121f38e47ab9accdac26657f46f77" == $(sha512sum mudpf_6.0-1.deb | sed 's/ .*//g' | tr -d '\n') ]]; then echo "File is good."; else echo "File is bad."; fi
sudo gdebi mudpf_6.0-1.deb
rm mudpf_6.0-1.deb
cd ~/
Uninstall:


sudo apt-get purge mudpf


#10 Guest_hollowface_*

Guest_hollowface_*

  • Guests
  • OFFLINE
  •  

Posted 28 January 2017 - 07:09 PM

My User Defined PHP Functions 7.0 Stable:

Yet another release. I've had to do a lot of these lately, because I'm working on other projects, and keep needing functions I haven't yet made.

MUDPF (My User Defined PHP Functions) is an opensource library of user defined PHP functions for GNU/Linux. It's published under the Comprehensible Open License (Release 1.0), a copy of which is included in the downloads. It's meant to be useful for development of Linux PHP tools. I created it to make it easier for me to re-use code within/across projects.

To make use of a function "include", "include_once", or similar the respective PHP file into your script, and then call it. Each function contains comments listing which arguments to include.

Functions:
- My User Defined PHP Function 1 = Recursively find all files in a directory, and output the results to a file.
- My User Defined PHP Function 2 = Recursively find all directories in a directory, and output the results to a file.
- My User Defined PHP Function 3 = Extract specified files from a zip archive, retaining paths.
- My User Defined PHP Function 4 = Create a zip archive from specified files, retaining paths.
- My User Defined PHP Function 5 = Create a zip archive from specified files, ignoring paths.
- My User Defined PHP Function 6 = Output an error message.
- My User Defined PHP Function 7 = Create a unique directory.
- My User Defined PHP Function 8 = Return line contents from a file by line number.
- My User Defined PHP Function 9 = Return line contents from a file by line starting contents.
- My User Defined PHP Function 10 = Copy a file, and replace instances of string with string.
- My User Defined PHP Function 11 = Recursively find all files in a directory, and return the results.
- My User Defined PHP Function 12 = Recursively find all files in a directory, and return the results as an array.
- My User Defined PHP Function 13 = Recursively find all directories in a directory, and return results.
- My User Defined PHP Function 14 = Recursively find all directories in a directory, and return the results as an array.
- My User Defined PHP Function 15 = Return line contents from a file by line starting contents, but exclude starting contents and line ending.
- My User Defined PHP Function 16 = Return line contents from a file by line number, but exclude line ending.
- My User Defined PHP Function 17 = Output a file, and optionally replace instances of string with string.

Changelog:
- Added My User Defined PHP Function 17.
- Updated comments in My User Defined PHP Function 10.

Downloads:
Non-packaged:
- ZIP: https://mega.nz/#!ZhIG2BiK!5mVTghxAB65paSTkvmTvf360K2-Dih4NbPV7XqrL5q4

Packaged:
- DEB (Ubuntu 16.04 AMD64): https://mega.nz/#!J0AylAwY!Sh5kWPWoeCNTlL2MYrpwCI53J2QGH0cXC_ELo1xLKV4
- DEB (Ubuntu 16.04 AMD64): https://www.dropbox.com/s/kh29hpk4ngdx1kz/mudpf_7.0-1.deb?dl=0

Checksums:
Non-packaged:
ZIP:
- SHA-512: ce131041e79030c460bf0bdcbfab45c4a66d58fa4ba54a7e15a3196c3738990e3dcb0f8232390be7b4e109795a41d5ea2fcc1c81d2afa0b4cad02dbb48791467

Packaged:
DEB (Ubuntu 16.04 AMD64):
- SHA-512: 984db5d04185edaa7d0f21de5786cb2d92e829b0b26de91de308ec570a37255d356df8458ffe4f6ac4013d4ce241af3ef346c89039fbbeb461569f5ca22af07d

Installation / Uninstallation:
MUDPF is provided in both packaged and non-packaged forms. Non-packaged form is the default. Non-packaged is an archive containing the project files. You must install it, and anything it depends on, manually, using the included instructions. If a packaged form is available for your distro, it is recommended you install that, as it's typically easier/quicker.

Ubuntu 16.04 AMD64:


Caution! Please read for more information.
It is worth mentioning that this package installs to "/opt/mudpf". When uninstalling a debian package, package managers typically remove empty directories. If "/opt" is empty (it is by default), when uninstalling MUDPF, "/opt" will be removed. This is not an issue, but if for any reason you wish to avoid this, just put something in "/opt" before uninstalling MUDPF. Alternatively, you can always create a new "/opt" directory after uninstalling MUDPF.



Install:

cd ~/Downloads
wget --output-document=mudpf_7.0-1.deb "https://www.dropbox.com/s/kh29hpk4ngdx1kz/mudpf_7.0-1.deb?dl=1"
sudo apt-get update
sudo apt-get install gdebi
if [[ "984db5d04185edaa7d0f21de5786cb2d92e829b0b26de91de308ec570a37255d356df8458ffe4f6ac4013d4ce241af3ef346c89039fbbeb461569f5ca22af07d" == $(sha512sum mudpf_7.0-1.deb | sed 's/ .*//g' | tr -d '\n') ]]; then echo "File is good."; else echo "File is bad."; fi
sudo gdebi mudpf_7.0-1.deb
rm mudpf_7.0-1.deb
cd ~/
Uninstall:

sudo apt-get purge mudpf





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users