Skip to Content
It is currently September 23rd, 2019, 6:18 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: PHP request issue
PostPosted: February 28th, 2019, 3:38 pm 
Offline
Junior User
Junior User

Joined: January 21st, 2013, 9:33 pm
Posts: 33
Hello all, I am pretty sure my Sam 4.9 is using IP address for the request policy, as I am seeing a user going over the limit set by switching his IP (maybe switching from PC to Mobile for instance)
I am using Evolution Xtreme as my main php site with Sam php iframed in module blocks so only registered and logged in users can see the playlist and request.
My question: is there a way to set up the requests so they can't switch between devices or use IP switching to bypass the request policy.

_________________
Never a dull moment at MIXROCKMETAL.COM ~ UP THE IRONS \m/


Top
 Profile  
Reply with quote  
 Post subject: Re: PHP request issue
PostPosted: March 2nd, 2019, 8:58 pm 
Offline
SVS Member
SVS Member

Joined: October 15th, 2003, 11:59 pm
Posts: 4732
Location: Los Angeles - A Little West Of Nashville
No you would need a crystal ball for that. No way possible for the samPHPweb to guess the IP of the requester when he switches.

_________________
- DJ Dee
- Spacial Volunteer Support (SVS)
- Custom PAL services: www.palscripts.com
- http://www.AlternativeHD.com
- http://www.lahotcountry.com


Top
 Profile  
Reply with quote  
 Post subject: Re: PHP request issue
PostPosted: March 3rd, 2019, 1:11 am 
Offline
Junior User
Junior User

Joined: January 21st, 2013, 9:33 pm
Posts: 33
Would have been nice if the sam php had an option to have users login and then use username only, I kinda thought sam2nuke and sam2joom worked in that way, but sadly both of those are gone too.

_________________
Never a dull moment at MIXROCKMETAL.COM ~ UP THE IRONS \m/


Top
 Profile  
Reply with quote  
 Post subject: Re: PHP request issue
PostPosted: March 3rd, 2019, 1:58 am 
Offline
SVS Member
SVS Member

Joined: October 15th, 2003, 11:59 pm
Posts: 4732
Location: Los Angeles - A Little West Of Nashville
I agree that would have been a good idea.

_________________
- DJ Dee
- Spacial Volunteer Support (SVS)
- Custom PAL services: www.palscripts.com
- http://www.AlternativeHD.com
- http://www.lahotcountry.com


Top
 Profile  
Reply with quote  
 Post subject: Re: PHP request issue
PostPosted: March 5th, 2019, 4:27 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7873
Location: Aachen (Germany)
IIRC both sam2nuke and sam2joom were just an iframe with the original SAM PHP templates embedded as a subpage of the phpnuke / joomla CMS.
The only thing that's coded from scratch is the wordpress plugin from Festerhead (see: https://github.com/mastacheata/fescon/t ... ter/fhrsam).
I don't think that's up to date with modern Wordpress standards anymore and most likely won't work in PHP 7, but the source code is available for free and you can adjust it to work again.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
 Post subject: Re: PHP request issue
PostPosted: March 27th, 2019, 1:30 am 
Offline
Junior User
Junior User

Joined: January 21st, 2013, 9:33 pm
Posts: 33
I been playing around with the new version of phpbb 3.2.5 and using old samPHPweb 3.5.0 template along with some of festerheads codes (countdown timer, request-disable-mod) that I got working with php 5.4. What I am trying to do is have username added to the song requests to hopefully keep the songs per hour limit by using the username, I hope this is possible. So far I am adding this to the top of the req/req.php
Code:
<?
ob_start();
define('IN_PHPBB', true);
$phpbb_root_path = '/home/blablabla/public_html/phpBB3/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

if($user->data['is_registered'])
     //user is logged in
 
echo "Welcome back " . $user->data['username'];
?>


and it does show the username at the top of the req.php, but switching IP address still allows going over the limit, I am definately missing something here.

_________________
Never a dull moment at MIXROCKMETAL.COM ~ UP THE IRONS \m/


Top
 Profile  
Reply with quote  
 Post subject: Re: PHP request issue
PostPosted: March 27th, 2019, 7:47 am 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7873
Location: Aachen (Germany)
The dedication form has a cross-site-scripting issue in SAM < 4.3.4 (I found that issue in 2008, reported it, SpacialAudio fixed it in the next release and replaced the whole template with a new in 2011)
If you use requests and dedications, please upgrade your templates at least to the ones included in SAM 4.3.4 and later.

The request limit is enforced in SAM, not in the templates.
Enforcing that on the template-end is way too much effort.
I'd suggest either inserting the username into the IP field of the requestlist or combining username and IP in that field, depending on wht kind of limit you want.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group