OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
social_media
/
linkedin
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📁
bin
-
11/19/2024 11:51:16 AM
rwxr-xr-x
📄
function.php
4.59 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
index.php
430 bytes
05/19/2025 10:07:13 AM
rw-r--r--
📄
linkedinPost.php
1.12 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
linkedin_credentials.json
142 bytes
12/26/2024 08:39:27 AM
rw-r--r--
📄
linkedin_function.php
17.91 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
linkedin_post_handler.php
4.16 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
linkedin_setup.php
8.26 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
linkedin_setup_handler.php
1.18 KB
05/19/2025 10:07:13 AM
rw-r--r--
📄
test.json
1.73 KB
12/26/2024 08:39:27 AM
rw-r--r--
📄
test.php
1.92 KB
05/19/2025 10:07:13 AM
rw-r--r--
Editing: linkedinPost.php
Close
<?php ini_set('display_startup_errors', 1); include 'linkedin_function.php'; include '../db_connect.php'; if (isset($_GET['code'])) { // Load credentials from JSON file $credentials = json_decode(file_get_contents('linkedin_credentials.json'), true); // Check if credentials are loaded correctly if ($credentials === null) { throw new Exception('Failed to load credentials from credential.json.'); } $code = $_GET['code']; // Attempt to obtain the access token try { $accessToken = linkedin_generate_access_token($db, $credentials, $code, 'https://knoblycream.com/social_media/linkedin/linkedinPost.php'); $title = 'Knobly Cream'; $url = 'https://knoblycream.com'; $text = 'Welcome to Knobly Cream'; $description = 'Create | Reach | Measure'; // Use the access token to post to LinkedIn postToLinkedIn($accessToken, $title, $url, $text, $description); } catch (Exception $e) { echo "Error: " . $e->getMessage(); exit; } } else { echo "No authorization code provided."; exit; }