Search Again:

Re: CD signup scripting

From: Lewis Watson
Date: Thursday, January 22, 2004
Time: 7:52:30 pm

Hi Ron,
I just used Optigold, Optiskin, ISPWizard and my own poor php skills to
create a new dialup user in Optigold using nothing more than the signup cd
and the clients computer....

Watch out for word wrapping....

Here is what I added to the optiskin file signup3.php

<? include "/path/to/signup_files/ins_helper.php"; ?>

<META HTTP-EQUIV="REFRESH" CONTENT="0;
URL=http://www.yoursite.com/path_to_ins_file/<? echo "$inslogin.ins"; ?>">

<? include "/path/to/signup_files/ins_unhelper.php";"; ?>



Now for the ins_helperfile.php file. I tried to make it easy for someone
to use it.. Just make the variables your own...

<?


// Set your variables here, detail_file is the complete path and filename
to be the insfile. entry_name is the name of your ISP..
//
$my_entry_name = "VisionSix Internet";
$my_domain = "visionsix.com";
$my_dns1 = "65.202.119.4";
$my_dns2 = "65.202.119.5";
$my_smtp_server = "mail.visionsix.com";
$my_pop3_server = "mail.visionsix.com";
$my_news_server = "news1.visionsix.com";



// Gets the variables from Optiskin. You many want to get more but this
will basically do it
//
$inslogin = $HTTP_POST_VARS["Login"];
$inspassword = $HTTP_POST_VARS["Password"];
$insfname = $HTTP_POST_VARS["First_Name"];
$inslname = $HTTP_POST_VARS["Last_Name"];



// One more variable needed from you; this sets the .ins file to match the
username
// detail_file is the complete path and filename to be the insfile that
will be created on the fly
//

$my_detail_file = "/home/www/visionsix/www/signup/$inslogin.ins";

// Just for testing to see the variables. You probably don't want this
once it's working.
//
echo $inslogin;
echo "<br>";
echo $inspassword;
echo "<br>";
echo $insfname;
echo "<br>";
echo $inslname;
echo "<br>";
echo "<br>";


// Open the file (Make sure the variable is set for the $my_detail_file
//

$fp = fopen( "$my_detail_file" , "w" );


// Open the file or fail
//

if(!$fp) {
echo "There was a problem with the ins file. Try again later.";
exit;
}



// Get the content and put it in the file; I had to have this all on one
line so fix the wrap :-)
//

$inputString =
"\n[Entry]\nEntry_Name=$my_entry_name\n[Device]\nType=modem\n[Internet_Mai
l]\nPOP_Server=$my_pop3_server\nSMTP_Server=$my_smtp_server\nEmail_Address
=$inslogin@$my_domain\nEmail_Name=$insfname
$inslname\nPOP_Logon_Name=$inslogin\nPOP_Logon_Password=$inspassword\n[Int
ernet_News]\nNNTP_Server=$my_news_server\n[TCP/IP]\nDNS_Address=$my_dns1\n
DNS_Alt_Address=$my_dns2\n[User]\nName=$inslogin\nPassword=$inspassword";

// You really don't want this echoed unless you are testing.
//
// echo "<pre>";
// echo "$inputString";
// echo "</pre>";


// We do need to write this stuff to the file...
//

fwrite( $fp, $inputString );


//
// Closes the file

fclose( $fp );

?>



And lastly the un_inshelper file

<?
// Deletes the ins file, we're going to make a new one for each person
anyway :-)
//

