Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Load a forum account information into a program.

Author
Message
HellsDevilDog
15
Years of Service
User Offline
Joined: 18th Mar 2011
Location: Ohio
Posted: 23rd Aug 2011 22:20 Edited at: 23rd Aug 2011 22:33
Hiya!

So I have a forum and been working on a program for the past few days, It's almost done but there's 1 future I'd like to include that I'm not too sure on how to make yet.

I'd like for the user to have to sync their forum account at least once to the program so it knows they're a user on the forum. I'd also like for it to receive their forum rank/level so it knows how many posts they have. (user must have 10+ posts to use the program, level 2 on the forum is achieved by having 10 posts, So if they're level 2 or higher, They can use the program).

Any help is appreciated on how I can accomplish this task, Thanks very much!

OH! And if it matters at all, I'm using SMF (Simple machines forums).
Blobby 101
20
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 23rd Aug 2011 22:33
What forum software are you using? If it's one where it's installed on your own server, then it may be possible to access the database on your site (although there would be a risk of people extracting the login data from your program and using it to hack into your site).

If your forum is hosted on an external server though, it's unlikely you'd be able to do this.

HellsDevilDog
15
Years of Service
User Offline
Joined: 18th Mar 2011
Location: Ohio
Posted: 23rd Aug 2011 22:54
I'm using SMF (Simple machines forums), I'm using a hosting plan from Hosting24. It uses cPanel if that matters.
Mugen Wizardry
User Banned
Posted: 23rd Aug 2011 22:55
Check out my MySQL Database Connector Library in the WIP thread. It has everything you're looking for. In turn, it can manipulate ANY. and I mean ANY MySQL command

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 23rd Aug 2011 23:10
The database connector isn't going to help on a hosted server. You'll have to use HTTP querries and write a custom web page to get the data you're after. You would want to do that forcing the use of SSL on that page. It's still risky, but it could work.

If you were hosting it on a personal server, then you could run a server app with the database connector.

Mugen Wizardry
User Banned
Posted: 23rd Aug 2011 23:12
Exactly my point. HOWEVER. IF you have access to the MySQL account that HOSTS your server, you ARE able to EASILY manipulate the database ITSELF. I have shown an example using MY database, in the Database connector!

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
HellsDevilDog
15
Years of Service
User Offline
Joined: 18th Mar 2011
Location: Ohio
Posted: 23rd Aug 2011 23:49
I'm pretty sure I can access my databases, I'm able to add users to the database while granting it's capabilities such as: Alter, Create routines, Create view, Drop, Index, lock tables, Select, Create, Create temporary tables, Delete, Execute, Insert, References, Update.

Not really sure if that's helpful.

I don't know much about SQL's other than they store data, But I'm more than happy to learn basics about them, I enjoy learning new computer related things so if you have any online basic sources.
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 23rd Aug 2011 23:56
If the web server is running Linux, you'll have to code a web page that your app will communicate with. If it's running Windows, and they'll let you run programs on it. (Like a DBPro program) Then you can code a server app that can communicate directly with the database.

Then you just have to work out the networking between your server and the client app.

HellsDevilDog
15
Years of Service
User Offline
Joined: 18th Mar 2011
Location: Ohio
Posted: 24th Aug 2011 00:01
It's running linux.
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 24th Aug 2011 00:16
You'll have to code something in a web page most likely then, and use the DBP HTTP REQUEST DATA command to get what you need out of the web page. You'll have to figure out something to encrypt/decrypt the data.

Mugen Wizardry
User Banned
Posted: 24th Aug 2011 00:46
Teach yourself SQL then use my app to access your SQL login. Then from there, you can use SQL commands to EASILY manipulate your ENTIRE darkbasic program.

EVEN loops!

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 24th Aug 2011 01:13
@MW, Your program requires the MySQL server to be accessible from the internet directly, which any decent server host isn't going to do.
He's using a hosted Linux server, which isn't going to run anything that you can create from DBPro either. So he's stuck with doing it through web pages.

Mugen Wizardry
User Banned
Posted: 24th Aug 2011 01:14
I see

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
WorldBot
14
Years of Service
User Offline
Joined: 5th Aug 2011
Location: In a Worms game
Posted: 26th Aug 2011 12:27 Edited at: 26th Aug 2011 12:35
Quote: "Any help is appreciated on how I can accomplish this task, Thanks very much!
OH! And if it matters at all, I'm using SMF (Simple machines forums)."


I have done it few days ago.

in DBPro you have to code the password with MatrixUtil dll



and send to a php page User_Name$ and User_Pass$ by post or get
(i send a encrypted version of them with a hash for more secure)

In the php page, you ask the mysql server like that (here, it's for SMF 2)



in the mysql data returned you can check all what you want

if 'is_activated' > 10 : User is banned
if 'is_activated' !=1 : User account is not activated
if 'last_login' ==0 : User never login to the forum
'real name' is the display name

for what you want : (5 or more, depend of your member group settings)
if 'id_post_group' <5 : Low Member Post Group

and ... compare the row 'passwd' with the $user_pass you have receveid

Login to post a reply

Server time is: 2026-07-10 22:37:58
Your offset time is: 2026-07-10 22:37:58