View Single Post
Old 12-15-2014, 08:01 AM  
EddyTheDog
Just Doing My Own Thing
 
EddyTheDog's Avatar
 
Industry Role:
Join Date: Jan 2011
Location: London, Spain, New Zealand, GFY - Not Croydon...
Posts: 25,038
Quote:
Originally Posted by Paz View Post
Just building one now on what was a hosted tube site. I don't know where I found the script but it uses the Chaturbate API and you just do a "for each where cam='male'. It's taken two days to get the url rewrites & pagination working properly. The other problem is that a 2 meg XML feed is a bloody inefficient way to capture and process online cams, and that the individual cams are in an iframe but it's work in progress and I'm having fun too.
I have 2 ideas for the feed - Just downloading and caching it with a cron job every few minutes works well - Then use the XML locally - Or writing it to a database that would keep all performer details and update them to being on/offline...

I have been working with the downloaded XML file and it works well so I might stick with that.....

PHP Code:
<?php

$cacheName 
'chatcache.xml';

$ageInSeconds 60;
 
if(!
file_exists($cacheName) || filemtime($cacheName) > time() + $ageInSeconds); 
{
  
$contents file_get_contents('http://chaturbate.com/affiliates/api/onlinerooms/?format=xml&wm=isCir');
  
file_put_contents($cacheName$contents);
}

?>
This is what I have been using to generate the cache file - EdgeProd will probably say it's crap code - It works though...
__________________
-

Chaturbate Script - https://gfy.com/fucking-around-and-b...er-issues.html - Now supports White Labels
EddyTheDog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote