![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help. |
|
Thread Tools |
![]() |
#1 |
small trip to underworld
Industry Role:
Join Date: Mar 2012
Location: first gen intel 80386/nintendo-gb/arcade/ps1/internet person
Posts: 4,927
|
script to show if specific room is online , i need to add feature
<?php
$cams = new SimpleXMLElement('http://chaturbate.com/affiliates/api/onlinerooms/?format=xml&wm=AFFILIATELINK', null, true); $online = false; foreach ($cams->xpath('//username') as $username) { if ($username == "xvectasss" || $username == "delightcouple" || $username == "banginbrooke" || $username == "hitgirly" || $username == "frenchie_noir"){ echo '<div id="roomname_b"> '. $username .' is online <div class="site"> '; echo '</div></span>'; $online = true; } } if (!$online) echo ' <div id="null"> <strong>No rooms online . </strong></div>'; ?> i want to add small live pic next to model name ![]() thanks
__________________
automatic exchange - paxum , bitcoin,pm, payza . daizzzy signbucks caution will black-hat black-hat your traffic ignored forever :zuzana designs
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#2 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
echo '<div id="roomname_b"> ';
echo "<img src=" . imageurl .">"; echo $username .' is online <div class="site"> '; echo '</div></span>'; Where imageurl is the image src element from the xml object. I do not remember the field name in the chaturbate feed right now. .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#3 | |
small trip to underworld
Industry Role:
Join Date: Mar 2012
Location: first gen intel 80386/nintendo-gb/arcade/ps1/internet person
Posts: 4,927
|
Quote:
not working man ![]() ![]() its not working with bonga too <?php $cams = new SimpleXMLElement('http://tools.bongacash.com/promo.php?c=aff&type=api&api_type=xml', null, true); $online = false; foreach ($cams->xpath('//username') as $username) { if ($username == "SweetladyX" || $username == "Marusyya" || $username == "ukrainka" || $username == "AngelicRos3"){ echo '<div id="roomname_c"> '; echo "<img src=" . profile_images>thumbnail_image_small_live .">"; echo $username .' is online <div class="site"> BongaCam '; echo '</div></span>'; $online = true; } } if (!$online) echo ' <div id="null"><strong><br> No rooms online Bongacams. <br/></strong></div>'; ?> i'm giving u 0.002636 btc if u can get it right ![]() ![]()
__________________
automatic exchange - paxum , bitcoin,pm, payza . daizzzy signbucks caution will black-hat black-hat your traffic ignored forever :zuzana designs
|
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#4 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
That is the field name in the object but you have to reference the object to get at it:
object->fieldname You are using xpath. That is only going to pull in the username field the way you have that coded. You could pull both fields you need using xpath but then each time you want to add a field you will have to screw with it. Try this code instead. I cleaned up what you had there and changed it from using the xpath: Code:
$users_to_show=array("xvectasss","delightcouple","banginbrooke","hitgirly","frenchie_noir"); $cams = new SimpleXMLElement('http://chaturbate.com/affiliates/api/onlinerooms/?format=xml&wm=AFFILIATELINK', null, true); $online = false; foreach ($cams as $user) { if(in_array(strtolower($user->username),$users_to_show)) { echo '<div id="roomname_b"> '; echo '<img src="' . $user->image_url . '">'; echo $user->username .' is online'; echo '<div class="site">'; echo '</div></span>'; $online = true; } } if (!$online) echo ' <div id="null"> <strong>No rooms online . </strong></div>';
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#5 |
Registered User
Industry Role:
Join Date: Oct 2014
Posts: 74
|
can you guys point me in a direction on how can i make this code to work this way ?
show my cam when i'm online , else show Best Converting Tour ? |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#6 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Quote:
Code:
$users_to_show=array("myusername"); $cams = new SimpleXMLElement('http://chaturbate.com/affiliates/api/onlinerooms/?format=xml&wm=AFFILIATELINK', null, true); $online = false; foreach ($cams as $user) { if(in_array(strtolower($user->username),$users_to_show)) { echo '<div id="roomname_b"> '; echo '<img src="' . $user->image_url . '">'; echo $user->username .' is online'; echo '<div class="site">'; echo '</div></span>'; $online = true; } } if (!$online) { echo '<div id="null"> Info for best converting tour here.....; .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#7 | |
small trip to underworld
Industry Role:
Join Date: Mar 2012
Location: first gen intel 80386/nintendo-gb/arcade/ps1/internet person
Posts: 4,927
|
Quote:
![]() works no problem .. tested it with both sites thanks! ![]()
__________________
automatic exchange - paxum , bitcoin,pm, payza . daizzzy signbucks caution will black-hat black-hat your traffic ignored forever :zuzana designs
|
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#8 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
It does?
That always surprises the fuck out of me ;p .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#9 |
Registered User
Industry Role:
Join Date: Oct 2014
Posts: 74
|
my bad, this looks similar to nomoneyinporn script , and wanted to implement it in my site
![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#10 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Quote:
Easy enough to do it in just about any version of a chaturbate script. .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#11 |
Registered User
Industry Role:
Join Date: Oct 2014
Posts: 74
|
want to show my cam embed and when i'm not online , to show best cam , embed
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#12 |
small trip to underworld
Industry Role:
Join Date: Mar 2012
Location: first gen intel 80386/nintendo-gb/arcade/ps1/internet person
Posts: 4,927
|
i guess u didn?t test the code
![]()
__________________
automatic exchange - paxum , bitcoin,pm, payza . daizzzy signbucks caution will black-hat black-hat your traffic ignored forever :zuzana designs
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#13 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
I always test but you can never test enough ;p btw, I tried to reply to your last pm and it says your box is full. But thanks, got it. .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#14 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Quote:
The iframe embed for the chatroom is in the feed so we will use that one for your room. The best converting url is not provided in the feed. On the link page it has a link but not an iframed link so don't know off hand if you use that link if it might not break out of an iframe if you put it in there, you would have to play with that. Or you can use one of the precoded iframes at https://chaturbate.com/affiliates/promotools/embed/ such as the top chat room. Using what we had above just change out the vars we are outputting with the proper vars from the feed. Code:
<?php $users_to_show=array("yourusername"); // my top rooom iframe from the links page $top_room_iframe="<iframe src='https://chaturbate.com/affiliates/in/dTm0/JkjyU/?track=embed&bgcolor=white' height=528 width=850 style='border: none;'></iframe>"; $cams = new SimpleXMLElement('http://chaturbate.com/affiliates/api/onlinerooms/?format=xml&wm=AFFILIATELINK', null, true); $online = false; foreach ($cams as $user) { if(in_array(strtolower($user->username),$users_to_show)) { // for free //echo $user->iframe_embed; // or for revshare echo $user->iframe_embed_revshare; $online = true; } } if (!$online) echo $top_room_iframe; ?> ![]() btw, that is far from the most efficient manner to pull this stuff off. Doing it this way requires pulling the feed and going through every record until it finds the right user(s) every time the page gets hit. Much more efficient to throw the data into a database structure periodically and then grab the exact record you need when you want it. Just my ![]() .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#15 | |
small trip to underworld
Industry Role:
Join Date: Mar 2012
Location: first gen intel 80386/nintendo-gb/arcade/ps1/internet person
Posts: 4,927
|
Quote:
![]() ok deleted some messages , yw .
__________________
automatic exchange - paxum , bitcoin,pm, payza . daizzzy signbucks caution will black-hat black-hat your traffic ignored forever :zuzana designs
|
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#16 |
Registered User
Industry Role:
Join Date: Oct 2014
Posts: 74
|
it works on a blank page , but cant manage to make it only on first page
![]() take a look if you have time cbgtube.com Code:
<?php ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Header ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function tpl_header($cmd, $title, $des, $kws) { $link = $_GET["arg1"]; echo ' <!DOCTYPE html> <html lang="en"> <head> <title>' . $title . '</title> <meta charset="utf-8" /> <meta name="description" content="' . $des . '" /> <meta name="keywords" content="' . $kws . '" /> <meta name="rating" content="mature" /> <meta name="RATING" content="RTA-5042-1996-1400-1577-RTA" /> <meta name="prVerify" content="f752666eea61d62bfae88c73088fb001" /> <link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,300,600,700" rel="stylesheet" type="text/css"> <!--[if lte IE 8]><script src="' . BASEHREF . 'css/ie/html5shiv.js"></script><![endif]--> <script src="' . BASEHREF . 'js/jquery.min.js"></script> <script src="' . BASEHREF . 'js/skel.min.js"></script> <script src="' . BASEHREF . 'js/jquery.isotope.js"></script> <script src="' . BASEHREF . 'js/skel-panels.min.js"></script> <script src="' . BASEHREF . 'js/init.js"></script> <script src="' . BASEHREF . 'js/analitycs.js"></script> <noscript> <link rel="stylesheet" href="' . BASEHREF . 'css/skel-noscript.css" /> <link rel="stylesheet" href="' . BASEHREF . 'css/style.css" /> </noscript> <!--[if lte IE 8]><link rel="stylesheet" href="' . BASEHREF . 'css/ie/v8.css" /><![endif]--> <!--[if lte IE 9]><link rel="stylesheet" href="' . BASEHREF . 'css/ie/v9.css" /><![endif]--> </head> <body> <div id="header" class="skel-panels-fixed"> <!-- Logo --> <a href="' . BASEHREF . '" id="logo">' . LOGO . '</a> <nav id="nav"> <ul> <li><a href="' . BASEHREF . 'cams/female" class="' . ( ($link == "female") ? "active" : "") . '">BABES</a></li> <li><a href="' . BASEHREF . 'cams/male" class="' . ( ($link == "male") ? "active" : "") . '">MALES</a></li> <li><a href="' . BASEHREF . 'cams/couple" class="' . ( ($link == "couple") ? "active" : "") . '">COUPLES</a></li> <li><a href="' . BASEHREF . 'cams/shemale" class="' . ( ($link == "shemale") ? "active" : "") . '">SHEMALES</a></li> <li><a href="http://' . CBWL . '/affiliates/in/3Mc9/' . AFFID . '/?track=' . TRACK . '" class="button">Get your <strong>FREE</strong> account!</a></li> <!-- <li><a href="http://' . CBWL . '/affiliates/in/NwNd/' . AFFID . '/?track=' . TRACK . '">Broadcast Your Cam!</a></li> <li><a href="http://' . CBWL . '/affiliates/in/07kX/' . AFFID . '/?track=' . TRACK . '">Affiliate Program</a></li> --> </ul> </nav> </div> <!-- Main --> <div id="main"> <div class="description"> <center> here i want the embed cam ... but only on first page ... @sarettah - gfy.com</center> <center><div class="pr-widget" id="pr-94zi" style="height:156px;width:1000px;"></div></center> <h1 style="font-size:24px;font-weight:bold;color:#F47321;margin:0 50px;">YEAH! Perv this is 100% free !</h1> <span style="font-size:13px;font-weight:600;color:#0C6A93;text-indent:20px;text-align:justify;margin:0 30px;">Hi ! I'm Munira you know me as <a href="http://fttube.com/blog/me-online/">FunnyTimeCPL</a> , you can check this beautiful girls and boys , watch them LIVE for FREE!</span> </div> <div class="pr-slider-widget" id="pr-92pz"></div> <div class="container"> '; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Footer ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function tpl_footer() { echo ' </div> <br> <p style="text-align: center;"><a href="http://chaturbate.com/affiliates/in/hr8m/6ugdP/?track=blogfooter"><img class="aligncenter" src="https://ssl-ccstatic.highwebmedia.com/affiliates/banners/724x90d.jpg" alt="" width="724" height="90" /></a> </div> <!-- Footer --> <div id="footer"> <div class="container"> <p> </span><a href="http://' . CBWL . '/affiliates/in/3Mc9/' . AFFID . '/?track=' . TRACK . '"><span style="color:#fff0f5;">Get your <strong>FREE</strong> account!</span></a><span style="color:#fff0f5;"> | </span><a href="http://' . CBWL . '/affiliates/in/NwNd/' . AFFID . '/?track=' . TRACK . '"><span style="color:#fff0f5;">Broadcast Your Cam!</span></a><span style="color:#fff0f5;"> | </span><a href="http://' . CBWL . '/affiliates/in/07kX/' . AFFID . '/?track=' . TRACK . '"><span style="color:#fff0f5;">Affiliate Program</span></a></p> <p> <span style="color:#fff0f5;">© ' . SITENAME . ', All Rights Reserved. Powered by </span><a href="http://' . CBWL . '/affiliates/in/hr8m/' . AFFID . '/?track=' . TRACK . '" target="_blank"><span style="color:#fff0f5;">Chaturbate</span></a></p> </div> <span><img src="http://fttube.com/images/labeled.gif"></span> </div> </body> </html> '; } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Homepage ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function tpl_home() { get_cams ( AFFID, TRACK, $gender='', 28 ); } function tpl_cams() { $gender = $_GET['arg1']; switch ( $gender ) { case 'female': $gender = 'f'; break; case 'male': $gender = 'm'; break; case 'couple': $gender = 'c'; break; case 'shemale': $gender = 's'; break; default: $gender = ''; } get_cams ( AFFID, TRACK, $gender, 28 ); } function tpl_view_cams() { solo_cams( AFFID, TRACK, $_GET['arg1'] ); } ?> @CPA-Rush sorry for hijacking your thread ! |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#17 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
funnytimecpl, here is what I think might be a much more efficient way for you to do what you are trying to do.
One note, if you are already running something like nomoneyinporn's script then this could probably be integrated right into it, not sure where without reviewing the script some. First, let's split it into 2 parts. The first part will run from cron periodically. You could set it for once a minute, once every 2, whatever. In the cron piece, we pull in the feed. Check to see if we are online. Write a file if we are on line. If we are not on line we delete the online file if it is there. End of program. Make a folder in your domain space on the server called online. Put this code (with the proper modifications to the vars) into a php file in the online folder: Code:
<?php $user_to_find="myusername"; $online_file="online.txt"; $cams = new SimpleXMLElement('http://chaturbate.com/affiliates/api/onlinerooms/?format=xml&wm=AFFILIATELINK', null, true); $online = false; foreach ($cams->xpath('//username') as $username) { if($username=="myusername") { $outfile=fopen("online.txt"); =fwrite($outfile,'1'); =fclose($outfile); $cams=null; } else { if(is_file("online.txt")) { unlink("online.txt"); } } ?> Or you can put some htaccess in there allowing just the server and your ip to have access that way the cron can run and you can test from a browser but noone else can access it. Set up your cron to run that php file however often you want to run it. Now, wherever you want the embedded room to appear, instead of all the other code we did earlier use something like: Code:
<?php $iframe_code="My_iframe_code"; $top_room_iframe_code="top_room_iframe_code_goes_here"; $online_file="online/online.txt"; if(is_file($on_line_file)) { echo $iframe_code; } else { echo $top_room_iframe_code; } ?> The other issue that started this thread could be handled that way as well, with a little modification to handle the multiple usernames being checked for, etc.... Hope that helps. .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#18 |
small trip to underworld
Industry Role:
Join Date: Mar 2012
Location: first gen intel 80386/nintendo-gb/arcade/ps1/internet person
Posts: 4,927
|
why its not the first time ?
jk ![]()
__________________
automatic exchange - paxum , bitcoin,pm, payza . daizzzy signbucks caution will black-hat black-hat your traffic ignored forever :zuzana designs
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#19 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Quote:
Will look when I get a chance. .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#20 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Quote:
If you can live with your "Hey Perv...." being above your embed then what might work is to put your embed in the tpl_home function. I am assuming that the tpl_home only gets called for the home page and that home page is your first page. I dould be wrong, I often am. ;p Code:
function tpl_home() { The code to embed your cam.... get_cams ( AFFID, TRACK, $gender='', 28 ); } If you can't live with that and must have the "Hey Perv..." below the embed then in the header you will have to check what page is being called for and only present it on pages you want. The page being called is in $_SERVER['REQUEST_URI']; so you would have to interrogate that to see if you are on the first page or not before doing the presentation of the embed. Also, if you use the code we have been doing here you will be pulling the xml feed multiple times needlessly. Somewhere in your stuff you are already pulling the xml feed. best would be to modify that piece to give you an online indicator to call on later. .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#21 |
Registered User
Industry Role:
Join Date: Oct 2014
Posts: 74
|
@ CPA-Rush , if i did , that means that you do good posts . lol , dont want to spam the board :D
@sarettah thank you for your support , i did manage to do something in the end , after a lot of coffee and stress , decided to let only the top chat room. Again thanks . you do usefull posts :D |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#22 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Quote:
It should not be real hard to make mods like I suggested. I can help you out on that. Went to send you a pm but it doesn't look like your pms are enabled yet. Anyway, if you want me to take a look let me know. sarettah at hatterasdesigns dot com. .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#23 |
Registered User
Industry Role:
Join Date: Oct 2014
Posts: 74
|
i'm gonna mail you soon !
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#24 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Quote:
For info for anyone reading this thread. I have several errors in the code here. Comes from throwing it up quickly while doing a project in another language. Shit happens you know. ;p Here is a fix for the code in the top code box: Code:
<?php $user_to_find="myusername"; $online_file="online.txt"; $cams = new SimpleXMLElement('http://chaturbate.com/affiliates/api/onlinerooms/?format=xml&wm=AFFILIATELINK', null, true); $online = 0; foreach ($cams->xpath('//username') as $username) { if($username=="myusername") { $outfile=fopen($online_file, 'w'); // added the 'w' to make this writeable. Changed to use file varname fwrite($outfile,'1'); // removed the '=' at the beginning. different language fclose($outfile); // removed the '=' at the beginning. different language $cams=null; $online=1; } } // moved this outside the for loop so we do not overwrite the file every time if(!$online) { if(is_file($online_file)) { unlink("online.txt"); } } ?>
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#25 |
small trip to underworld
Industry Role:
Join Date: Mar 2012
Location: first gen intel 80386/nintendo-gb/arcade/ps1/internet person
Posts: 4,927
|
sarettah , lets say i want check if some users watch the room right now ?
$users_to_show=array("jully_rebella","natyhot29"," sexypenis75"); // users $room = 'https://chaturbate.com/api/getchatuserlist/?sort_by=t&roomname=natyhot29'; // userlist of the room ....SOMECODE if true echo '<div id="users_to_show"> - are in room '; echo '</div></span>'; else echo ' <div id="null"> <strong>Not in room . </strong></div>'; can u guide me ? ![]()
__________________
automatic exchange - paxum , bitcoin,pm, payza . daizzzy signbucks caution will black-hat black-hat your traffic ignored forever :zuzana designs
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#26 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Quote:
You could scrape a page and pick up that information perhaps. .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#27 | |
small trip to underworld
Industry Role:
Join Date: Mar 2012
Location: first gen intel 80386/nintendo-gb/arcade/ps1/internet person
Posts: 4,927
|
Quote:
curious would this be easier if it was html page ?
__________________
automatic exchange - paxum , bitcoin,pm, payza . daizzzy signbucks caution will black-hat black-hat your traffic ignored forever :zuzana designs
|
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#28 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Quote:
The way I see to get at that info is to periodically grab the code for the page you want to monitor, search it for the list of users viewing and interrogate that. Now, that info may or may not be available in a page scrape. If the list is injected via javascript it is harder to get at. .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#29 | |
small trip to underworld
Industry Role:
Join Date: Mar 2012
Location: first gen intel 80386/nintendo-gb/arcade/ps1/internet person
Posts: 4,927
|
Quote:
this is more clear now ![]()
__________________
automatic exchange - paxum , bitcoin,pm, payza . daizzzy signbucks caution will black-hat black-hat your traffic ignored forever :zuzana designs
|
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#30 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Quote:
I was just trying to make sure I understood what you were saying/asking so I don't give you a bum answer. .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#31 | |
small trip to underworld
Industry Role:
Join Date: Mar 2012
Location: first gen intel 80386/nintendo-gb/arcade/ps1/internet person
Posts: 4,927
|
Quote:
![]()
__________________
automatic exchange - paxum , bitcoin,pm, payza . daizzzy signbucks caution will black-hat black-hat your traffic ignored forever :zuzana designs
|
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#32 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Ok, now I understand what you were asking. My bad for not seeing you had put the url of the chatroom in there.
Unfortunately grabbing the page for the chat room won't give us what we want unless we also follow the javascript. That can get sticky. I was just checking and the user list is injected into the room via javascript/ajax so we could try to go grab the url that ajax is calling and see if it would give us a list back. If I get a chance I will poke around and see what there is to see. .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#33 |
Confirmed User
Industry Role:
Join Date: Dec 2014
Posts: 418
|
Bumping up for future reference
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#34 |
Confirmed User
Industry Role:
Join Date: Mar 2013
Location: Internet
Posts: 2,425
|
Hey guys I have a similar problem and I hope that you'll help me one more time ! As you know I am a beginner on programing and I try to develop a cam site using chaturbate APIs , thanks to serettah I figured out of few things and I've made the listing of the models and now I am trying to make the chat room page but here I have problems , just doesn't work , starting from this thread I tried this:
Code:
$users=array(); $cams = new SimpleXMLElement('cams.xml', null, true); foreach ($cams as $user) { if(in_array(strtolower($user->username),$users)) { echo $user->iframe_embed_revshare; } } ![]() Sorry for bumping a old thread but since is related to this thread is useless to start a new one ! THANKS
__________________
Make Money With: Chaturbate |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#35 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Code:
$users=array(); $cams = new SimpleXMLElement('cams.xml', null, true); foreach ($cams as $user) { if(in_array(strtolower($user->username),$users)) { echo $user->iframe_embed_revshare; } } Since $users is empty ($users=array() creates an empty array) then you will never hit the echo statement. So, you have to have a username in $users for that to work. .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#36 |
Confirmed User
Industry Role:
Join Date: Mar 2013
Location: Internet
Posts: 2,425
|
Ok I got it so that will not work without a user name in the array ! , so any idea on how to get the iframe of the user that I clicked on the main page ??? Thanks !
__________________
Make Money With: Chaturbate |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#37 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
The url that is being clicked on looks like this: chat.php?/lexxxierose
That is not right. You want something like chat.php?cam=lexxxierose or something along that line. You need a variable name in there to pass in. So if it is chat.php?cam=lexxxierose then in chat.php you would use $_GET['cam'] to get at the name lexxxierose So you would not need the array $users in there. Code:
$cams = new SimpleXMLElement('cams.xml', null, true); foreach ($cams as $user) { if(strtolower($user->username)==$_GET['cam']) { echo $user->iframe_embed_revshare; } } .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#38 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,053
|
Code:
$cams = new SimpleXMLElement('cams.xml', null, true); if(isset($_GET['cam'])) { foreach ($cams as $user) { if(strtolower($user->username)==strtolower($_GET['cam'])) { echo $user->iframe_embed_revshare; break; } } } .
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#39 |
Confirmed User
Industry Role:
Join Date: Mar 2013
Location: Internet
Posts: 2,425
|
Wow works great ! You are a real master
![]() I owe you a lot and not only me the entire community here ! Thank you very much !
__________________
Make Money With: Chaturbate |
![]() |
![]() ![]() ![]() ![]() |