FILE 1: /home/workout-plan-generator.digitalprank.com/public_html/tool_config.json code JSON { "tool": { "identity": { "slug": "workout-plan-generator", "name": "Workout Plan Generator", "category": "prank", "tagline": "Get jacked with totally custom workout routines!", "description": "Generate hilarious, over-the-top custom workout plans with ridiculous exercises, made-up trainers, and epic fitness goals. Perfect for pranks, memes, or just a laugh.", "keywords": ["custom workout", "funny gym plan", "fitness prank", "workout meme", "digital prank"] }, "features": { "bulk_enabled": false, "history_enabled": true, "export_enabled": true, "api_enabled": true }, "fields": [ { "id": "goal_type", "type": "select", "label": "Fitness Goal", "default": "shredzilla", "options": [ { "value": "shredzilla", "label": "Become Shredzilla" }, { "value": "dad_bod_upgrade", "label": "Upgrade Dad Bod" }, { "value": "beach_biceps", "label": "Beach Biceps Only" }, { "value": "hollywood_chest", "label": "Hollywood Chest Gains" }, { "value": "zero_effort_abs", "label": "Zero-Effort Abs" } ], "required": true, "pro_only": false, "help_text": "Pick your absurd fitness goal. Results may vary (wildly)." }, { "id": "gender", "type": "select", "label": "Gender", "default": "any", "options": [ { "value": "male", "label": "Male" }, { "value": "female", "label": "Female" }, { "value": "non_binary", "label": "Non-Binary" }, { "value": "any", "label": "Surprise Me" } ], "pro_only": false, "help_text": "We tailor the plan to your vibe… or not." }, { "id": "difficulty", "type": "select", "label": "Workout Intensity", "default": "medium", "options": [ { "value": "easy", "label": "Beginner (Low Sweat)" }, { "value": "medium", "label": "Intermediate (Sore Tomorrow)" }, { "value": "extreme", "label": "Extreme (No Survivors)" } ], "pro_only": true, "help_text": "Pick how hard you *think* you want to train." }, { "id": "include_supplements", "type": "checkbox", "label": "Include Custom Supplement Suggestions", "default": true, "pro_only": true, "help_text": "Adds ridiculous product suggestions like Unicorn Protein Powder." }, { "id": "include_testimonials", "type": "checkbox", "label": "Include Custom Testimonials", "default": false, "pro_only": true, "help_text": "Get custom reviews from made-up jacked influencers." } ], "limits": { "tier_daily": { "free": 3, "basic": 25, "gold": 100, "ultimate": -1 }, "rate_limit_per_minute": 10, "max_concurrent_requests": 3 }, "billing": { "credit_cost": 1, "one_off_enabled": true, "one_off_price_cents": 99, "bill_on": "success" }, "ui": { "theme": { "primary_color": "#1DB954", "secondary_color": "#121212" }, "layout": { "show_sidebar_ads": true, "form_style": "wizard", "result_display": "fullscreen" } }, "dependencies": { "php_extensions": ["json", "curl"], "system_packages": [], "python_packages": ["faker", "jinja2"], "requires_internet": false }, "database": { "tool_specific_table": "custom_workout_plan_history", "store_results": true, "enable_history": true, "retention_days": 30 }, "seo": { "meta_title": "Workout Plan Generator | Hilarious Gym Routines | DigitalPrank.com", "meta_description": "Generate custom workout plans with absurd exercises and meme-worthy routines. Perfect for gym bros, fitness influencers, or practical jokers.", "canonical_url": "https://digitalprank.com/tools/workout-plan-generator", "structured_data": { "type": "WebApplication", "category": "Entertainment" } }, "help": { "quick_start": [ "Step 1: Pick your custom goal and gender.", "Step 2: Customize intensity (Pro).", "Step 3: Add custom supplements/testimonials (optional).", "Step 4: Click 'Generate Plan' and laugh hard.", "Step 5: Download or share your workout masterpiece." ], "faq": [ { "question": "Is this a real workout plan?", "answer": "Nope. Absolutely not. This is for entertainment only. If you try to follow it, please don’t sue us when you attempt ‘Fire Hydrant Lunges’ with actual fire hydrants." }, { "question": "Can I customize the plan?", "answer": "Yes! Pro users can change difficulty, add custom products, and even export in multiple formats." }, { "question": "Can I share my custom plan?", "answer": "Absolutely! We encourage sharing the absurdity on social media. Tag us!" } ], "examples": [ { "title": "The Shredzilla 6-Pack Blitz", "description": "Unreal core workout with explosive custom cardio.", "input": { "goal_type": "shredzilla", "gender": "male", "difficulty": "extreme" } }, { "title": "Dad Bod to Rad God Plan", "description": "Hilarious mix of pushups, yard work, and emotional lunges.", "input": { "goal_type": "dad_bod_upgrade", "gender": "any", "difficulty": "easy" } } ] }, "monitoring": { "track_usage": true, "track_performance": true, "error_reporting": true, "analytics_events": [ "workout_plan_generated", "pro_upgrade" ] }, "security": { "input_sanitization": true, "csrf_protection": true, "rate_limiting": true, "blocked_domains": [], "max_input_length": 200, "allowed_file_types": ["pdf"] }, "version": { "schema": "3.0.0", "tool": "1.0.0", "api_version": "v1" } } } FILE 2: /home/workout-plan-generator.digitalprank.com/public_html/processor.php code PHP setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); } catch (PDOException $e) { http_response_code(500); logUsage(null, 'workout-plan-generator', $_SERVER['REMOTE_ADDR'], null, 'db_connection_failed', [], ['error' => 'Database connection failed.'], 0); echo json_encode(['success' => false, 'message' => 'Error: Cannot connect to the service. Please try again later.']); exit; } // --- Configuration & Initialization --- $startTime = microtime(true); $config_path = __DIR__ . '/tool_config.json'; if (!file_exists($config_path)) { http_response_code(500); logUsage($pdo, 'workout-plan-generator', $_SERVER['REMOTE_ADDR'], null, 'config_missing', [], ['error' => 'Config file not found.'], 0); echo json_encode(['success' => false, 'message' => 'Error: Tool configuration is missing.']); exit; } $config = json_decode(file_get_contents($config_path), true)['tool']; $tool_slug = $config['identity']['slug']; // --- Input & User --- $input = json_decode(file_get_contents('php://input'), true); $user_id = isset($_SESSION['user_id']) ? $_SESSION['user_id'] : null; $user_ip = $_SERVER['REMOTE_ADDR']; $response = [ 'success' => false, 'data' => null, 'message' => '', 'usage' => [], 'access' => [], 'features' => $config['features'] ]; try { // --- Access Control & Usage Limits --- $access = getUserAccessLevel($pdo, $user_id, $tool_slug); $response['access'] = $access; $limit = $config['limits']['tier_daily'][$access['tier']]; $usageCheck = checkDailyUsage($pdo, $tool_slug, $user_ip, $user_id, $limit); $response['usage'] = $usageCheck; if (!$usageCheck['can_proceed']) { throw new Exception("Daily usage limit reached. Upgrade for more.", 429); } // --- CSRF Protection --- if (!isset($input['csrf_token']) || !hash_equals($_SESSION['csrf_token'], $input['csrf_token'])) { throw new Exception("Invalid session token. Please refresh the page.", 403); } // --- Feature Overrides --- $overrides = getToolOverrides($pdo, $tool_slug); foreach ($config['fields'] as &$field) { if (isset($overrides[$field['id']])) { $field['pro_only'] = ($overrides[$field['id']]['tier_required'] !== 'free'); if ($overrides[$field['id']]['override_type'] === 'disabled') { $field['disabled'] = true; } } } unset($field); // {{TOOL_PROCESSING_START}} // --- Input Validation --- $validated_input = []; $field_map = array_column($config['fields'], null, 'id'); $required_fields = array_filter($field_map, fn($f) => $f['required'] ?? false); foreach ($required_fields as $field_id => $field_config) { if (!isset($input[$field_id]) || empty($input[$field_id])) { throw new Exception("Missing required field: " . $field_config['label']); } } foreach ($input as $key => $value) { if (!isset($field_map[$key])) continue; $field_config = $field_map[$key]; if (isset($field_config['disabled']) && $field_config['disabled']) { throw new Exception("Field " . $field_config['label'] . " is currently disabled."); } if ($field_config['pro_only'] && !$access['has_pro_access']) { if (($field_config['type'] === 'checkbox' && $value === true) || ($field_config['type'] !== 'checkbox' && $value !== $field_config['default'])) { throw new Exception("You must have a Pro account to use the '{$field_config['label']}' feature."); } } // Sanitize and validate $sanitized_value = filter_var($value, FILTER_SANITIZE_FULL_SPECIAL_CHARS); if ($field_config['type'] === 'select') { $allowed_values = array_column($field_config['options'], 'value'); if (!in_array($sanitized_value, $allowed_values)) { throw new Exception("Invalid value for " . $field_config['label']); } } $validated_input[$key] = $sanitized_value; } // --- Content Generation Data --- $workout_data = [ 'exercises' => [ 'shredzilla' => ['Ab-bliterating Giga-Crunches', 'Volcano Squats', 'T-Rex Rows', 'Supernova Shoulder Press', 'Black Hole Lunges'], 'dad_bod_upgrade' => ['Lawnmower Pulls (each side)', 'Competitive Napping', 'Grocery Bag Farmer\'s Walk', 'Taking Out The Trash Sprints', 'Remote Control Curls'], 'beach_biceps' => ['Diamond-Cutter Curls', 'Ocean Wave Hammer Curls', 'Sun-God Bicep Pose (Hold)', 'Tidal Wave Tricep Extensions', 'Sand Bucket Raises'], 'hollywood_chest' => ['Red Carpet Flys', 'Paparazzi Push-ups (explosive)', 'Action Hero Bench Press', 'Movie Star Pullovers', 'Stuntman Dips'], 'zero_effort_abs' => ['Abdominal Contemplation', 'Synergistic Sofa Twists', 'Core Stabilization (while watching TV)', 'Deep Breathing Reps', 'Positive Affirmation Planks'] ], 'trainers' => [ 'male' => ['Chad Broseph', 'Rick Gains', 'Swole Daddy'], 'female' => ['Buffy McSwole', 'Tina Tonik', 'Shreddy Betty'], 'non_binary' => ['Alex Flex', 'Jordan Iron', 'Ripley Power'] ], 'supplements' => ['Unicorn Protein Powder', 'Gamer-Grade Pre-Workout', 'Kryptonite Creatine', 'Phoenix Tears Post-Workout', 'Hulk-Smash Mass Gainer'], 'testimonials' => [ 'I followed this plan for 3 days and now my biceps have their own biceps. Thanks, {TRAINER}!', 'My dad bod has been upgraded to a rad bod. 10/10 would mow the lawn for gains again.', 'I thought "Zero-Effort Abs" was a joke. It is, but now I can laugh without my core hurting. A win-win.', 'The Hollywood Chest Gains plan got me mistaken for a celebrity. Now I have a restraining order against the paparazzi. Worth it.', 'I am Shredzilla. Hear me roar. And see my abs.' ], 'titles' => [ 'shredzilla' => 'The Shredzilla Apocalypse Protocol', 'dad_bod_upgrade' => 'The Dad Bod to Rad God Transformation', 'beach_biceps' => 'Operation Beach Annihilation: Biceps Edition', 'hollywood_chest' => 'The A-List Chest & Pecs Blueprint', 'zero_effort_abs' => 'The Path of Least Resistance to a Six-Pack' ] ]; // --- Generation Logic --- $goal = $validated_input['goal_type']; $gender = $validated_input['gender']; $difficulty = $access['has_pro_access'] ? ($validated_input['difficulty'] ?? 'medium') : 'medium'; $include_supps = $access['has_pro_access'] && ($validated_input['include_supplements'] ?? false); $include_tests = $access['has_pro_access'] && ($validated_input['include_testimonials'] ?? false); if ($gender === 'any') { $gender = array_rand(array_flip(['male', 'female', 'non_binary'])); } $trainer = $workout_data['trainers'][$gender][array_rand($workout_data['trainers'][$gender])]; $plan = [ 'planTitle' => $workout_data['titles'][$goal], 'trainerName' => $trainer, 'goal' => $field_map['goal_type']['options'][array_search($goal, array_column($field_map['goal_type']['options'], 'value'))]['label'], 'difficulty' => $field_map['difficulty']['options'][array_search($difficulty, array_column($field_map['difficulty']['options'], 'value'))]['label'], 'weeklySchedule' => [] ]; $difficulty_map = [ 'easy' => ['sets' => 3, 'reps' => '8-10', 'days' => 2], 'medium' => ['sets' => 4, 'reps' => '10-12', 'days' => 3], 'extreme' => ['sets' => 'As many as you can before you cry', 'reps' => 'To failure, then one more', 'days' => 5] ]; $sets_reps = $difficulty_map[$difficulty]; $selected_exercises = $workout_data['exercises'][$goal]; shuffle($selected_exercises); $days_of_week = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; for ($i = 0; $i < $sets_reps['days']; $i++) { $day_plan = [ 'day' => $days_of_week[$i], 'focus' => 'Full Body ' . ucfirst($goal) . ' Assault', 'exercises' => [] ]; $exercises_for_day = array_slice($selected_exercises, 0, rand(3,4)); foreach($exercises_for_day as $ex) { $day_plan['exercises'][] = [ 'name' => $ex, 'sets' => $sets_reps['sets'], 'reps' => $sets_reps['reps'] ]; } $plan['weeklySchedule'][] = $day_plan; } if ($include_supps) { shuffle($workout_data['supplements']); $plan['supplementStack'] = array_slice($workout_data['supplements'], 0, rand(2,3)); } if ($include_tests) { $testimonial = $workout_data['testimonials'][array_rand($workout_data['testimonials'])]; $plan['testimonial'] = str_replace('{TRAINER}', $trainer, $testimonial); } $output_data = $plan; // --- Store Results in Database --- if ($config['database']['store_results'] && $user_id) { $sql = "INSERT INTO {$config['database']['tool_specific_table']} (user_id, goal_type, gender, difficulty, settings_json, plan_output) VALUES (?, ?, ?, ?, ?, ?)"; $stmt = $pdo->prepare($sql); $settings = json_encode(['supplements' => $include_supps, 'testimonials' => $include_tests]); $stmt->execute([$user_id, $goal, $gender, $difficulty, $settings, json_encode($output_data)]); } // {{TOOL_PROCESSING_END}} $response['success'] = true; $response['data'] = $output_data; } catch (Exception $e) { $response['message'] = $e->getMessage(); http_response_code($e->getCode() > 200 ? $e->getCode() : 400); } $processingTime = microtime(true) - $startTime; logUsage($pdo, $tool_slug, $user_ip, $user_id, 'generate', $input, $response, $processingTime); // Update daily usage count on success if ($response['success']) { updateDailyUsage($pdo, $tool_slug, $user_ip, $user_id); $response['usage']['current_usage']++; } echo json_encode($response); FILE 3: /home/workout-plan-generator.digitalprank.com/public_html/tool_form.php```php 'free', 'has_pro_access' => false]; // In a real app, this would be fetched // Example: require_once 'path/to/user/functions.php'; $user_access = getUserAccessLevel(); ?>
You do not have permission to view this page.
'); } ini_set('display_errors', 1); error_reporting(E_ALL); function check($description, description}' . htmlspecialchars($result) . ''; } } catch (Exception e->getMessage()) . ''; } echo "
| Check | Status |
|---|