Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 2 online users. » 0 Member(s) | 1 Guest(s) Google
|
Latest Threads |
Looking for Adventure? Fi...
Forum: Random Discussion
Last Post: iHOMEz
11-16-2024, 09:18 PM
» Replies: 0
» Views: 493
|
Prettys Womans in your to...
Forum: Random Discussion
Last Post: iHOMEz
10-30-2024, 07:45 AM
» Replies: 0
» Views: 780
|
Prettys Womans in your ci...
Forum: Random Discussion
Last Post: iHOMEz
10-26-2024, 10:50 AM
» Replies: 0
» Views: 810
|
Beautiful Womans from you...
Forum: Random Discussion
Last Post: iHOMEz
10-19-2024, 02:48 PM
» Replies: 0
» Views: 911
|
Prettys Womans in your ci...
Forum: Random Discussion
Last Post: iHOMEz
10-06-2024, 05:00 PM
» Replies: 0
» Views: 1,069
|
Womans from your city - V...
Forum: Random Discussion
Last Post: iHOMEz
07-28-2024, 10:26 AM
» Replies: 0
» Views: 1,442
|
Supreme Сasual Dating - A...
Forum: Random Discussion
Last Post: iHOMEz
06-14-2024, 11:28 AM
» Replies: 0
» Views: 1,862
|
Beautiful Womans in your ...
Forum: VB.NET
Last Post: iHOMEz
06-09-2024, 09:23 PM
» Replies: 0
» Views: 1,681
|
Hangman in Rust
Forum: Other
Last Post: brandonio21
02-04-2018, 11:14 AM
» Replies: 2
» Views: 20,680
|
How to: Search files from...
Forum: VB.NET
Last Post: brandonio21
11-25-2017, 12:55 PM
» Replies: 1
» Views: 15,990
|
|
|
others can't connect to online database |
Posted by: Stefanvp - 08-13-2011, 02:54 PM - Forum: VB.NET (Visual Basic 2010/2008)
- Replies (3)
|
|
hi everyone who read this,
I'm kinda new to VB.net but i'm getting pretty with someone helping me and tutorials on the internet.
But now I do have a problem that no-one could solve:
I've made a program that connects to an online database using MySQL. It's working fine for me, in the debugging mode and as published as well. I've made this version available for other people so they could see what's going on right now, but they can't register nor login. Everyone is getting this message: "Acces denied for user 'svpenter' @' ip51cc873e.speed.planet.nl'* (using password: YES)
" *between the ' ' depends on the users, but the rest is the same...
How do I solve this?
greets Stefanvp
PS.: The username and password are both placed in the connection-string
|
|
|
Saving and Reading oAuth Tokens with TwitterVB |
Posted by: brandonio21 - 08-10-2011, 02:57 PM - Forum: Code Snippets
- Replies (6)
|
|
I have received a request to post a code that would allow the user to save and read the user's Twitter oAuth Tokens, so here it is.
This is the code that writes the file:
Code: Public Shared Function getOAuth(ByVal username As String, ByVal PIN As String)
Try
Dim writer As New System.IO.StreamWriter(My.Application.Info.DirectoryPath + "/" + username + ".dat")
Dim pinIsValid As Boolean = tw.ValidatePIN(PIN)
If pinIsValid = True Then
'PIN is valid, write it
Dim oAuth As String = tw.OAuth_Token
Dim oAuthSecret As String = tw.OAuth_TokenSecret
writer.Write(oAuth + "/" + oAuthSecret)
writer.Close()
Return "oAuth Information Written!"
Else
Return "Invalid PIN"
End If
Catch ex As Exception
Trace.TraceWarning("Error while trying to get oAuth Tokens, " + ex.Message)
Return ""
End Try
End Function
Keep in mind that code also checks to see whether the PIN is valid or not, so you could use this entire code snippet to validate the twitter username.
This is the code to authenticate the user:
Code: Public Shared Function Authenticate(ByVal username As String) As Boolean
Try
Dim reader As New System.IO.StreamReader(My.Application.Info.DirectoryPath + "/" + username + ".dat")
Dim oAuthToken As String = reader.ReadToEnd.Split("/")(0).ToString
Dim oAuthTokenSecret As String = reader.ReadToEnd.Split("/")(1).ToString
reader.Close()
tw.AuthenticateWith(consumerKey, consumerSecret, oAuthToken, oAuthTokenSecret)
Return True
Catch ex As Exception
Trace.TraceWarning("There was an error while trying to authenticate, " + ex.Message)
Return False
End Try
End Function
This code might also prove useful.. It checks whether or not an oAuth Token for that username has already been saved.
Code: Public Shared Function oAuthExists(ByVal username As String) As Boolean
Try
If My.Computer.FileSystem.FileExists(My.Application.Info.DirectoryPath + "/" + username + ".dat") Then
Dim reader As New System.IO.StreamReader(My.Application.Info.DirectoryPath + "/" + username + ".dat")
If reader.ReadToEnd = "" Then
Return False
Else
Return True
End If
reader.Close()
Else
Return False
End If
Catch ex As Exception
Return False
End Try
End Function
I hope that this has helped!
|
|
|
EA Sales |
Posted by: brandonio21 - 08-06-2011, 11:31 AM - Forum: Gaming
- No Replies
|
|
The EA Summer sales are here. There are about 20 games to buy, each for about $4.99!
I went ahead and picked up C&C4 Just because I wanted to try it out. But if you don't have any Battlefield game yet, I highly recommenced getting those.
Anyway, the sales last until August 8th.
<!-- m --><a class="postlink" href="http://store.origin.com/store/ea/html/pbpage.summersale">http://store.origin.com/store/ea/html/pbpage.summersale</a><!-- m -->
Happy hunting!
|
|
|
Improved program trial |
Posted by: brandonio21 - 08-05-2011, 09:36 PM - Forum: Code Snippets
- Replies (4)
|
|
A little while ago I posted a video tutorial on how to make your application a 30 day trial. Well, after reviewing that video I realized that the code was long obsolete. So here is a new code.
[code2=vbnet]'This variable, trialLength is the number of days you want your free trial (or paid) to last.
Dim trialLength As Integer = 7
If My.Settings.startdate.Year = 1 Then
'Date has not yet been set, set it for today
My.Settings.startdate = My.Computer.Clock.LocalTime
Else
'Date has already been set, check for # days
Dim ts As New TimeSpan(-trialLength, 0, 0, 0, 0)
If My.Settings.startdate.Subtract(My.Computer.Clock.LocalTime) <= ts Then
'This part of the code occurs if the trial is finished
MsgBox("7 Day trial ended!")
Else
'Trial has not yet ended
MsgBox("You're good.")
End If
End If[/code2]
So simply adjust the trialLength variable to how many days you want your trial to last, and put this into your form load sub!
|
|
|
Vs2008 TwitterVb |
Posted by: histromon - 08-05-2011, 11:54 AM - Forum: VB.NET (Visual Basic 2010/2008)
- Replies (10)
|
|
Hi, I have looked at your video and i encounter some problem.
Code: If TextBox1.Text = "" Then
MsgBox("You must insert a code!")
Else
'Proceed
Dim isvalid As Boolean = tw.ValidatePIN(TextBox1.Text)
If isvalid = True Then
Dim oauthToken As String = tw.OAuth_Token()
Dim oauthtokensecret As String = tw.OAuth_TokenSecret()
Else
MsgBox("Wrong code!")
End If
End If
IT always return me false when button is clicked. Need help urgently
|
|
|
|