Skip to content

Instantly share code, notes, and snippets.

View phpdreams's full-sized avatar

Bill Wheeler phpdreams

  • Web Dynamyx LLC
  • Mountain Home, Arkansas USA
View GitHub Profile
@phpdreams
phpdreams / htaccess-check.php
Created March 11, 2020 00:05
.htaccess validator
<?php
$email = 'your@email.com';
$path = '/home/*';
$folders = glob($path, GLOB_ONLYDIR);
foreach($folders as $folder){
// skip non-client directories
if(fileowner($folder) < 1001) continue;
@phpdreams
phpdreams / rebuild-cache.php
Created April 28, 2018 00:17
Speaker List Cache Generation
<?php
// this will read in all the speakers, sort them by date, then store in a file for use later
$speakerList = [
'speaker-file',
];
$speakers_all = [];
foreach($speakerList as $speaker) {
$speakers_all[$speaker] = include_once("./speakers/{$speaker}.php");
$speakers_all[$speaker]['bullet-points'] = text2bullets($speakers_all[$speaker]['bullet-points']);
@phpdreams
phpdreams / gist:61e6f72b48bff35565cc55784a1e0ff2
Created April 19, 2016 17:09
Memberium Cross-Site Login
[raw]
<h2 style="text-align: center;">Transferring to OtherMemberiumSite.com</h2>
<p style="text-align: center;"><img src="/wp-content/uploads/2016/04/icon-loading.gif" /></p>
[/raw]
<form id="memb-login" action="https://othermemberiumsite.com/wp-login.php" method="post">
<input type="hidden" name="log" id="user_login" class="input" value="[memb_contact fields='Email']" />
<input type="hidden" name="pwd" id="user_pass" class="input" value="[memb_contact fields='Password']" />
</form>
@phpdreams
phpdreams / class_extractor.php
Created January 15, 2016 07:39
PHP snippet to extract the methods and parameters from a class you can't otherwise access.
<?php
/**
* Snippet to extract information about a class you don't have access to.
*/
$extractClass = $GLOBALS['someclass'];
$className = get_class( $extractClass );
$classMethods = get_class_methods( $extractClass );
echo "Class: $className\n";