Skip to content

Instantly share code, notes, and snippets.

View flyingwebie's full-sized avatar
:octocat:
Coding coding coding...bug

Flying Web Solutions flyingwebie

:octocat:
Coding coding coding...bug
  • flyingwebsolutions
  • Cork
View GitHub Profile
Name : Finding vulnerabilities in PHP scripts FULL ( with examples )
Author : SirGod
Email : sirgod08@gmail.com
Contents :
1) About
2) Some stuff
3) Remote File Inclusion
3.0 - Basic example
3.1 - Simple example
@cartpauj
cartpauj / mepr-active-memberships.php
Created March 7, 2018 15:51
Get a list of the current user's active MemberPress Subscriptions
<?php
if(class_exists('MeprUtils')) {
$user = MeprUtils::get_currentuserinfo();
if($user !== false && isset($user->ID)) {
//Returns an array of Membership ID's that the current user is active on
//Can also use 'products' or 'transactions' as the argument type
$active_prodcuts = $user->active_product_subscriptions('ids');
if(!empty($active_prodcuts)) {
@nbeers22
nbeers22 / remove-meta-wordpress.php
Last active July 3, 2023 23:10
Remove all the extra bloat of meta tags that WordPress adds to the <head> and disables the JSON API
<?php
// remove some meta tags from WordPress
remove_action('wp_head', 'wp_generator');
function remove_dns_prefetch( $hints, $relation_type ) {
if ( 'dns-prefetch' === $relation_type ) {
return array_diff( wp_dependencies_unique_hosts(), $hints );
}
return $hints;
}
@mattclements
mattclements / function.php
Last active April 16, 2024 17:04
Wordpress Disable Comments (add to function.php)
<?php
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_redirect(admin_url());
exit;
}
@marijn
marijn / README.markdown
Last active October 1, 2023 13:42
List of countries in YAML, CSV and TXT format