![]() |
Need help with Chaturbate API coding.
Hello. Im building a custom Chaturbate API script site.
I having some trubble figuring out some of the php code. I want to get specific data from the chaturbate XML feed. Now to the problem. I dont know how to code to recieive information for a specific model. Lets say i want to get data from modelxxx , age, from, language, root topic etc. And then display it on the page. Maybe someone here have a small finish php code for that. Thank you |
There are several ways to do what you are trying to do.
1. When you read the xml feed load it to a database then whenever you need info about a particular record just read it from the database. 2. If you don't want to use a db for some reason then each time you want the info on a particular record read through the xml feed to get the info. 3. When putting the info for the thumbs up, put each thumb in a form and include the info needed for the individual model as form variables and then use the form data to make the individual page. Hope that helps. . |
Quote:
|
I figured it out my self :)
thank you anyway. |
https://github.com/hillipino/Chaturbate-API can rip the code or any other code from this.
|
Quote:
|
need bongacams api script does anyone have?
|
soft 404
@adulttemps your Cb script is great.Any ideas how to solve soft 404 pages generated if username is not online?For example if a visitor comes from a SE link like domain.com/cam/username but the username is offline,page has no content because there is no info to extract from xml.Soft 404 in google eyes and bad website experience for visitor.Thanks
|
Quote:
tnx. |
Quote:
I took a look and right now because some of the display stuff is in the functions there are actually 2 different solo_cams() functions, one for adulttemps Version 1 (v1) and one for version 2 (v2). The differences between the 2 are because of the display stuff inside the functions. The problem of nobody on line can be solved by modifying the solo_cams function. 1. Near the beginning define a variable to use as a switch as to whether the cam was found or not ($found_cam=0;) 2. Then if the cam is found change the value of the switch ($found_cam=1;) 3. Then check to see if the cam was found and if it wasn't then put something else up. (if(!$found_cam){do something here;}) It would end up looking something like this: Code:
// Print Solo Cams |
Good Idea, Illl try to implement something like that soon. Also there is a bongacams version at my github page for whoever asked above.https://github.com/hillipino
|
updated the script to use sarettah's suggestion for the offline cams.
|
Quote:
|
Quote:
@sarettah You never let down :thumbsup Thanks a lot guys.It's working great now. |
@adulttemps
category not working for script bongacams Female Cams - not working Male Cams - not working Couple Cams - not working Lesbian Cams - not working Tranny Cams - working how to fix? |
Quote:
. |
can you show the links section of your settings.php
|
if you want just female set CATEGORY to female
define ( 'CATEGORY', 'all' ); // What category do you want to show ( all , male, female, tranny) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Links ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// switch ( CATEGORY ) { case 'all': $category_string = '&categories[]=female&categories[]=male&categories[]=transsexual'; break; case 'female': $category_string = '&categories[]=female'; break; case 'male': $category_string = '&categories[]=male'; break; case 'tranny': $category_string = '&categories[]=transsexual'; break; } define ( 'XML_FILE', 'http://tools.bongacams.com/promo.php?c=226355&type=api&api_type=xml' . $category_string ); |
@adulttemps
screenshot rghost(dot)ru/8P9rj9bpq/image.png |
Quote:
There you go. . |
Are you sure the feed is being fetched? If so, make sure that your server can write to the includes/data/feed.xml file
|
@adulttemps
yes its work includes/data/feed.xml file working cams/tranny not working cams/male cams/female cams/couple cams/lesbian you working all category? please test and tell me |
define ( 'CATEGORY', 'all' ); // What category do you want to show ( all , male, female, tranny)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Links ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// switch ( CATEGORY ) { case 'all': $category_string = '&categories[]=female&categories[]=male&categories[]=transsexual'; break; case 'female': $category_string = '&categories[]=female'; break; case 'male': $category_string = '&categories[]=male'; break; case 'tranny': $category_string = '&categories[]=transsexual'; break; } define ( 'XML_FILE', 'You are only allowed to post URLs to other sites after you have made 30 posts or more.' . $category_string ); |
Did anyone notice that there are no males and shemales cams in bonga xml??I just checked and only females and couples are included.Anyway,back to CB api.
I tried to get cams by category,so i defined categories Code:
if( $cam->age <= "21" ) { Code:
function cams_by_category( $affid, $track, $age, $limit ){ Code:
function tpl_category_cams() { Code:
$core->addCommand('live', 'tpl_category_cams', 'title','', 'Keywords'); |
@k33n
please upload modified files |
keen, I will work on an age based query this evening. It shouldnt't be that hard
|
Quote:
I don't see any code for multi languages in the template.php The simple 2 ways to fix that is: A) Change the XML url in settings.php - You have to ad the "&lang=en" likte that: define ( 'XML_FILE', 'http://tools.bongacams.com/promo.php?c=123456&lang=en&type=api&api_type=xml' . $category_string ); B) Define/update gender for each language in template.php. |
finally some useful threads here :)
|
Thanks man,really appreciated :thumbsup
@saimonyz I dont have the option to upload files.But you can take a look here https://github.com/hillipino/Chaturbate-API.It's the same script, i use the outdated version,the one from NMIP. :1orglaugh Functions are the same. |
@k33n ok
@TitanWM thanks It works category not working Male, one does not understand what needs to be changed in template.php and why in my lang=en&type=api&api_type=xml no <gender>Male</gender> [HIDE=1] can anyone be able to realize what site is JSON script bonga-cams(dot)ru bonga-cams(dot)ru/temp/ bonga-cams(dot)ru/footer_seo.js bonga-cams(dot)ru/footer-links.js bonga-cams(dot)ru/header-links.js bonga-cams(dot)ru/top_model.js bonga-cams(dot)ru/top-menu.js [/HIDE] |
@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 |
Quote:
change $gender = 'Male';" to $gender = 'Males'; |
Quote:
|
Quote:
|
Set use cron to false or setup a cronjob to update the feed
|
@adulttemps
Cron.php in V.2.1 are wrong. require('templates.php'); don't exist anymore. |
Oops forgot to update that, its fixed now. Thanks for the heads up
|
Quote:
|
Quote:
I found the error, you need to remove the "includes/" in every line! |
yep updated the git repo as well
<?php // Include Settings require('settings.php'); require('functions.php'); get_xml(); echo 'nothing here to see'; ?> |
Quote:
failed to open stream: No such file or directory in /includes/includes/data/feed.xml one /includes to much. |
Quote:
"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! |
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 |
Quote:
|
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
|
Version 2.1, is there a way to change the _banner display to a Male or Shemale? Now it only shows top viewer.
|
Quote:
code: function tpl_banner() { $cams = new SimpleXMLElement(FLATFILE, null, true); $count = 0; foreach( $cams as $cam ){ if ( $cam->gender == s ) { if ( $count == 0 ) { |
Quote:
|
Quote:
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'); |
Quote:
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 |
All times are GMT -7. The time now is 02:02 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc