GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Need help with Chaturbate API coding. (https://gfy.com/showthread.php?t=1194563)

linkhouse 05-06-2016 12:05 PM

Quote:

Originally Posted by adulttemps (Post 20878766)
yep updated the git repo as well

<?php

// Include Settings

require('settings.php');
require('functions.php');


get_xml();

echo 'nothing here to see';

?>

I must have something wrong in the code, error list:

failed to open stream: No such file or directory in

/includes/includes/data/feed.xml

one /includes to much.

linkhouse 05-06-2016 12:07 PM

Quote:

Originally Posted by linkhouse (Post 20878961)
I must have something wrong in the code, error list:

failed to open stream: No such file or directory in

/includes/includes/data/feed.xml

one /includes to much.

I found the error. settings.php says:

"define ( 'FLATFILE', BASEPATH . '/includes/data/feed.xml'); // Name of file to store xml feed into"

includes/ must be deleted.

But then the website is not working :( hmmmm...


Update:
I edit some of the path in functions:

define ( 'BASEPATH', '/home/xxx/public_html/xxx .com/' );
define ( 'FLATFILE', BASEPATH . '/includes/data/feed.xml');

Now it works good!

adulttemps 05-06-2016 12:28 PM

define ( 'BASEPATH', '/home/xxx/public_html/xxx .com/' );
define ( 'FLATFILE', BASEPATH . '/includes/data/feed.xml');

should be

define ( 'BASEPATH', '/home/xxx/public_html/xxx .com' );
define ( 'FLATFILE', BASEPATH . '/includes/data/feed.xml');

removing the '/' from the end of the basepath

linkhouse 05-06-2016 02:21 PM

Quote:

Originally Posted by adulttemps (Post 20879015)
define ( 'BASEPATH', '/home/xxx/public_html/xxx .com/' );
define ( 'FLATFILE', BASEPATH . '/includes/data/feed.xml');

should be

define ( 'BASEPATH', '/home/xxx/public_html/xxx .com' );
define ( 'FLATFILE', BASEPATH . '/includes/data/feed.xml');

removing the '/' from the end of the basepath

Thank you! You are the best! :thumbsup

Freedoom 05-07-2016 04:52 AM

Anyone manage to fix the problem with the cron? I've updated to the new cron.php and I run the cron but the site doesn't get update. The site only gets updated when I turn the cron to false

linkhouse 05-07-2016 06:34 AM

Version 2.1, is there a way to change the _banner display to a Male or Shemale? Now it only shows top viewer.

linkhouse 05-07-2016 06:44 AM

Quote:

Originally Posted by linkhouse (Post 20879978)
Version 2.1, is there a way to change the _banner display to a Male or Shemale? Now it only shows top viewer.

I think I solved the problem, I put in: if ( $cam->gender == s )

code:

function tpl_banner() {

$cams = new SimpleXMLElement(FLATFILE, null, true);
$count = 0;


foreach( $cams as $cam ){

if ( $cam->gender == s ) {
if ( $count == 0 )

{

Freedoom 05-07-2016 06:52 AM

Quote:

Originally Posted by linkhouse (Post 20879978)
Version 2.1, is there a way to change the _banner display to a Male or Shemale? Now it only shows top viewer.

you fix the problem with the cron in 2.1?

linkhouse 05-07-2016 12:55 PM

Quote:

Originally Posted by Freedoom (Post 20880035)
you fix the problem with the cron in 2.1?

Yes. Download the latest cron.php file from the v2.1

And check that settings.php have the right paths

For exempel:

define ( 'BASEPATH', '/home/xxx/public_html/xxx .com' );
define ( 'FLATFILE', BASEPATH . '/includes/data/feed.xml');

Freedoom 05-07-2016 01:26 PM

Quote:

Originally Posted by linkhouse (Post 20880668)
Yes. Download the latest cron.php file from the v2.1

And check that settings.php have the right paths

For exempel:

define ( 'BASEPATH', '/home/xxx/public_html/xxx .com' );
define ( 'FLATFILE', BASEPATH . '/includes/data/feed.xml');

Yes I did.
But the new settings.php in V2.1 doesn't have that base path.

define ( 'BASEPATH', getcwd() );
define ( 'FLATFILE', BASEPATH . '/includes/data/feed.xml');
If I removed the includes/ it doesn't work.
The only way the site is updated is only if I turn the cron to false

adulttemps 05-07-2016 09:05 PM

do you have an actual cron job setup to run cron.php however often you want to update?

Freedoom 05-08-2016 03:11 AM

Quote:

Originally Posted by adulttemps (Post 20881109)
do you have an actual cron job setup to run cron.php however often you want to update?

Yes every 30 minutes. Also I run the cron.php by myself and it doesn't update

Panty Snatcher 05-08-2016 05:48 AM

30 minutes is too long

try every 3 - 5 minutes

Barry-xlovecam 05-08-2016 06:06 AM

If you want to just cache the current XML of online models ...

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{...}

?>

Works with PHP 5 untested with PHP 7*

sarettah 05-08-2016 06:21 AM

Quote:

Originally Posted by Freedoom (Post 20881268)
Yes every 30 minutes. Also I run the cron.php by myself and it doesn't update

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.

.

linkhouse 05-10-2016 07:06 AM

Bonga API script. I have problem. The Male cams are not showing. All other works ok. But no cams for Male is working. The XML file do contains Male cams.

linkhouse 05-10-2016 07:14 AM

Quote:

Originally Posted by Freedoom (Post 20881268)
Yes every 30 minutes. Also I run the cron.php by myself and it doesn't update

Check your error log file after you try manual running cron.php. there you can see if there is a problem.

adulttemps 05-10-2016 09:08 AM

updated the bonga script, had a typo on the male category

linkhouse 05-10-2016 10:54 AM

Quote:

Originally Posted by adulttemps (Post 20885708)
updated the bonga script, had a typo on the male category

Thank you

k33n 05-11-2016 01:37 AM

Quote:

Originally Posted by adulttemps (Post 20876273)
@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

Thank you man! It's working great :bowdown

linkhouse 05-14-2016 06:39 AM

Quote:

Originally Posted by adulttemps (Post 20885708)
updated the bonga script, had a typo on the male category

Are you going to do more API scripts for other cam sites too?

adulttemps 05-15-2016 08:32 PM

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.

j3rkules 05-16-2016 05:34 AM

Quote:

Originally Posted by adulttemps (Post 20897279)
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.

It would be great if you could add Xlovecam as well.

saimonyz 05-20-2016 05:13 AM

Prompt inexpensive hosting for this script

Andreweb 05-20-2016 08:16 AM

Quote:

Originally Posted by saimonyz (Post 20907992)
Prompt inexpensive hosting for this script

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 : Hosting

linkhouse 08-11-2016 09:47 AM

I have a script error:

Warning: DOMDocument::load(): Empty string supplied as input in /home/xxx/public_html/domain.xyz/includes/functions.php on line 298

Any idea?

linkhouse 08-22-2016 02:07 PM

bump, if anyone know

Kafka 08-23-2016 05:51 AM

Try loadHTMLFile('your_html')

saimonyz 08-28-2016 03:22 AM

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&gt;//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&gt;//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&gt;//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&gt;//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 36

Code:

[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


menxzy 09-26-2016 08:09 AM

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.

Firestarter30 09-28-2016 07:29 PM

Quote:

Originally Posted by menxzy (Post 21184351)
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.

change
PHP Code:

get_cams AFFIDTRACK$gender=''THUMB_CNT ); 

to
PHP Code:

get_cams AFFIDTRACK$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.

menxzy 10-01-2016 03:15 PM

Quote:

Originally Posted by Firestarter30 (Post 21190708)
change
PHP Code:

get_cams AFFIDTRACK$gender=''THUMB_CNT ); 

to
PHP Code:

get_cams AFFIDTRACK$category 'm'THUMB_CNT ); 


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 :1orglaugh

Quote:

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.
sorry i dont understand the exact full command example cron location is domain.com/includes/cron.php
but for now i use wget command

menxzy 10-06-2016 10:49 AM

Hi guys,

Please help how to change domain.com/cam/usercam become domain.com/usercam.

Also is there people install this script on nginx server?

thanks


All times are GMT -7. The time now is 11:59 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc