HOME       >>       Programming

Create A Dynamic Forum User


iXeta

Ok, I have another question, this one probably a lot more complicated.I have a server/client system with user accounts all set up. I want to be able to dynamically create a user on any typeof forum, IPB, SMF, etc through vb.net. Im assuming this means going through one of two ways, the first being able tolink up with an online mySQL database with the forum, and how would I add users that way, or a second way of is therea way to open like the registration.php file with certain conditions that would automatically register the variables in theconditions to a user account. I might have to post this in the PHP section if I can't connect with the mySQL/similar way.But im hoping somone knows how this would work.


shadowx

Theoretically you could, i think, connect to the remote database and go from there. However the problem is you are skipping all the validation of the signup page. This might not seem to big a deal if it will be only you that uses the program but you would need to have some validation in your VB to prevent you accidentally entering wrong data and to check if the chosen username already exists (same goes for email too) otherwise you end up overwriting data. You also need to find a host who is willing to allow remote access to the database. That might not be so easy to find.

If i were you i would go for loading the signup page within an internal browser in VB. You would need to create custom HTTP headers to include the POST data though, so you'd have to read up on that.

To do the PHP page version you would just create a hidden browser element in VB, have a radio select box or something for each forum and then depending on which one is clicked/selected it changes the address of the inbuilt browser to https://www.salesforce.com/products/platform/overview/ etc.. with the custom HTTP headers.


rpgsearcherz

I'm confused as to what the point of this is?You mean just so that someone can use one registration to join a multitude of forums, but only one at a time, right?If so, why not just register there directly?


iXeta

I'm confused as to what the point of this is?

 

You mean just so that someone can use one registration to join a multitude of forums, but only one at a time, right?

 

If so, why not just register there directly?

The point of my program is that its a client/server program that is the primary communication application for my

clan. People already have user accounts on the server/client program with avatars, affiliations to inter-clan teams

and more. I want instead of them registering on the forum and the program, for them to be done in one form.

I would set it up to try and block anyone from registering without having an account on my application that I designed

(the communication application) and just link the forum and the program together.

 

Theoretically you could, i think, connect to the remote database and go from there. However the problem is you are skipping all the validation of the signup page. This might not seem to big a deal if it will be only you that uses the program but you would need to have some validation in your VB to prevent you accidentally entering wrong data and to check if the chosen username already exists (same goes for email too) otherwise you end up overwriting data. You also need to find a host who is willing to allow remote access to the database. That might not be so easy to find.

 

If i were you i would go for loading the signup page within an internal browser in VB. You would need to create custom HTTP headers to include the POST data though, so you'd have to read up on that.

 

To do the PHP page version you would just create a hidden browser element in VB, have a radio select box or something for each forum and then depending on which one is clicked/selected it changes the address of the inbuilt browser to https://www.salesforce.com/products/platform/overview/ etc.. with the custom HTTP headers.

I'm afraid I'm not very familiar with doing advanced HTML or PHP. I've read through a lot of code but I don't really know what is what.

Could you give me an example of how a HTTP header works with POST to change things inside the signup.php page?

The only thing that comes to mind when you described that is the index.php?variablehere=something&variable2here=something would it be like that?

And how would I combine that with the page (if that is the correct way). Sorry if this is confusing at all.


TheDisturbedOne

There are many bridges out there that you can use. Are you using a CMS, or is it a software that you made or something like that?You could also get a quick register form, and put it on the registration page, for new users, but I don't know a way to do it with existing users.


shadowx

Im not so good with HTTP headers myself as it goes! It was really just a sort of suggestion of steps to take.

This link http://www.livejournal.com/doc/fotobilder-api will show some examples of HTTP headers with and without variables.


The only thing that comes to mind when you described that is the index.php?variablehere=something&variable2here=something would it be like that?

Well PHP uses two main types of variables, POST and GET. GET variables are sent in the URL like you said up there ^^^

POST variables are sent via HTTP requests. If you can somehow set up the signup.php page to accept GET variables instead (that could be a fair amount of work!) then you could use a URL like you posted. Otherwise you might not be able to do this. It IS possible to use PHP to set HTTP headers and set POST variables within these headers using a library called cURL (or CURL) (google it) i never had much luck with it though, i found it quite complex and not all webhosts have it enabled for security reasons methinks.

The last remaining option is to pay someone to modify all the forums you are planning to use to connect to one database (or create a PHP page to sign the user up on all the forums for you.) but that could cost a hundred pounds or more.


What exactly is the situation? your clan uses a program for communication etc...? (did you write this app?) and you also have a forum? (just the one or more than one?) and you want it so any user who registers on the communication program is automatically registered on the forum(s)?

If so there might be a solution involve javascript.... Im not 100% though it might not work (plus im not a JS expert so i can only lay the foundations)

iXeta

There are many bridges out there that you can use. Are you using a CMS, or is it a software that you made or something like that?

You could also get a quick register form, and put it on the registration page, for new users, but I don't know a way to do it with existing users.

