Need help with Chaturbate API coding.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sarettah
    see you later, I'm gone
    • Oct 2002
    • 14293

    #16
    Originally posted by saimonyz
    @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?
    Make it a Tranny Cam site? ;p

    .
    All cookies cleared!

    Comment

    • adulttemps
      Confirmed User
      • May 2002
      • 320

      #17
      can you show the links section of your settings.php
      Hillipino Money with Cams

      Comment

      • adulttemps
        Confirmed User
        • May 2002
        • 320

        #18
        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 );
        Hillipino Money with Cams

        Comment

        • saimonyz
          Registered User
          • Apr 2016
          • 14

          #19
          @adulttemps

          screenshot
          rghost(dot)ru/8P9rj9bpq/image.png
          BomCams.NET PearCams.COM

          Comment

          • sarettah
            see you later, I'm gone
            • Oct 2002
            • 14293

            #20
            Originally posted by saimonyz
            @adulttemps

            screenshot
            rghost(dot)ru/8P9rj9bpq/image.png


            There you go.

            .
            All cookies cleared!

            Comment

            • adulttemps
              Confirmed User
              • May 2002
              • 320

              #21
              Are you sure the feed is being fetched? If so, make sure that your server can write to the includes/data/feed.xml file
              Hillipino Money with Cams

              Comment

              • saimonyz
                Registered User
                • Apr 2016
                • 14

                #22
                @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
                BomCams.NET PearCams.COM

                Comment

                • saimonyz
                  Registered User
                  • Apr 2016
                  • 14

                  #23
                  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 );
                  BomCams.NET PearCams.COM

                  Comment

                  • k33n
                    Confirmed User
                    • Feb 2009
                    • 201

                    #24
                    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" ) {
                    	
                      $age= "teen";
                    
                    } elseif ($cam->age > "21" && $age <= "30" ){
                    
                      $age= "women";
                    
                    } elseif ($cam->age > "30" && $age <= "40" ) {
                    
                      $age = "milf";
                    
                    } elseif ($cam->age > "40" ) {
                    
                      $age = "mature";
                    
                    } else {
                    
                     $age = "";
                    }
                    From what i can understand,existing functions,print cams by gender,so i copied get_related function,modified name and changed every $gender with $age.My new function :

                    Code:
                    function cams_by_category( $affid, $track, $age, $limit ){
                    
                    if( $cam->age <= "21" ) {
                    	
                      $age= "teen";
                    
                    } elseif ($cam->age > "21" && $age <= "30" ){
                    
                      $age= "women";
                    
                    } elseif ($cam->age > "30" && $age <= "40" ) {
                    
                      $age = "milf";
                    
                    } elseif ($cam->age > "40" ) {
                    
                      $age = "mature";
                    
                    } else {
                    
                     $age = "";
                    }
                    
                    				if ( $_GET['arg1'] ) {
                    
                    					if ( is_numeric( $_GET['arg1'] ) ) {
                    
                    						$page = $_GET['arg1'];
                    
                    						$targetpage = 'live/';
                    
                    					} else {
                    
                    						$targetpage = 'live/' . $_GET['arg1'] . '/';
                    
                    						if ( $_GET['arg2']  ) {
                    
                    							if ( is_numeric( $_GET['arg2'] ) ) {
                    
                    								$page = $_GET['arg2'];
                    
                    							} 
                    
                    						} else {
                    
                    							$page = 1;
                    						}
                    					} 
                    
                    				} else {
                    
                    					$targetpage = 'live/';
                    
                    					$page = 1;
                    
                    				}
                    
                    				$end 	= $page * $limit;
                    
                    				$start	= $end - $limit;
                    
                    				$xml = '../cache/cams.xml';
                    
                    				$cams = new SimpleXMLElement($xml, null, true);
                    
                    				// Count the total cams
                    
                    				if ( $age != '' ) {
                    
                    					$doc = new DOMDocument();
                    
                    					$doc->load($xml);
                    
                    					$totalCams = 0;
                    
                    					foreach( $doc->getElementsByTagName('age') as $tag ) 
                    
                    					{
                    
                    						// to iterate the children
                    
                    						foreach( $tag->childNodes as $child ) 
                    
                    						{
                    
                    							// outputs the xml of the child nodes. Of course, there are any number of
                    
                    							// things that you could do instead!
                    
                    							$i = $doc->saveXML($child);
                    
                    							
                    
                    							if ($i == $age )
                    
                    								$totalCams++;
                    
                    						}
                    
                    					}
                    
                    				} else {
                    
                    					$totalCams = count($cams);
                    
                    				}
                    
                    				echo '
                    						<div class="row">
                    
                    							<div class="12u">
                    
                    								<ul class="cb_thumbs">
                    
                    				';
                    
                    				$count = 0;
                    
                    				foreach( $cams as $cam ){ 
                    
                    					if ( $cam->age == $age ) {
                    
                    						if ( $count >= $start && $count < $end ) {
                    
                    							print_cams($cam);							
                    						}
                    
                    						$count++;
                    
                    					} 
                    
                    					if ( $age == '' ) {
                    
                    						if ( $count >= $start && $count < $end ) {
                    
                    								print_cams($cam);
                    
                    						}
                    
                    						$count++;
                    
                    					}				
                    
                    				}
                    
                    				echo '
                    								</ul>
                    
                    							</div>
                    
                    						</div>
                    				';
                    		
                    			}
                    Call function in template file :
                    Code:
                    function tpl_category_cams() {
                    
                      $age = $_GET['arg1'];
                    
                    		cams_by_category( AFFID, TRACK, $age, 60 );
                    Added in new page in index.php :

                    Code:
                    	$core->addCommand('live', 'tpl_category_cams', 'title','', 'Keywords');
                    Result: ALL CAMS,All ages At least i get something

                    Comment

                    • saimonyz
                      Registered User
                      • Apr 2016
                      • 14

                      #25
                      @k33n
                      please upload modified files
                      BomCams.NET PearCams.COM

                      Comment

                      • adulttemps
                        Confirmed User
                        • May 2002
                        • 320

                        #26
                        keen, I will work on an age based query this evening. It shouldnt't be that hard
                        Hillipino Money with Cams

                        Comment

                        • TitanWM
                          Confirmed User
                          • Dec 2015
                          • 111

                          #27
                          Originally posted by saimonyz
                          @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
                          I think you are trying to load the XML file from outside the US ? Look in your XML file and you will see, that the gender of each cam ist not declared like in the template.php.

                          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.
                          CamSoda invite link - promote an unsatisfied cam site!

                          Comment

                          • bns666
                            Confirmed Fetishist
                            • Mar 2005
                            • 11553

                            #28
                            finally some useful threads here
                            CAM SODASTRIPCHAT
                            CHATURBATEX LOVE CAM

                            Comment

                            • k33n
                              Confirmed User
                              • Feb 2009
                              • 201

                              #29
                              Thanks man,really appreciated

                              @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. Functions are the same.

                              Comment

                              • saimonyz
                                Registered User
                                • Apr 2016
                                • 14

                                #30
                                @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]
                                BomCams.NET PearCams.COM

                                Comment

                                Working...