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)
-   -   follow me building my first cam page - www.camporn.xxx (https://gfy.com/showthread.php?t=1265038)

lokee81 05-30-2017 08:42 AM

follow me building my first cam page - www.camporn.xxx
 
Hi all,

I am going to try my luck with this and see how it goes.

I got this domain www(dot)camporn(dot)xxx

I decided I will go with Chaturbate and try to build the affiliate from scratch, using API's

I have been looking around and I can't seem to find any API documentation for chaturbate?

I have played around with the embedded videos, but they do not seem to load for me. I get 'room currently offline' Even when changing the url to different rooms.

I don't get why I get this message?

I have the code on my page now. If someone could give me a pointer to get this loading ?

Thanks for the help!

lokee81 05-30-2017 09:28 AM

doh
 
I figured it out, I was linking to my own room, instead of the top room. :/


Anyway,

I will be going trough the steps in this posts, trying to take you on the way as I figure out how to build an affiliate webcam. So If you are interested or want to help out, please follow me and give some input.

This is the first time doing this, and perhaps this will be to some help to others also trying to build pages.

Plutocracy 05-30-2017 09:43 AM

Get rid of just another wordpress site :)

magneto664 05-30-2017 04:29 PM

these pages on the web is 1 billion - tomorrow we will see another 100 new and another 100 will disappear - Your next stop: message from google about duplicate and low quality content - budget -70 bucks for .xxx domain.

lokee81 05-31-2017 08:22 AM

Quote:

Originally Posted by magneto664 (Post 21802156)
these pages on the web is 1 billion - tomorrow we will see another 100 new and another 100 will disappear - Your next stop: message from google about duplicate and low quality content - budget -70 bucks for .xxx domain.

Well, thank you for the encouraging words. What do you mean by these pages ? what is your page? Could you perhaps give some pointers in how to not be one of these 100 that disappear?

OneMillionGirls 05-31-2017 05:32 PM

CamPorn dot xxx is under construction!
we will be back soon!

ironwebmaster 06-01-2017 02:25 PM

Good luck with your project!

Tjeezers 06-02-2017 01:45 PM

so... do you need any help?
We are here to get you going!

Starting with WordPress is a very good way, there are some great themes and plugin combinations possible that help you working with live cam promo tools you get from your sponsor. Chaturbate is good start, try also many others.

Put some time in it :)

tomash999 06-04-2017 05:56 AM

Quote:

Originally Posted by lokee81 (Post 21803245)
Well, thank you for the encouraging words. What do you mean by these pages ? what is your page? Could you perhaps give some pointers in how to not be one of these 100 that disappear?

Perhaps everyone can buy a domain and figure out how to create a white label site, so creating an affiliate site that will behave the same, is not so different.

Here are some helpful questions:
What other values the user gets from the website?
Why a user will find it different?

Part of the answer is that this is not a webcam site. Another webcam site like Chaturbate, where performers can register and perform, can make a difference. But it is not as easy as to create a white label or an affiliate site.

Making it more unique can be by adding more features, like online store, videos on demand etc.

This leads to another question, if it is different and harder to create, is it worth it?

fendlestick 06-04-2017 05:31 PM

Quote:

Originally Posted by lokee81 (Post 21801331)
I have been looking around and I can't seem to find any API documentation for chaturbate?

Theres isn't any docs, it has one endpoint, a JSON feed that contains your aff link code, and cam related data.

lokee81 06-06-2017 09:05 AM

Thanks for all the replies. I have been away for the week-end and have not had time to do any updates.

I tried to link into the JSON file but I ran into a problem,

XMLHttpRequest cannot load (link to JSON file). No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '(www(dot)camporn(dot)xxx' is therefore not allowed access.

I read that when accessing JSON files it needs to be on the same domain ? If someone could give me a helping hand what Javascript code would be right to access the file I will be flying.

Many thanks

sarettah 06-06-2017 11:08 AM

Quote:

