-
Jun 1st, 2012, 07:13 AM
#1
Thread Starter
Hyperactive Member
RSS Feed or Page Update
Is there a way to check if a site had a page update or a new post easily?? Even just to check if something had changed on the page. Any help would be appreciated.
-
Jun 1st, 2012, 04:18 PM
#2
Thread Starter
Hyperactive Member
Re: RSS Feed or Page Update
Here is my code so far
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox1.Items.Add(TextBox1.Text)
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(TextBox1.Text)
Dim response As System.Net.HttpWebResponse = request.GetResponse()
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
Dim sourcecode As String = sr.ReadToEnd()
My.Settings.s1 = sourcecode
My.Settings.s2 = sourcecode
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(TextBox1.Text)
Dim response As System.Net.HttpWebResponse = request.GetResponse()
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
Dim sourcecode As String = sr.ReadToEnd()
My.Settings.s1 = sourcecode
If (My.Settings.s1 <> My.Settings.s2) Then
ListBox2.Items.Add(TextBox1.Text + " NEW")
End If
End Sub
I check the pages html agents its original and if there diferent say new but it always comes up as diferent(NEW) and if its a php page (i think thats the problem) it does not work?
Edit: It seems to work when im using localhost so what would be the best thing to check if a website has had a new post or changed?
Last edited by sherlockturtle; Jun 1st, 2012 at 08:02 PM.
-
Jun 2nd, 2012, 01:40 PM
#3
Thread Starter
Hyperactive Member
Re: RSS Feed or Page Update
Heres what i got now but it still does nto work sometimes and always show new
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox1.Items.Add(TextBox1.Text)
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(TextBox1.Text)
Dim response As System.Net.HttpWebResponse = request.GetResponse()
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
Dim sourcecode As String = sr.ReadToEnd()
If (CheckBox1.Checked = True) Then
My.Settings.s1 = sourcecode
My.Settings.s2 = sourcecode
End If
If (CheckBox2.Checked = True) Then
My.Settings.s3 = sourcecode
My.Settings.s4 = sourcecode
End If
If (CheckBox3.Checked = True) Then
My.Settings.s5 = sourcecode
My.Settings.s6 = sourcecode
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Label3.Text = "Checking..."
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(ListBox1.SelectedItem)
Dim response As System.Net.HttpWebResponse = request.GetResponse()
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
Dim sourcecode As String = sr.ReadToEnd()
My.Settings.s1 = sourcecode
If (My.Settings.s1 <> My.Settings.s2) Then
ListBox2.Items.Add(ListBox1.SelectedItem)
End If
If (My.Settings.s3 <> My.Settings.s4) Then
ListBox2.Items.Add(ListBox1.SelectedItem)
End If
If (My.Settings.s5 <> My.Settings.s6) Then
ListBox2.Items.Add(ListBox1.SelectedItem)
End If
Label3.Text = "Done"
End Sub
Edit: Or how would i just get the body?
Last edited by sherlockturtle; Jun 2nd, 2012 at 02:34 PM.
-
Jun 3rd, 2012, 09:26 PM
#4
Thread Starter
Hyperactive Member
Re: RSS Feed or Page Update
I know i should not bump but anyone??? I realy want to make this program work?
-
Jun 4th, 2012, 04:46 PM
#5
Thread Starter
Hyperactive Member
Re: RSS Feed or Page Update
Please...anything.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|