if ($inslogin) {

unlink( "/home/www/visionsix/www/signup/$inslogin.ins"; );

} else {

print "what file?";

?>

Change the variables to meet your needs and have fun. This really has no
error checking so it may wreak havoc, cause bad weather, and completely
ruin everything on your server - however- it's worked fine for me so I
hope maybe it help some of you...
Thanks,
Lewis








----- Original Message -----
From: "Ron Lockard" <optigold@thunderboltcomputing.com>
To: "Optigold ISP List" <isp-list@optigold.com>
Sent: Thursday, January 22, 2004 5:17 PM
Subject: Re: [Optigold ISP] CD signup scripting


> Lewis,
>
> I'm working on something else at the moment so whenever you can send it
> is fine and much appreciated. I was going to write the same thing if I
> couldn't get the FMPro post to work correctly, but was trying that route
> first.
>
> Thanks,
> Ron
>
>
> On Thu, 2004-01-22 at 15:04, Lewis Watson wrote:
> > I lied, its going to be longer than 10 minutes but just hold tight and
I
> > 'll have it shortly :-)
> > Lewis
> >
> > ----- Original Message -----
> > From: "Lewis Watson" <lists@visionsix.com>
> > To: "Optigold ISP List" <isp-list@optigold.com>
> > Sent: Thursday, January 22, 2004 4:47 PM
> > Subject: Re: [Optigold ISP] CD signup scripting
> >
> >
> > > Hi Ron,
> > > I have almost completed the php code that will build and then call
the
> > > .ins file to be downloaded to the clients computer myself. Give me
> > another
> > > 10 minutes and I'll send the code that you need in the optiskin
> > > signup3.php file.
> > > Lewis
> > >
> > >
> > > ----- Original Message -----
> > > From: "Ron Lockard" <optigold@thunderboltcomputing.com>
> > > To: "Optigold ISP List" <isp-list@optigold.com>
> > > Sent: Thursday, January 22, 2004 4:20 PM
> > > Subject: Re: [Optigold ISP] CD signup scripting
> > >
> > >
> > > > Lewis,
> > > >
> > > > I originally got the same Invalid contents, but Now I just get a
blank
> > > > file since I've made it past the point that it registers as
Invalid.
> > > > Then again I'm not really sure I progressed or regressed in the
true
> > > > sense of my objective since I don't know why it's blank at the
moment.
> > > >
> > > > Ron
> > > >
> > > > On Wed, 2004-01-21 at 12:58, Lewis Watson wrote:
> > > > > Ron,
> > > > > What are you getting at this time in the .ins file? If I use the
> > stock
> > > O/G
> > > > > pages I can successfully use a cd to signup a user. If I use the
> > > Optiskin
> > > > > pages I get a .ins file that has the word invalid rather than
the
> > user
> > > > > information.
> > > > > Thanks,
> > > > > Lewis
> > > > >
> > > > >
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Ron Lockard" <optigold@thunderboltcomputing.com>
> > > > > To: "Optigold ISP List" <isp-list@optigold.com>
> > > > > Sent: Wednesday, January 21, 2004 2:23 PM
> > > > > Subject: [Optigold ISP] CD signup scripting
> > > > >
> > > > >
> > > > > > Shawn,
> > > > > >
> > > > > > If I post the following parameters at any time to FMPro should
it
> > > > > > correctly return the info needed for CD Signup? I think what
I'm
> > > doing
> > > > > > is very similar to what the standard Optigold pages do so I'm
at a
> > > loss
> > > > > > as to what I need to do differently.
> > > > > >
> > > > > > -db=MainMenu.fp5
> > > > > > -lay=Web
> > > > > > -max=1
> > > > > > -format=signupinfo.cdml
> > > > > > -script=urlencode("cd signup web")
> > > > > > identification=201
> > > > > > login=<login>
> > > > > > password=<password>
> > > > > > -Find
> > > > > >
> > > > > > I seem to be having trouble getting FMPro to return the right
info
> > > for
> > > > > > an account. Is the "cd signup web" script available anywhere
for
> > me
> > > to
> > > > > > see what it's doing to help me troubleshoot this? What affect
> > does
> > > the
> > > > > > contents of the file specified in the -format parameter have
on
> > the
> > > > > > output for this case?
> > > > > >
> > > > > > Thanks,
> > > > > > Ron
> > > > > >
> > > > > >
> > > > > > ---------------------------------------------------
> > > > > > To subscribe, unsubscribe or to search list archive
> > > > > > please visit http://www.optigold.com/lists/isp.html
> > > > > > ---------------------------------------------------
> > > > >
> > > > >
> > > > > ---------------------------------------------------
> > > > > To subscribe, unsubscribe or to search list archive
> > > > > please visit http://www.optigold.com/lists/isp.html
> > > > > ---------------------------------------------------
> > > >
> > > >
> > > > ---------------------------------------------------
> > > > To subscribe, unsubscribe or to search list archive
> > > > please visit http://www.optigold.com/lists/isp.html
> > > > ---------------------------------------------------
> > >
> > >
> > > ---------------------------------------------------
> > > To subscribe, unsubscribe or to search list archive
> > > please visit http://www.optigold.com/lists/isp.html
> > > ---------------------------------------------------
> >
> >
> > ---------------------------------------------------
> > To subscribe, unsubscribe or to search list archive
> > please visit http://www.optigold.com/lists/isp.html
> > ---------------------------------------------------
>
>
> ---------------------------------------------------
> To subscribe, unsubscribe or to search list archive
> please visit http://www.optigold.com/lists/isp.html
> ---------------------------------------------------


---------------------------------------------------
To subscribe, unsubscribe or to search list archive
please visit http://www.optigold.com/lists/isp.html
---------------------------------------------------



Messages In This Thread:



Return to Digital Point Solutions' Home Page