Results 1 to 9 of 9

Thread: How can I charge people to visit a site?

  1. #1
    Join Date
    May 2009
    Rochester, NY

    Question How can I charge people to visit a site?

    I have a website, and I would like to charge people to view the content. Basically, I'd like to give them a free trial for a certain number of days, and then require them to pay a modest fee to continue using it. Is there any application or prebuilt script out there that would allow me to do this?


  2. #2
    Join Date
    Mar 2010
    I believe a lot of web developers turn to PayPal for the payment. You need to add code on your portion to "interface" with PayPal instead.

    I wonder if there are others besides PayPal instead.

  3. #3
    Join Date
    May 2009
    Rochester, NY


    Well, PayPal will certainly be the option for payment, but that's not my concern. My concern is how I can block people from accessing the site until they pay, and allowing free access for 60 days. Any approaches?

  4. #4
    Join Date
    Mar 2010
    Quote Originally Posted by multimediocrity View Post
    Well, PayPal will certainly be the option for payment, but that's not my concern. My concern is how I can block people from accessing the site until they pay, and allowing free access for 60 days. Any approaches?
    I believe you have a web server to host your web-site? Usually when you configure a new URL domain, there will be a default homepage or index.html or whatever. The location of this file is usually part of the web server configuration.

    This means say your URL is www.testme.com. Upon using browser enter the URL, by default the web server should throw out some web page. Then it is *this* web page that you do your access control.

    For hosted web server I believe you got to check with them where is the default homepage or index.html or whatever stored and configured.

  5. #5
    Join Date
    May 2009
    Rochester, NY


    Again, thanks for the info, but that's not my concern. Yes, I'd do my access control from there. It's not a matter of the logistics, but the programming. This is going to be quite an extensive job to program a login, access, decide when the free period's up, and so on. Is there any software or prebuilt code out there that can let me do this without much work?

  6. #6
    Join Date
    Jan 2009
    Generally for free trials you would require the user to "sign up". Usually I've seen a file included at the top of every page that validates the user's access and redirects to a login/payment page if the user/guest doesn't have proper access. The specifics for the programming depend on what you have currently and what you are comfortable with writing.

  7. #7
    Join Date
    May 2009
    Rochester, NY


    Well sure. The plan is to write that if I need to. I'm comfortable with writing all the scripts associated with this, but it will be terribly time-consuming. I was wondering if there were any prebuilt scripts that would lessen my workload.

  8. #8
    Join Date
    Jan 2007
    I'd scour Paypal for PHP samples related to initiating the transaction and receiving payment completion notifications. On your end, you need to create something like a subscriptions table, with a unique invoice/subscription ID, the user ID, the date range it applies to, and the Paypal transaction ID and status (not submitted, pending, failed, canceled, complete, etc.).

    So ... when someone checks out, you generate a subscription record with a subscription record with the appropriate date ranges, user ID, a "not submitted" Paypal status, and whatever other information you need to associate w/ the subscription. When you forward/redirect the user to the Paypal checkout, make sure you pass the subscription ID along. Using the libraries you found on Paypal, update the Paypal ID and status when paypal sends a transaction update. You can optionally notify the user at this point via email that their payment has been successfully processed and they may now access the protected content.

    At this point, the user has subscription a record associated with the user record. At any point while the user is signed in (also while signing in), you can look for subscription records that contain the current date and have a PP status of "complete." So, if a subscription exists [that relates to the object/page being requested], allow execution to continue; else, require() or redirect to a "you are not subscribed" page.

    If you're protecting various pages/sections/objects independently, you'll need a table that lists those sections and an intersect table between the subscriptions and the sections. So, as implied above, each subscription will have to be joined to an objects table to ensure that it applies to the requested object.

    In terms of prepackaged apps that do this -- I'm not sure you'll find something that does JUST this. You'll more likely find scripts that deal with full-on account/user management. For those, I'd google things like, "PHP account management" and variations of that. However, as I've described it above, you're probably looking at a 20 to 40 hour project, including the Paypal integration.
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

  9. #9
    Join Date
    May 2009
    Rochester, NY


    Yeah, I was thinking something along those lines if I had to do it myself... and I'm sure it would be at least 40 hours considering security and testing, and the fact that I'm a slow programmer. :P That's what I was looking for a prebuilt solution.


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.11537 seconds
  • Memory Usage 2,941KB
  • Queries Executed 15 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (9)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (73):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • bbcode_parse_start
  • postbit_imicons
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates