do you have an actual cron job setup to run cron.php however often you want to update?
Need help with Chaturbate API coding.
Collapse
X
-
-
Comment
-
-
If you want to just cache the current XML of online models ...
Works with PHP 5 untested with PHP 7*PHP Code:<?php //debugging comment out when done error_reporting(E_ALL); ini_set('display_errors', '1'); //cache the working XML file locally $sFileName = './name.xml'; $iCurrentTime = time(); $iFiletime = filemtime($sFileName); if ($iFiletime < $iCurrentTime - 120) { $data = file_get_contents('http://URL_here'); $fp = fopen($sFileName, 'w+'); fwrite($fp, $data); fclose($fp); } ///load cached xml file $xml = simplexml_load_file("name.xml"); //You do the rest :OP{...} ?>Comment
-
If it is not updating from both cron and running from the browser then you probably have a permissions problem with the folder that the xml file is being written to.
If it will write when you run cron from the browser then make sure to delete the file before you try to update it from the cron. If the file was created from a run from the browser then the run from cron might not be able to delete the file created from the run from browser, again because of permissions issues.
.All cookies cleared!Comment
-
-
Thank you man! It's working great@keen - checkout v2.1 I changed up the directory structure a bit but the functions are pretty much the same.
Just keep in mind some of the models put fake ages so the categories wont be 100% accurate.
https://github.com/hillipino/Chaturbate-API
Comment
-
Probably, list off other ones that have the XML feeds and I'll take a look. I have ACWM on my list as of now.Comment
-
Comment
-
-
A cloud VPS from DigitalOcean will be fine ! Also if you want a shared hosting you can try HawkHost , I had NMIP script instaled there and it worked with no problem ! If you want here you'll find reviews of 3 hosting that I use : HostingComment
-
help please
Code:[24-Aug-2016 14:55:06 America/Chicago] PHP Warning: SimpleXMLElement::__construct(): /home/domain/public_html//includes/data/feed.xml:2: parser error : Premature end of data in tag thumbnail_image_medium_live line 2 in /home/domain/public_html/includes/functions.php on line 36 [24-Aug-2016 14:55:06 America/Chicago] PHP Warning: SimpleXMLElement::__construct(): nail_image_medium_live>//i3.bongacams.com/live/01a/380/3df/medium/a20411d175e7f7 in /home/domain/public_html/includes/functions.php on line 36 [24-Aug-2016 14:55:06 America/Chicago] PHP Warning: SimpleXMLElement::__construct(): ^ in /home/domain/public_html/includes/functions.php on line 36 [24-Aug-2016 14:55:06 America/Chicago] PHP Warning: SimpleXMLElement::__construct(): /home/domain/public_html//includes/data/feed.xml:2: parser error : Premature end of data in tag profile_images line 2 in /home/domain/public_html/includes/functions.php on line 36 [24-Aug-2016 14:55:06 America/Chicago] PHP Warning: SimpleXMLElement::__construct(): nail_image_medium_live>//i3.bongacams.com/live/01a/380/3df/medium/a20411d175e7f7 in /home/domain/public_html/includes/functions.php on line 36 [24-Aug-2016 14:55:06 America/Chicago] PHP Warning: SimpleXMLElement::__construct(): ^ in /home/domain/public_html/includes/functions.php on line 36 [24-Aug-2016 14:55:06 America/Chicago] PHP Warning: SimpleXMLElement::__construct(): /home/domain/public_html//includes/data/feed.xml:2: parser error : Premature end of data in tag online_models line 2 in /home/domain/public_html/includes/functions.php on line 36 [24-Aug-2016 14:55:06 America/Chicago] PHP Warning: SimpleXMLElement::__construct(): nail_image_medium_live>//i3.bongacams.com/live/01a/380/3df/medium/a20411d175e7f7 in /home/domain/public_html/includes/functions.php on line 36 [24-Aug-2016 14:55:06 America/Chicago] PHP Warning: SimpleXMLElement::__construct(): ^ in /home/domain/public_html/includes/functions.php on line 36 [24-Aug-2016 14:55:06 America/Chicago] PHP Warning: SimpleXMLElement::__construct(): /home/domain/public_html//includes/data/feed.xml:2: parser error : Premature end of data in tag online_models line 2 in /home/domain/public_html/includes/functions.php on line 36 [24-Aug-2016 14:55:06 America/Chicago] PHP Warning: SimpleXMLElement::__construct(): nail_image_medium_live>//i3.bongacams.com/live/01a/380/3df/medium/a20411d175e7f7 in /home/domain/public_html/includes/functions.php on line 36 [24-Aug-2016 14:55:06 America/Chicago] PHP Warning: SimpleXMLElement::__construct(): ^ in /home/domain/public_html/includes/functions.php on line 36 [24-Aug-2016 14:55:06 America/Chicago] PHP Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /home/domain/public_html/includes/functions.php:36 Stack trace: #0 /home/domain/public_html/includes/functions.php(36): SimpleXMLElement->__construct('/home/domain/...', 0, true) #1 /home/domain/public_html/includes/templates.php(174): get_banner() #2 [internal function]: tpl_home(Array) #3 /home/domain/public_html/classes/arix.class.php(59): call_user_func('tpl_home', Array) #4 /home/domain/public_html/index.php(39): axl_Core->start() #5 {main} thrown in /home/domain/public_html/includes/functions.php on line 36Code:[25-Aug-2016 02:00:01 America/Chicago] PHP Notice: Undefined index: HTTP_ACCEPT_ENCODING in /home/domain/public_html/index.php on line 10 [25-Aug-2016 02:00:02 America/Chicago] PHP Notice: Undefined index: HTTP_ACCEPT_ENCODING in /home/domain/public_html/index.php on line 10 [25-Aug-2016 02:00:02 America/Chicago] PHP Notice: Undefined index: HTTP_ACCEPT_ENCODING in /home/domain/public_html/index.php on line 10 [25-Aug-2016 02:00:02 America/Chicago] PHP Notice: Undefined index: HTTP_ACCEPT_ENCODING in /home/domain/public_html/index.php on line 10 [25-Aug-2016 02:00:02 America/Chicago] PHP Notice: Undefined index: HTTP_ACCEPT_ENCODING in /home/domain/public_html/index.php on line 10
Comment
-
Hello everyone,
Just Install chaturbate api v2.1 but ive got some problem and i dont have knowledge in php, so please help my questions:
1. i want only show male cams only. the problem is in related cam show show all cams (mostly girls and couple). how to edit _solo.php to make sure only male showing in related.
2. how to check if my cron is working?
3. in chaturbate site we can browse model base tags. is possible to use tags instead age / hd/news etc?
sorry for my english, hope everyone understand what i mean.Comment
-
changeHello everyone,
Just Install chaturbate api v2.1 but ive got some problem and i dont have knowledge in php, so please help my questions:
1. i want only show male cams only. the problem is in related cam show show all cams (mostly girls and couple). how to edit _solo.php to make sure only male showing in related.
2. how to check if my cron is working?
3. in chaturbate site we can browse model base tags. is possible to use tags instead age / hd/news etc?
sorry for my english, hope everyone understand what i mean.
toPHP Code:get_cams ( AFFID, TRACK, $gender='', THUMB_CNT );
PHP Code:get_cams ( AFFID, TRACK, $category = 'm', THUMB_CNT );
For cronjob, open terminal and type
crontab -u yourusername -e
/1 * * * * /usr/bin/php absolute-location-that-cron.php-resides > absolute-location-of-chaturbate.log 2>&1
(downloads the xml every minute)
Im not using the tags , so i dont know.Comment
-
Thank you its working. i just test on shared hosting and got suspend. not sure that because chaturbate api or my other wordpress site. i will transfer to my vps after got unsuspend
sorry i dont understand the exact full command example cron location is domain.com/includes/cron.phpFor cronjob, open terminal and type
crontab -u yourusername -e
/1 * * * * /usr/bin/php absolute-location-that-cron.php-resides > absolute-location-of-chaturbate.log 2>&1
(downloads the xml every minute)
Im not using the tags , so i dont know.
but for now i use wget commandComment


Comment