a simple stripcash widget

Discussion Of Legal Topics Anything Goes
Post Reply
User avatar
sarettah
Posts: 52
Joined: January 10th, 2022, 10:39 am

a simple stripcash widget

#1

Post by sarettah » March 17th, 2023, 11:37 pm

hello again,

this time out i am doing a simple stripchat video widget that will (hopefully) not get blocked by chrome or adblockers

this one is a bit different from the chaturbate one i did a while back.

for stripchat i went with a php solution for a couple of reasons, the main one being that adblockers block the stripcash api call when you try to do it via javascript/ajax

since the api call was getting blocked, that kind of forced me into using a server side solution

stripchat does not, in their api, return iframe code. they do provide the actual streaming link. to use that we have to create a video player which we can then put into an iframe

the structure for this, on your server is:

mainsite
subfolder1 for the widget - whatever makes sense to you
subfolder2 for the webcam link (i called this webcam, it can be pretty much anything)

inside the subfolder1 we have:
sc_widget.php - main code for the widget
video-js7-17-0.css - style sheet for the video player
video.min7-17-0.js - javascript for the video player
webcam.php - the video player code
subfolder2 - like i said i called this webcam
inside subfolder2 we have an .htaccess file and index.php

The sc_widget.php file contains the code that you would want to integrate into your page, it includes the styles and the actual code but I did it as an html page so that it would work stand alone, if needed i can do a post showing how to put it into your page, right now it is past my bedtime so i am done for today

in this widget i actually pull in 50 cams and then pick a random cam from however many get returned.

Here is the code:

The widget itself (sc_widget.php)

<?php
// edit this to include the genders you want as listed in the stripcash api documentation https://stripcash.com/documentation/models-list
$genders=array('female');

// edit the limit parameter to bring in more or less than 50 cams if wanted
$chatfeedlink='https://go.xlirdr.com/api/models?sortBy ... c&limit=50';

for($i=0;$i<count($genders);$i++)
{
$chatfeedlink .='&gender=' . $genders[$i];
}

$page=file_get_contents($chatfeedlink);
if($page)
{
$chkit=json_decode($page, true);
}
else
{
die;
}
if(count($chkit['models'])>1)
{
$maxcams=count($chkit['models'])-1;
$cam2get=rand(1, $maxcams);
$username=$chkit['models'][$cam2get]["username"];
$stream=$chkit['models'][$cam2get]['stream']['url'];

}
?>
<html>
<head>
<meta charset=utf-8 />
<link href="video-js7-17-0.css" rel="stylesheet" />
<style>
#camdiv{clear:both;position:relative;text-align:center;margin:auto;aspect-ratio:1.77/1;}
#camdiv{width:350px;} <----change this to change the widget size
#innerdiv{
position:absolute;
top:0px;
left:0px;
height:100%;
width:100%;
text-align:center;
}
.currcam{height:100%;width:100%;text-align:center;}
.modellink {text-decoration:none;cursor:pointer;color:#ffffff;text-shadow: 2px 2px #000000;}
#overlay {position:absolute;top:0px;left:0px;height:100%;width:100%;}
</style>
</head>
<body>
<?php
if(!empty(trim($username)))
{
?>
<div name="camdiv" id="camdiv">
<div name="innerdiv" id="innerdiv" style="background-color:#000000;">
<iframe class="currcam" name="currcam" id="currcam" src="webcam.php?stream=<?php echo $stream; ?>" frameborder="0" scrolling="no" ></iframe>
</div>
<a class="modellink" name="modellink" id="modellink" href="webcam/<?php echo $username; ?>" title="Click here to join the chat.">
<div name=overlay id=overlay>
</div>
</a>
</div>
<?php
}
?>
</body>
</html>

The webcam.php code:

<?php
$stream='';
if(isset($_GET['stream']))
{
$stream=stripslashes($_GET['stream']);
}
?>
<html>
<head>
<meta charset=utf-8 />
<link href="video-js7-17-0.css" rel="stylesheet" />
</head>
<body style="width:100%;height:100%;">
<div id="video_box" style="width:100%;height:100%;position:relative;text-align:center;color:#ffffff;background-color:#000000;font-size:2em;font-family:arial;">
<video autoplay muted style="width:100%;height:100%;position:relative;"
id="my-video"
class="video-js"
preload="auto"
data-setup="{}"
>
<source src="<?php echo $stream; ?>" type='application/x-mpegURL'>
</video>
</div>
<script src="video.min7-17-0.js"></script>
<script>
var player = videojs('my-video');
player.on('error', function(event) {
document.getElementById("video_box").innerHTML="<br><br>It appears that this cam show has ended.";
});
</script>
</body>

And the code that is in the subfolder2/index.php file:

<?php
//edit this to your stripchat url as found in the stripcash dashboard
$url2use="https://go.xxxiijmp.com?sourceId=camtok ... xxxxxxxxxx";

$tag="";
$work=$_SERVER['REQUEST_URI'];
if(substr_count($work,"/")>0)
{
$tag=strtolower(substr($work,strrpos($work,"/")+1));
$tag=trim(str_replace(".htm","",str_replace(".php","",strtolower($tag))));
}

if(!empty($tag))
{
$redir=$url2use . "&path=%2F" . $tag;
header('Location: ' . $redir);
}
?>

that's about it

working demo at https://madspiders.com/sc/sc_widget.php

zipped up code at https://madspiders.com/sc/sc_widget.zip

Have fun!


ImageImage

User avatar
sarettah
Posts: 52
Joined: January 10th, 2022, 10:39 am

#2

Post by sarettah » March 18th, 2023, 12:09 am

tried to edit but it is too late (dammit)

i just want to mention that Gily, my account manager at stripcash, helped me a bit with some issues i was having with the api.

Thanks Gily :)


