View Single Post
Old 04-27-2024, 08:13 AM  
Darkhorse
Horsing Around
 
Darkhorse's Avatar
 
Industry Role:
Join Date: Sep 2002
Location: AU
Posts: 5,832
Quote:
Originally Posted by fris View Post
you could fetch the html of the model page and check for the status.

methods

1. regex
2. simplehtmldom
3. didom (which i like)
Something like this should work.

Code:
<?php
// Model URL to check
$url = "https://chaturbate.com/shinyways/";

// Create a new DOMDocument
$doc = new DOMDocument();

// Load the webpage content
@$doc->loadHTMLFile($url);

// Check if the model is online
$onlineElement = $doc->getElementById('room_subject');
if ($onlineElement !== null) {
    // Model is online
    echo "shinyways is online!";
} else {
    // Model is not online
    echo "shinyways is not online.";
}
?>
Darkhorse is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote