Jump to content


a few problems.


8 replies to this topic

#1 Spyder

    Jedi In Training

  • Members
  • PipPip
  • 438 posts
  • Gender:Male
  • Location:London, UK

Posted 15 November 2005 - 02:46 PM

I want to make a small hosting thing but not with pages just uploading ur progs and stuff u want ppl to be able to use and download.

but i wish to set charges on three different packages one being free offering different spaces, probs is i cant tell it how much space u have and not to sure how to determine and get the money and then generate only if u pay. any slices of codes or ideas welcome.

#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 15 November 2005 - 04:13 PM

I've undertaken this project once, and completed it. And i HIGHLY recommend that you don't try till you understand more about PHP. A php system that deals with money/hosting is not something to be taken lightly (or from a tutorial).

Other then that, there's no code i can give (due to foramatting my comp), and there's no tutorial i can recommend (because i didn't use any).

#3 Spyder

    Jedi In Training

  • Members
  • PipPip
  • 438 posts
  • Gender:Male
  • Location:London, UK

Posted 15 November 2005 - 04:46 PM

the problem is i need this soon.
and also rc69 if you could give a quick explanation on what i need u know what i need to define just a few points.

#4 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 15 November 2005 - 08:31 PM

First off, you need to know how to write your own scripts without using anything but the php manual (and the mysql manual if necessary).
Then you need to know at least the basics of how to prevent hacking. User input, one of the things i'm assuming you're going to need a lot of, is never to be trusted. You have to constantly make sure they submitted valid info, not something to get a back door to your system with.
Then you'll need to know how to handle payments (since you're offering pay hosting). Paypal is nice, but far from simple.

Even if you know what you're doing, it's not a 2 second job to create something like this, unless you want to be hacked.
So yet again, i HIGHLY recommend that you don't try this until you understand more about php (or are willing to pay on the spot for somebody to write something for you, which is usually never cheap).

#5 Spyder

    Jedi In Training

  • Members
  • PipPip
  • 438 posts
  • Gender:Male
  • Location:London, UK

Posted 16 November 2005 - 02:46 AM

kk, i have taken into mind some of the things you have said and can do some of it but as you said i shouldn't risk it and couldn't make it myself. I cant even think in my head how you would protect it and get the payments, so i guess so.

\

#6 Av-

    I Feel Left Out

  • Members
  • PipPipPipPip
  • 1,971 posts
  • Gender:Male
  • Location:10 ft. below sea level

Posted 16 November 2005 - 04:35 PM

if your in a hurry, dont know too much about php yet and want a secure script i suggest you find some kind of hostingmanager script on google, im sure there are some good, secure free/cheap ones out there

#7 Spyder

    Jedi In Training

  • Members
  • PipPip
  • 438 posts
  • Gender:Male
  • Location:London, UK

Posted 17 November 2005 - 02:17 PM

thnx avalanche but none of them suit what i want, but i have gone against rc69 and now have a fully working oayment method that sends all info to my mysql databse but i need to link it to somthing that will create a webpage depending on the name they have chosen.

my form is like this and is pretty straightforward on the info it sends:

<?
include("settings.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><? echo("$hname") ?> - Order</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
</head>

<body>
<form name="order" method="post" action="./order.php">
  <table width="500" border="1">
	<tr>
	  <td width="144"><span class="style1">First Name</span></td>
	  <td width="340"><input name="fname" type="text" id="fname" size="30" maxlength="30"></td>
	</tr>
	<tr>
	  <td><span class="style1">Last Name </span></td>
	  <td><input name="lname" type="text" id="lname" size="30" maxlength="30"></td>
	</tr>
	<tr>
	  <td><span class="style1">Address</span></td>
	  <td><input name="address" type="text" id="address" size="50" maxlength="55"></td>
	</tr>
	<tr>
	  <td><span class="style1">City</span></td>
	  <td><input name="city" type="text" id="fname4" size="25" maxlength="30"></td>
	</tr>
	   <tr>
	  <td><span class="style1">Country</span></td>
	  <td><input name="country" type="text" id="fname6" size="30" maxlength="30"></td>
	</tr>
	<tr>
	  <td><span class="style1">Email</span></td>
	  <td><input name="email" type="text" id="fname9" size="30" maxlength="30"></td>
	</tr>
	<tr>
	  <td height="28"><span class="style1">Subdomain</span></td>
	  <td>www.idarkness.co.uk/
		<input name="dname" type="text" id="dname" size="30" maxlength="30"> 
			   </tr>
	<tr>
	  <td><span class="style1">Username</span></td>
	  <td><input name="username" type="text" id="fname8" size="12" maxlength="12"></td>
	</tr>
	<tr>
	  <td><span class="style1">Password</span></td>
	  <td><input name="password" type="password" id="fname9" size="30" maxlength="30"></td>
	</tr>
	<tr>
	  <td><span class="style1">Package</span></td>
	  <td><select name="package">
		<option value="NULL" selected>Select Package</option>
		<option value="<? echo("$plan1cost"); ?>"><? echo("$plan1name"); ?></option>
		<option value="<? echo("$plan2cost"); ?>"><? echo("$plan2name"); ?></option>
			  </select></td>
	</tr>
	<tr>
	  <td><span class="pmethod">Payment Method </span></td>
	  <td><select name="pmethod">
		<option value="NULL" selected>Select Payment Method</option>
				<option value="paypal">PayPal</option>
			 </select> </td>
	</tr>
	<tr>
	  <td><span class="style1">Payment Term</span></td>
	  <td><select name="pterm">
		<option value="null" selected>Select Payment Term</option>
		<option value="monthly">Monthly</option>
	  </select></td>
	</tr>
	<tr>
	  <td><span class="style1">Agree To TOS</span><span class="style1"></span></td>
	  <td><input name="agreetotos" type="checkbox" id="agreetotos" value="Yes"></td>
	</tr>
	<tr>
	  <td><span class="style1"></span></td>
	  <td><input name="process" type="submit" id="process" value="Process My Order"></td>
	</tr>
  </table>
</form>
</body>
</html>

my hosting is simple u don't get a editable page buty u can upload a program and is listed in our databse and you can add a description screenshots and etc i just need help lkinking the users info to that now.

#8 Sicloan

    Young Padawan

  • Members
  • Pip
  • 31 posts

Posted 17 November 2005 - 03:54 PM

If your serious about this this is what you need to do:

Develope a CMS that allows you to have user registration.

Have a table for users, payments (probably 3 beuase your going to have to deal with subscriptions, 1 time payments and shopping cart payments), A usergroup table which will store the account type, storage size and have a unique ID.

Upon registration completion, allow people to upgrade thier accounts by using Paypal.

You're going to need to use IPN to do this, you can develop in paypal's sandbox so your not dealing with live payments until your absolutey sure it will work.

Your IPN will store all payment history in a mysql table. And you check the type of payment when the IPN goes though to your server and if its a sucessful payment then you execute the update query, where it would update the users account to the next "level" by changing the usergroup ID... You could also create as many usergroups as needed, therefore allowing different levels of security.

This is by no way an easy task. I have developed something similar, and it took many weeks of learning how to use the Paypal IPN system alone to impliment it... But it does pay off.

I suggest heading over to the paypal developer center and posting in thier forums, you can learn alot about the system and how it works, but they will only show you how to integrate the IPN into your existing CMS.

#9 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 17 November 2005 - 05:01 PM

View PostSicloan, on Nov 17 2005, 01:54 PM, said:

This is by no way an easy task. I have developed something similar, and it took many weeks of learning how to use the Paypal IPN system alone to impliment it... But it does pay off.
My sentaments exactly.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users