Quote:
Originally Posted by fris
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.";
}
?>