OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
social_media
/
linkedin
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/16/2024 12:36:51 PM
rwxr-xr-x
📁
bin
-
10/18/2024 02:16:38 PM
rwxr-xr-x
📄
function.php
4.59 KB
10/16/2024 12:36:52 PM
rw-r--r--
📄
index.php
486 bytes
10/18/2024 02:25:32 PM
rw-r--r--
📄
linkedinPost.php
1.18 KB
10/18/2024 02:25:32 PM
rw-r--r--
📄
linkedin_credentials.json
142 bytes
10/18/2024 02:25:32 PM
rw-r--r--
📄
linkedin_function.php
17.91 KB
10/18/2024 02:25:32 PM
rw-r--r--
📄
linkedin_post_handler.php
4.17 KB
10/18/2024 02:25:32 PM
rw-r--r--
📄
linkedin_setup.php
7.66 KB
10/18/2024 02:25:32 PM
rw-r--r--
📄
linkedin_setup_handler.php
1.23 KB
10/21/2024 12:26:28 PM
rw-r--r--
📄
test.json
1.73 KB
10/18/2024 02:25:32 PM
rw-r--r--
📄
test.php
1.92 KB
10/18/2024 02:25:32 PM
rw-r--r--
Editing: linkedinPost.php
Close
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); 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; }