Need help with Chaturbate API coding.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adulttemps
    Confirmed User
    • May 2002
    • 320

    #51
    do you have an actual cron job setup to run cron.php however often you want to update?
    Hillipino Money with Cams

    Comment

    • Freedoom
      Confirmed User
      • Feb 2006
      • 2811

      #52
      Originally posted by adulttemps
      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
      List Of Sex Cams

      Comment

      • Panty Snatcher
        eat a peach for Hours
        • Aug 2013
        • 540

        #53
        30 minutes is too long

        try every 3 - 5 minutes

        Comment

        • Barry-xlovecam
          It's 42
          • Jun 2010
          • 18083

          #54
          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*

          Comment

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

            #55
            Originally posted by Freedoom
            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.

            .
            All cookies cleared!

            Comment

            • linkhouse
              Registered User
              • Jun 2014
              • 68

              #56
              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.

              Comment

              • linkhouse
                Registered User
                • Jun 2014
                • 68

                #57
                Originally posted by Freedoom
                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.

                Comment

                • adulttemps
                  Confirmed User
                  • May 2002
                  • 320

                  #58
                  updated the bonga script, had a typo on the male category
                  Hillipino Money with Cams

                  Comment

                  • linkhouse
                    Registered User
                    • Jun 2014
                    • 68

                    #59
                    Originally posted by adulttemps
                    updated the bonga script, had a typo on the male category
                    Thank you

                    Comment

                    • k33n
                      Confirmed User
                      • Feb 2009
                      • 201

                      #60
                      Originally posted by adulttemps
                      @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

                      Comment

                      • linkhouse
                        Registered User
                        • Jun 2014
                        • 68

                        #61
                        Originally posted by adulttemps
                        updated the bonga script, had a typo on the male category
                        Are you going to do more API scripts for other cam sites too?

                        Comment

                        • adulttemps
                          Confirmed User
                          • May 2002
                          • 320

                          #62
                          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.
                          Hillipino Money with Cams

                          Comment

                          • j3rkules
                            VIP
                            • Jul 2013
                            • 22111

                            #63
                            Originally posted by adulttemps
                            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.

                            Comment

                            • saimonyz
                              Registered User
                              • Apr 2016
                              • 14

                              #64
                              Prompt inexpensive hosting for this script
                              BomCams.NET PearCams.COM

                              Comment

                              • Andreweb
                                Confirmed User
                                • Mar 2013
                                • 2431

                                #65
                                Originally posted by saimonyz
                                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
                                Make Money With: Chaturbate
                                Cheap Reliable Hosting

                                Comment

                                • linkhouse
                                  Registered User
                                  • Jun 2014
                                  • 68

                                  #66
                                  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?

                                  Comment

                                  • linkhouse
                                    Registered User
                                    • Jun 2014
                                    • 68

                                    #67
                                    bump, if anyone know

                                    Comment

                                    • Kafka
                                      Confirmed User
                                      • Oct 2002
                                      • 466

                                      #68
                                      Try loadHTMLFile('your_html')

                                      Comment

                                      • saimonyz
                                        Registered User
                                        • Apr 2016
                                        • 14

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

                                        Comment

                                        • menxzy
                                          Confirmed User
                                          • Dec 2015
                                          • 76

                                          #70
                                          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

                                          • Firestarter30
                                            Confirmed User
                                            • Sep 2010
                                            • 167

                                            #71
                                            Originally posted by menxzy
                                            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 ( AFFID, TRACK, $gender='', THUMB_CNT ); 
                                            
                                            to
                                            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

                                            • menxzy
                                              Confirmed User
                                              • Dec 2015
                                              • 76

                                              #72
                                              Originally posted by Firestarter30
                                              change
                                              PHP Code:
                                              get_cams ( AFFID, TRACK, $gender='', THUMB_CNT ); 
                                              
                                              to
                                              PHP Code:
                                              get_cams ( AFFID, TRACK, $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

                                              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

                                              Comment

                                              • menxzy
                                                Confirmed User
                                                • Dec 2015
                                                • 76

                                                #73
                                                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

                                                Comment

                                                Working...