12-23-2020, 10:05 AM
|
|
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,057
|
This was posted January 28th, 2014:
Quote:
I had given xxxxxxx a sneak peek at this last Friday or so. I have done a couple of tweaks too it since then.
Some changes to note:
this version is driven off a mysql database that is updated through a cron job. This gets rid of the page lag on the original which was caused by the page fetch. This way we are only doing the page fetch one time for all users instead of once per page hit.
The sort link provided on the front page are all ajax calls to the database.
The chatscreen portion and how each cam looks is controlled by a template file, much like xxxxxxx has described xxxxxxx using.
http://madspiders.com/chatscript/camfox_script.zip
I have not protected the link yet. Please do not disseminate the link beyond this group. You guys are free to use it as you see fit.
There is a readme file in there with some brief instructions. I did a test to make sure they are correct.
readme.txt
January 28, 2014 - Release #2 of initial script. Not doing versions yet.
Chaturbate white label script by [email protected]
Made for the folks at xxxxxxxxxxxxxxx.
This is a script package to create a chaturbate white label type site using the chaturbate api xml version feed at
You must be a registered chaturbate affiliate to use the feeds. If you want sign up under me then go to
if you don't want to give me credit then just go to and sign up.
There are no guarantees regarding this script package. It is use at your own risk.
I will provide any help I can with setting it up and getting it working.
If you need to contact me then please send me an email at [email protected] or hit me with a PM on xxxxxxxxx
This script uses php and mysql. It is using the PDO object for database access.
There are 18 files in this package. It was zipped with the directory structure intact.
--Files--
The following files are included:
1. readme.txt - The file that you are reading right now.
2. changes.txt - Informal change log
3. table_schema.sql - Table structure for the users table
4. index.htm - The main page template file
5. includes/functions - has the database connectionf function
6. includes/dbcreds.php - contains the info necessary to connect to the databse
7. includes/.htaccess - basic htaccess file that disallows access to the includes folder for all but your server
8. cron/.htaccess - basic htaccess file that disallows access to the cron folder for all but your server
9. cron/chat_db_update.php - used to periodically refresh the database. Should be called by a cron job on the server
10. ajax/chatscreen.php - This file creates the list of chat models that appears on the main page
11. js/main.js - This contains all the custom java scriptlets used by the script
12. styles/style.css - This contains the style sheet used by the script
13. templates/item_template.htm - This contains the structure for each of the cam boxes that appear on the main page
14. dumps/.htaccess - basic htaccess file that disallows access to the dumps folder for all but your server
15. images/logo.jpg - camfoxes log. Please replace with your own logo
16. js/jquery-1.9.1.js - jquery library
17. js/jquery-ui.js - jquery ui library
18. styles/smoothness-jquery-ui.css - jquery smoothness styles
--Instructions--
First unzip the package to a folder on your desktop.
Create the database to be used by the script.
--Database stuff--
In the main folder there is a file called table_schema.sql. This contains an importable database structure for the users table. This is used to store the chat models information.
Create a database on your server and then import the table_schema.sql file to that database. You can also create the table by hand using the schema as your map.
--File stuff--
Do the following edits:
includes/dbcreds.php - edit the username, password, datbase name and database host to the values needed for your server.
cron/chat_db_update.php - edit the includepath, chatfeedlink and mysite variables.
The includepath should be the internal server path to your includes folder. Something like /home/user/site/includes.
The chatfeedlink should be the link to your xml feed (obtained at chaturbate tools)
The mysite var should be the full url to the site. It is used as the referral string in the xml feed pull.
index.htm - There is a bunch to edit here but none of it effects the site operating. They are all the normal edits you would do on a site. Title
description, keywords, warning page verbiage, site text verbiage.
--Please Note - new edit --
The feed from chaturbate includes urls for both free signups and revshare programs. If you do not change the default value, when the
main chat model list is being written, the urls associated with them will be split 50/50 between revshare and free signup.
If you want to change this you can edit it in the top of the chatscreen.php file.
Where you see $free_pct=50; change the 50 to whatever percent you want to have be free signup. All others will be revshare.
ie:if you set free_pct to 20 then 20% of the displayed cams will be tagged with your free signup url and 80% will be tagged with your
revshare url.
cron/.htaccess - I reccomend you add a line allowing your ip to access this so you can run the update program from the browser if needed.
There is nothing else that requires editing in order to get this up and running.
--Upload the directory structure from your desktop to the server --
You do not (and probably should not) need to upload the readme.txt file or the table_schema.sql file to the server
on the server change the permissions in the dump directory to allow write acces. for me this is 777, set it to whatever the tightest security you can on your server and still have it writeable from the script when running serverside.
--Load the database--
do an initial database load. Either disable htaccess in the cron folder or add your ip as mentioned above.
In your favorite browser enter the address to the update script. ie: Page Not Found - 404 Error Page
The script should run for a few seconds and then show you a run down of what it did. If you get no output or an error mesaage then you have something wrong somewhere. If you get no output then errors are probably disabled on your server. they might be in an error log or we might have some debugging to do to get to the issue.
if you have an error message to work with then it will probably point you to the problem.
Once the database is loaded intially the site should operate properly.
If you disabled .htaccess for this then you should reenable it.
--set up cron--
On my install I have the database update portion running every 5 minutes from a cron on my server. I thought this was a reasonable time interval.
I also have a javascript timer running on the page which refreshes the chat window every 5 minutes. If you want more frequent updates then run the cron more often and change the time interval in the javascript (explained later).
Your host should be able to help you with setting up a cron for this. If you are unmanaged then you will do it yourself I guess.
The line from my cron for this looks like:
*/5 * * * * /usr/local/bin/php -q /server_path_to_site/cron/chat_db_update.php > /server_path_to_site/dumps/chatdb.dump
This will run the cron every 5 minutezs and put any output from the program in the dumps folder in a folder called chatdb.dump.
The dump file can be very handy for debugging but you do not have to include it if you don't want to.
--Other edits--
If you want additional info from the feed in the various cam boxes edit the template/item_template.htm file to include the tags then in
the ajax/chatscreen.php edit the tag replace section to make sure the tags are handled properly.
Index.htm should be edited to what you want the page to look like. There are several divs that the scripts use so they need to exist.
Chatdiv is used to house the webcam model list.
Currentshow is used for the preview window.
Titlediv is used for the message about how many models are online.
Warningdiv is used for the warning page text and enter/exit links.
Well, that is about all I have to say.
Have fun. I hope it works for you.
January 28, 2014
Last edited by sarettah; January 28th, 2014 at 04:40 PM.
|
__________________
All cookies cleared!
|
|
|