Originally Posted by lokee81 (Post 21815644)
Thanks for all the replies. I have been away for the week-end and have not had time to do any updates.

I tried to link into the JSON file but I ran into a problem,

XMLHttpRequest cannot load (link to JSON file). No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '(www(dot)camporn(dot)xxx' is therefore not allowed access.

I read that when accessing JSON files it needs to be on the same domain ? If someone could give me a helping hand what Javascript code would be right to access the file I will be flying.

Many thanks

You cannot load the json version (or any other version) directly that way because of cross domain restrictions.

You need to pull the API to your server, then you can use ajax to pull it from your domain on your server.

Piece 1. On your server you periodically pull in the feed (either JSON, XML, or YAML). Store that data on your server.

Piece 2. From an html page, served from your server, pull the data from your server to be displayed.

There are a bunch of threads in here discussing the Chaturbate API. So, while how to use the API documentation on Chaturbate is sparse, there is plenty here to be found if you just look for it. The documentation on CB's site merely shows you what fields you can get. It does state that you will need access to a programmer, that is because most programmers will be familiar with how to work with a feed.

Here are links to the old No Money in Porn scripts. Please note: I did NOT write these and I DO NOT support these scripts, I am merely keeping them available so people can get a hold of them. So don't be emailing or PMing me with a whole bunch of questions about them.

Stand Alone version: http://www.madspiders.com/nmip/nmip_...standalone.zip
WordPress plugin version: http://www.madspiders.com/nmip/nmpch..._wp_plugin.zip

Here are some of the threads dealing with the API, no particular order:

Embed Live Cams Script

Chaturbate API help

WP Chaturbate Plugin

Add Online Feature

Save Created XML

Chaturbate API Coding

Hope that helps.

.

lokee81 06-07-2017 09:17 AM

Great! Thanks for the info. I did some searching and found that I can use a cron job to download this file
I belive the command would be something like this :

curl -o mychaturbate.json (http)/chaturbate(dot)com/affiliates/api/onlinerooms/?format=json&wm=C9m5N

I will have to test this out tonight, please correct me if I am wrong.

lokee81 06-07-2017 09:35 AM

hm, this didn't work quite right.

The only thing i got saved in my new file was this : [ ] , nothing else.

any other ways of pulling this JSON file ? What have I done wrong here?

sarettah 06-07-2017 10:43 AM

Quote:

Originally Posted by lokee81 (Post 21817939)
hm, this didn't work quite right.

The only thing i got saved in my new file was this : [ ] , nothing else.

any other ways of pulling this JSON file ? What have I done wrong here?

You use a program to pull a feed.

So in PHP for example it would be something like:

// First get the feed
$my_json_feed = file_get_contents('chaturbate feed url');

// Second decode the json data
$my_json_data = json_decode($my_json_feed);

// Third do something with the data
var_dump($my_json_data);


You can call the program from cron so it launches periodically.

You could use curl in the program to grab the feed too but it is more than a one line operation.

This is the PHP curl code I use to grab urls:

function get_page($urlin,$referin)
{
echo "urlin=" . $urlin . "<br>\n";
echo "referin=" . $referin . "<br>\n";

$returnit="";
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8');
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_REFERER, $referin);
curl_setopt($ch, CURLOPT_URL, $urlin);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$result['EXE'] = curl_exec($ch);
$result['ERR'] = curl_error($ch);
curl_close($ch);
if($result['ERR']>"")
{
$returnit="error - " . $result['ERR'];
}
else
{
$returnit=$result['EXE'];
}
return $returnit;
}

.

lokee81 06-07-2017 11:00 AM

Quote:

Originally Posted by sarettah (Post 21818158)
You use a program to pull a feed.

So in PHP for example it would be something like:

// First get the feed
$my_json_feed = file_get_contents('chaturbate feed url');

// Second decode the json data
$my_json_data = json_decode($my_json_feed);

// Third do something with the data
var_dump($my_json_data);