ImageImage

User avatar
sarettah
Posts: 52
Joined: January 10th, 2022, 10:39 am

#3

Post by sarettah » March 18th, 2023, 9:23 am

I mad a small change to the styling in the cb_widget.php file this morning. wrapped the camdiv width inside a media only....

rezipped it this morning


ImageImage

User avatar
TheButcher
Posts: 10405
Joined: February 2nd, 2018, 11:48 am
Title: I like weekends
Referrals: 1
Contact:

#4

Post by TheButcher » March 18th, 2023, 9:30 am

Thanks for that Sarettah



User avatar
BrasSmonkey
Posts: 4458
Joined: February 28th, 2018, 6:31 pm
Title: Smell My Sack
Referrals: 1
Contact:

#5

Post by BrasSmonkey » March 18th, 2023, 10:53 am

they do that kfc or whatever that face shit is. fuckem! :lol:


brassballz-@-techie.com
--->>PM or Email

Services: [Wordpress Site Building] - [SEO] - ][FEEDER SITES] - [REDDIT] - [Manual Video Uploading] -
[Gallery Building]
- [And More!]


User avatar
sarettah
Posts: 52
Joined: January 10th, 2022, 10:39 am

#6

Post by sarettah » March 18th, 2023, 2:22 pm

BrasSmonkey wrote:
March 18th, 2023, 10:53 am
they do that kfc or whatever that face shit is. fuckem! :lol:
somebody asked for one so i did it

still looking at bonga and camsoda


ImageImage

User avatar
TheButcher
Posts: 10405
Joined: February 2nd, 2018, 11:48 am
Title: I like weekends
Referrals: 1
Contact:

#7

Post by TheButcher » March 18th, 2023, 2:49 pm

BrasSmonkey wrote:
March 18th, 2023, 10:53 am
they do that kfc or whatever that face shit is. fuckem! :lol:


You know this kyc shit is getting beyond stupid.



User avatar
BrasSmonkey
Posts: 4458
Joined: February 28th, 2018, 6:31 pm
Title: Smell My Sack
Referrals: 1
Contact:

#8

Post by BrasSmonkey » March 19th, 2023, 9:29 am

TheButcher wrote:
March 18th, 2023, 2:49 pm
BrasSmonkey wrote:
March 18th, 2023, 10:53 am
they do that kfc or whatever that face shit is. fuckem! :lol:


You know this kyc shit is getting beyond stupid.
wait till they start scanning assholes... :shock: i talked to adult force and you can get bitcoin. i wasn't poking at you op


brassballz-@-techie.com
--->>PM or Email

Services: [Wordpress Site Building] - [SEO] - ][FEEDER SITES] - [REDDIT] - [Manual Video Uploading] -
[Gallery Building]
- [And More!]


jlinkz
Posts: 524
Joined: March 30th, 2018, 8:30 pm

#9

Post by jlinkz » March 20th, 2023, 7:45 am

BrasSmonkey wrote:
March 19th, 2023, 9:29 am


wait till they start scanning assholes... :
tptr454






User avatar
Zug
Posts: 54
Joined: February 11th, 2023, 9:19 am
Location: America
Title: Confirmed Caveman
Referrals: 4
Contact:

#10

Post by Zug » March 20th, 2023, 9:22 am

TheButcher wrote:
March 18th, 2023, 2:49 pm
BrasSmonkey wrote:
March 18th, 2023, 10:53 am
they do that kfc or whatever that face shit is. fuckem! :lol:
You know this kyc shit is getting beyond stupid.
It won't be long until KYC is as normal as when you walk into a bank to open a new account and have to give them all your credentials to proceed.
Also, not too far off, is when it will be normal to store your KYC information, State ID info, Drivers license info, Social Media profile info all in a blockchain type of token that you have full control over and can update your information as needed and so you can grant or deny that information to or from whatever site you wish.

sarettah wrote:
March 17th, 2023, 11:37 pm
. . .

that's about it

working demo at https://madspiders.com/sc/sc_widget.php
zipped up code at https://madspiders.com/sc/sc_widget.zip

Have fun!
Thanks for this post. I very well may try to experiment with a cam page addition when I get time. I have no clue how to set one up with how you have the cam thumbs and all. I want to be able to use it inside of my site with my own template, not on a different domain.


Web Model Portal - A model portal dedicated to beautiful girls and their hot model photos. WebmodelsWebmastersWebhosting
©2003-2023 by Zug™

User avatar
sarettah
Posts: 52
Joined: January 10th, 2022, 10:39 am

#11

Post by sarettah » March 20th, 2023, 10:00 am

Zug wrote:
March 20th, 2023, 9:22 am
Thanks for this post. I very well may try to experiment with a cam page addition when I get time. I have no clue how to set one up with how you have the cam thumbs and all. I want to be able to use it inside of my site with my own template, not on a different domain.
do you mean like this: https://camtok.com/camlist.htm ?

i put that list together on saturday, i already had the embeds running but added a list

you can definitely put them on your own domain but the embeds pull from the sponsors, unless you want to run your own cam site where you actually host the cams which is a whole different thing


ImageImage

a simple stripcash widget

Post Reply