OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
testing
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/28/2024 11:03:35 AM
rwxrwxr-x
📄
accessTest copy.php
657 bytes
10/07/2024 05:44:48 AM
rw-r--r--
📄
accessTest.php
657 bytes
10/08/2024 07:28:15 AM
rw-r--r--
📁
backup
-
10/07/2024 05:44:52 AM
rwxr-xr-x
📄
composer-setup.php
57.07 KB
10/07/2024 05:44:51 AM
rwxr-xr-x
📄
composer.json
64 bytes
10/07/2024 05:44:51 AM
rw-r--r--
📄
composer.lock
2.81 KB
10/07/2024 05:44:51 AM
rw-r--r--
📄
composer.phar
2.86 MB
10/07/2024 05:44:52 AM
rwxr-xr-x
📄
configuration.txt
79 bytes
10/07/2024 05:44:51 AM
rw-r--r--
📁
cream
-
10/07/2024 05:39:15 AM
rwxr-xr-x
📄
credential copy.json
556 bytes
10/07/2024 05:44:51 AM
rw-r--r--
📄
credential.json
556 bytes
10/07/2024 05:44:51 AM
rw-rw-rw-
📄
db_connect.php
341 bytes
10/07/2024 05:44:51 AM
rw-r--r--
📄
function.php
18.87 KB
10/10/2024 09:04:44 AM
rw-r--r--
📄
get_facebook_access_token.php
1.94 KB
09/04/2024 05:58:04 AM
rw-r--r--
📄
index.php
476 bytes
10/08/2024 07:28:06 AM
rw-r--r--
📄
navbar.php
1.63 KB
10/07/2024 11:24:58 AM
rw-r--r--
📁
new_folder
-
10/07/2024 05:44:53 AM
rwxr-xr-x
📄
new_index.php
10.08 KB
10/10/2024 08:40:32 AM
rw-r--r--
📄
permissionTest.php
1.31 KB
09/04/2024 05:58:04 AM
rw-r--r--
📄
postTest.php
3.43 KB
10/08/2024 07:28:28 AM
rw-r--r--
📄
post_to_page.php
2.29 KB
09/04/2024 05:58:04 AM
rw-r--r--
📄
share_facebook.php
2.02 KB
10/08/2024 07:28:28 AM
rw-r--r--
📄
sidebar.php
3.08 KB
10/07/2024 11:28:08 AM
rw-r--r--
📄
update_fb_pages.php
347 bytes
10/10/2024 09:05:33 AM
rw-r--r--
📁
vendor
-
07/20/2024 07:09:34 AM
rwxr-xr-x
Editing: postTest.php
Close
<? ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); include 'function.php'; include 'db_connect.php'; $gUserId = 999; $pageId = $_GET['pageId']; echo "<pre>"; print_r($_POST); echo "</pre>"; // Long-Lived Access Token // $longLivedToken = 'EAAGvb6fjh0YBO32eFQzgo93fTwfvZAJRs5iMCSbLDKB9cZCRmS29Gz1wiVUjrMoevJHkozCo02icx6WhxYrGYA9pktT3mVrUsKnfAMLZCHhQn5UhVYSC925PZA3dm2d8MiVb5DiHpXF04XmgUuwvFAmDZBPMhv5ZBIvtqs7IOrohHK5AWtIT2ozGBmZC2QEfC7y2DcAJwZDZD'; // Facebook App Credentials $credentials = json_decode(file_get_contents('credential.json'), true); // $pageAccessToken = $credentials['longLivedToken']; // This should be the page access token $pageAccessToken = facebook_fetch_page_token($db, $gUserId, $pageId); // URL to post to the page $postUrl = 'https://graph.facebook.com/v16.0/me/feed'; // Check if form data is posted if (isset($_POST['message']) && isset($_POST['action'])) { $message = $_POST['message']; if (isset($_POST['link'])) { $link = $_POST['link']; } else { $link = ''; } $scheduleTimestamp = null; if ($_POST['action'] == 'post_now') { $response = facebook_post_to_page($message, $link); echo $response['message']; } else if ($_POST['action'] == 'schedule_post') { $scheduleDate = $_POST['scheduleDate']; $scheduleTime = $_POST['scheduleTime']; // Get the submitted date and time // Combine date and time into a single string $dateTimeString = $scheduleDate . ' ' . $scheduleTime; // Create a DateTime object in IST $istTimezone = new DateTimeZone('Asia/Kolkata'); $localDateTime = new DateTime($dateTimeString, $istTimezone); // Get the Unix timestamp $scheduleTimestamp = $localDateTime->getTimestamp(); echo $scheduleTimestamp . "<br>"; $response = facebook_schedule_post_to_page($message, $link, $scheduleTimestamp); echo $response['message']; } } else { // Display the form for posting a message ?> <!-- <form action="" method="POST"> <textarea name="message" placeholder="Write your message here..." required></textarea> <textarea name="link" placeholder="Enter the link to be shared..."></textarea> <button type="submit">Post</button> </form> --> <form id="postForm" action="" method="POST"> <textarea name="message" placeholder="Write your message here..." required></textarea> <textarea name="link" placeholder="Enter the link to be shared..."></textarea> <div> <input type="radio" id="postNow" name="action" value="post_now" checked onclick="this.form.scheduleDate.value=''; this.form.scheduleTime.value='';" /> <label for="postNow">POST NOW</label> <input type="radio" id="schedulePost" name="action" value="schedule_post" onclick="this.form.scheduleDate.value=''; this.form.scheduleTime.value='';" /> <label for="schedulePost">SCHEDULE POST</label> </div> <div id="scheduleOptions"> <label for="scheduleDate">Select date:</label> <input type="date" id="scheduleDate" name="scheduleDate"> <label for="scheduleTime">Select time:</label> <input type="time" id="scheduleTime" name="scheduleTime"> </div> <button type="submit">Submit</button> </form> <?php } ?>