Im using software that I designed myself. Im not using a pre-built user system.

And im hoping that I wont have to go back and just use a quick register form, because I want to find a way to actually link it.

 

 

Im not so good with HTTP headers myself as it goes! It was really just a sort of suggestion of steps to take.

 

This link http://www.livejournal.com/doc/fotobilder-api will show some examples of HTTP headers with and without variables.

Well PHP uses two main types of variables, POST and GET. GET variables are sent in the URL like you said up there ^^^

 

POST variables are sent via HTTP requests. If you can somehow set up the signup.php page to accept GET variables instead (that could be a fair amount of work!) then you could use a URL like you posted. Otherwise you might not be able to do this. It IS possible to use PHP to set HTTP headers and set POST variables within these headers using a library called cURL (or CURL) (google it) i never had much luck with it though, i found it quite complex and not all webhosts have it enabled for security reasons methinks.

 

The last remaining option is to pay someone to modify all the forums you are planning to use to connect to one database (or create a PHP page to sign the user up on all the forums for you.) but that could cost a hundred pounds or more.

What exactly is the situation? your clan uses a program for communication etc...? (did you write this app?) and you also have a forum? (just the one or more than one?) and you want it so any user who registers on the communication program is automatically registered on the forum(s)?

 

If so there might be a solution involve javascript.... Im not 100% though it might not work (plus im not a JS expert so i can only lay the foundations)

Thanks for the info on the HTTP headers, that will make it a lot easier to find more information on how I could do this.

But as for my setup, I've programmed everything so far, I wrote it in vb.NET (2005), I need to connect to just one database (the forum). Right now I

have a setup that takes logs from our Ventrilo server (voice communication program) it find every user that has connected to the server at any time, and

adds them to a database. My server program ive designed will take that database (saved as INI) and when a user tries to connect, if its their first time

connecting to the communication program, it will create the account on the forum for them. So at one point in the program I'd call a sub or another

application/script in the program or HDD of the server computer to create the user for it. (if that makes this any clearer)


shadowx

Hum i see... Well i know you can use SQL queries in VB, and you can also connect to remote servers (and presumably databases) with a winsock command/element (i think, its been a long time since i used VB and i didnt get along with it) So if you connect to the server using winsock (or the equivalent to open a connection to a remote server) and then use that connection as a link to the database (in the database connection code use the winsock link as the address) and use the SQL port (3306 on my local test server config thingy) you could in theory connect to the DB, then you can just do what you need to do by querying the database looking for the current user, if they dont exist then make a new record for them (this could be pretty complex as you may have to add details to more than one database and you may also need to encrypt data to make it work) and that would sign them up to the forum.the problem with this is that most hosts (i would expect) would not allow remote connections to the database for security reasons so you might have trouble with that. Another option could be to load a small PHP file within a hidden browser like: check.php?username=SOME_USERand in that PHP file do things like check in the DB for the username, if it doesnt exist then create it for them.Less complex that way i think (unless you dont know php) and less issues to overcome as you wont have to get through security gates to access the database and it would be easier to pass variables too. It would still require input like password, email address, real name etc... etc.... but you could use GET variables like: check.php?username=bob&password=bobpass&email=bob@bob.com etc.... etc..... #Make much sense? Probably not as its 00:31PM and i got up at 9am : /


iXeta

Hum i see... Well i know you can use SQL queries in VB, and you can also connect to remote servers (and presumably databases) with a winsock command/element (i think, its been a long time since i used VB and i didnt get along with it)
So if you connect to the server using winsock (or the equivalent to open a connection to a remote server) and then use that connection as a link to the database (in the database connection code use the winsock link as the address) and use the SQL port (3306 on my local test server config thingy)

you could in theory connect to the DB, then you can just do what you need to do by querying the database looking for the current user, if they dont exist then make a new record for them (this could be pretty complex as you may have to add details to more than one database and you may also need to encrypt data to make it work) and that would sign them up to the forum.

the problem with this is that most hosts (i would expect) would not allow remote connections to the database for security reasons so you might have trouble with that. Another option could be to load a small PHP file within a hidden browser like: check.php?username=SOME_USER

and in that PHP file do things like check in the DB for the username, if it doesnt exist then create it for them.

Less complex that way i think (unless you dont know php) and less issues to overcome as you wont have to get through security gates to access the database and it would be easier to pass variables too. It would still require input like password, email address, real name etc... etc.... but you could use GET variables like: check.php?username=bob&password=bobpass&email=bob@bob.com etc.... etc..... #

Make much sense? Probably not as its 00:31PM and i got up at 9am : /


Since I use Winsock for my connection to my programmed server, I might as well give the mySQL connection a try.
But the php file sounds a lot simpler although there is a chance for somone trying to mess with my setup (trying to make
sure people only have an account on the forum if they are on the communication program). But its worth trying at least
temporarily. But yeah, even though I know fairly little about PHP I know enough general coding that reading a few PHP
tutorials should get me the rest of the way. Thanks for all the help!


VIEW DESKTOP VERSION REGISTERGET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.