img, preg_replace, extract, source
For situations where an image is stored inside a WYSIWYG editor you cannot pass that directly an img tag instead you need to extract the source path inside the <img src=''> tags. This can be done by using this regular expression.
This snippet looks inside a $content variable and looks for all img tags and extracts the src path and created a new img tag from them. This allows classes to be added to images.
opendir, mkdir, readdir, is_dir, copy
This function is used to copy a folder and all its contents and sub folders, its params are as follows:
1) The source folder path
2) The destination path (should not exist)
file_get_contents, fileput_contents, str_replace
This function is used to rename all instances of a word in a file.
Pararms are as follows:
1) Path to the file
2) The name to rename
3) The new name to be used
This class deletes a directory along with its contents no matter how deep/nested its sub-directories are.
glob, array_map, str_getcsv, file
Read all CSV files from a directory.
CSV, array_map, str_getcsv, file
using array_map to apply ste_getcsv to a CSV file to convert it's contents into an array.
facebook, graph api, groups poster
this script can be use to autopost to facebook groups using graph api
Forgot your password?
Don't have an account? Register
Copyright © 2011 - 2018 created by David Carr Web Developer. All code MIT license. All rights reserved. Built using Simple MVC Framework