You can call the program from cron so it launches periodically.

You could use curl in the program to grab the feed too but it is more than a one line operation.

This is the PHP curl code I use to grab urls:

function get_page($urlin,$referin)
{
echo "urlin=" . $urlin . "<br>\n";
echo "referin=" . $referin . "<br>\n";

$returnit="";
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8');
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_REFERER, $referin);
curl_setopt($ch, CURLOPT_URL, $urlin);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$result['EXE'] = curl_exec($ch);
$result['ERR'] = curl_error($ch);
curl_close($ch);
if($result['ERR']>"")
{
$returnit="error - " . $result['ERR'];
}
else
{
$returnit=$result['EXE'];
}
return $returnit;
}

.

Hm, ok . Huff. I dont know much about PHP yet. I have mainly focused on Javascript in my learning so far.

I tough that this : (http)/chaturbate(dot)com/affiliates/api/onlinerooms/?format=json&wm=C9m5N would be saved as a JSON file ? I see that it does not have the .json at the end there, but it must be saved as this somewhere ?

The best guess for me would be to pull it then using node.js ?

or would it be a direct link to a JSON file somewhere on Chaturbate? Is there any way to save that feed as a JSON ?

My plan was to save it every 2-5 min on my server and then just access the JSON file on my server and pharse out what I wanted to display using javascript

sarettah 06-07-2017 11:09 AM

Quote:

Originally Posted by lokee81 (Post 21818200)
Hm, ok . Huff. I dont know much about PHP yet. I have mainly focused on Javascript in my learning so far.

I tough that this : (http)/chaturbate(dot)com/affiliates/api/onlinerooms/?format=json&wm=C9m5N would be saved as a JSON file ? I see that it does not have the .json at the end there, but it must be saved as this somewhere ?

The best guess for me would be to pull it then using node.js ?

or would it be a direct link to a JSON file somewhere on Chaturbate? Is there any way to save that feed as a JSON ?

My plan was to save it every 2-5 min on my server and then just access the JSON file on my server and pharse out what I wanted to display using javascript

The chaturbate url will give you a feed in JSON format. You save that feed on your server but you need a program of some sort to do that with.

Load the JSON feed url from chaturbate in a browser and you can see what it will return. It will be in JSON format, but then you need to write that to a file on your server if you are going to store it.

I have not played with node.js ao I am of no help to you there but the program would have to do several things.

1. Pull the feed.
2. Store the feed in a file.

That is the basic that you need to have occur periodically.

Then from your html page you can call the json data from the server when you need it.

.

lokee81 06-07-2017 01:54 PM

Quote:

Originally Posted by sarettah (Post 21818236)
The chaturbate url will give you a feed in JSON format. You save that feed on your server but you need a program of some sort to do that with.

Load the JSON feed url from chaturbate in a browser and you can see what it will return. It will be in JSON format, but then you need to write that to a file on your server if you are going to store it.

I have not played with node.js ao I am of no help to you there but the program would have to do several things.

1. Pull the feed.
2. Store the feed in a file.

That is the basic that you need to have occur periodically.

Then from your html page you can call the json data from the server when you need it.

.


OK, Thanks for the help so far :) My research continues :thumbsup

tomash999 06-08-2017 04:03 PM

You probably have Python installed

Code:

import urllib

url = ''
with open('data.json', 'w') as f:
    f.write(urllib.urlopen(url).read())

Or with NodeJS
Quote:

let fs = require('fs')
// let http = require('http')
let https = require('https')

let request = https.request({
host: '',
path: ''
}, function(res){
let data = ''
res.on('data', function(chunk){
data += chunk
})
res.on('end', function(){
// write data
console.log(data)
fs.writeFile('data.json', data, function(e){
if (e){
console.log(e.message)
}
})
})
})
request.on('error', function(e){
console.log(e.message)
})
request.end()
Keep in mind that the code might break if there is no response


All times are GMT -7. The time now is 01:19 AM.

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