Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...
Author Message
emmaphp
Worker
Worker


Joined: Aug 22, 2006
Posts: 192

PostPosted: Tue Jun 03, 2008 4:26 am Reply with quote

Hi Guys,

After much searching I have found the ideal 3rd party solution that will alow you to charge users a subscription fee, before they can access a restricted area of your website, not by them using a credit/debit card, but instead via their cell phone.

As I have mentioned previously, I think this way of billing is going to be far more lucrative for sites wanting to charge users a (small) subscription fee for access to premium information, content or download a file, (e.g. if you want to charge only $1.50 for access to a ringtone or other .mp3 file).

The main reasons I think Cell Phone SMS billing can be an advantage are:

1. Younger users of your website would not have a credit card but many have a cell phone.

2. When people only have the option to enter credit card details, it gives them the chance to think about having to now locate their credit/debit card and can also give them the chance to immediately tell themselves, 'It isnt worth the hassle of locating the card and entering all the details right now'...etc.

3. Putting point 2 another way, most people have their cell phone very close by, and they only have to entre the given text number, not search for a credit card and entre all the details.

4. Many people do not like the thought of entering their personal credit/debit card details online and still have a hang up about this.

So now with SMS Text billing the process is simply:


1. Website user texts the code displayed on your site (e.g. Pay123) to a number displayed on your site (e.g. 84321)

2. Website user receives an immediate reply back with an access code to entre on your website.

3. Website user entres code in your website and gains immediate access to the restricted area of your site.


It's THAT simple.

Now there are many companies around the globe that will develop a bespoke solution like this for your site and of course charge you accordingly, (for set up and monthly service). However the company I have found operates in a similar way to Paypal, so instead of set up and monthly charges, they simply take a share of the revenue you generate and I think this is just perfect for start up projects or webmasters with no/lo budget.

Now the request for help...

The service I refer to works absolutely perfectly when a website is using basic HTML pages and not using a CMS/PHPNuke.

However when using the solution with PHPNuke, there is currently one problem, which is related to the prevention of people who know the direct URL of your premium content/restricted pages, accessing the pages directly.

The company offering the service advise that in order to prevent direct access to a page, you should use the following code at the top of any pages you want to restrict access to:



<?php
session_start();
if ($_SESSION['pay2access'] != "pay2access") { header("Location: not_authorised.html"); exit(); }
?>

ANY HTML GOES HERE



However, if I place this code immediately at the top of any custom pages/modules I create for my PHPNuke site, I am no longer able to access the pages even when I have purchased a subscription and access code. An example of what I have tried is:



<?php

session_start();
if ($_SESSION['pay2access'] != "pay2access") { header("Location: not_authorised.html"); exit(); }

if (!defined('MODULE_FILE')) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
include("header.php");
define('INDEX_FILE', true);
OpenTable();
echo"This is the page that will display the premium content.";
CloseTable();
include("footer.php");

?>



My knowlege of programming is limited, however something tells me that the reason the code will not work on a PHP Nuke site, may have something to do with the headder.php, mainfile.php or modules.php files.

I have thought that maybe the code has to be placed in one of these files, however then I am thinking this would not work because it would restrict ALL pages on a website.

So I deally, the code must be placed directly in the selected modules/pages that you want to restrict access to.

The website of the company I have been refering to is Only registered users can see links on this board! Get registered or login!

If anyone can help with this matter I would greatly appreciate it and I am sure many others here would too.

I hope this posting has been useful to all those also wanting to find an ideal SMS Text subscription option for their website.
 
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6792
Location: Ha Noi, Viet Nam

PostPosted: Tue Jun 03, 2008 6:50 am Reply with quote

Session_start() is already used for security pruposes within nuke and I'm not 100% sure fo what would happen by forcing another session to start.
However there might possibly be a way around it by using seesion_name() Only registered users can see links on this board! Get registered or login!

In your example code above, I would probably put the test directly after the OpenTable() so you could do something like
OpenTable()
test session is valid for pay2access {
include you private content
CloseTable()
} else {
echo a warning and link to pay
CloseTable() )
 
View user's profile Send private message Send e-mail
emmaphp
PostPosted: Tue Jun 03, 2008 7:35 am Reply with quote

Hi Guardian,

Thanks for your reply to my original posting.

My knowledge with PHP is not enough to understand the example you have given.

I have checked the link you have provided, but again the information on the PHP website is not something I fully understand.

I would not know how to create a custom script/code to achieve what the code I originally quoted does when implemented in a standard HTML only page.

Any further assistance would be greatly appreciated.
 
Guardian2003
PostPosted: Tue Jun 03, 2008 8:50 am Reply with quote

Would you like me to move this post to the For Hire forum in case someone can develop it for you?
 
emmaphp
PostPosted: Tue Jun 03, 2008 10:36 am Reply with quote

Hi again Guardian,

It is probably best to leave the posting here because I have already given the URL to a couple of people so they can track the progress and become involved etc.

Hopefully someone will be able to solve this matter soon, giving us all a solution to something I feel will be very beneficial to all.

Thanks again.

If anyone else can assist further this would be greatly appreciated.
 
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Wed Jun 04, 2008 5:03 am Reply with quote

You already have an open thread on this subject. Please do NOT double post.
 
View user's profile Send private message
Display posts from previous:       
Post new topic   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Seeking applications ...

View next topic
View previous topic
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 vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©