Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27193

WebRequest Loads Wrong Page

$
0
0
Function im using
PHP Code:

    Function PostData(ByVal Site As StringByVal Reffer As StringByRef Cookie As CookieContainer)

        
Dim SendData As String Reffer
        Dim encoding 
As New UTF8Encoding
        Dim byteData 
As Byte() = encoding.GetBytes(SendData)

        
Dim postReq As HttpWebRequest DirectCast(WebRequest.Create(Site), HttpWebRequest)
        
postReq.Method "POST"
        
postReq.KeepAlive True
        postReq
.CookieContainer Cookie
        postReq
.ContentType "application/x-www-form-urlencoded"
        
postReq.Referer Site
        postReq
.UserAgent "Mozilla/5.0 (compatible; MSIE 10.6; Windows NT 6.1; Trident/5.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727) 3gpp-gba UNTRUSTED/1.0"
        
postReq.ContentLength byteData.Length

        Dim postreqstream 
As Stream postReq.GetRequestStream()
        
postreqstream.Write(byteData0byteData.Length)
        
postreqstream.Close()
        
Dim postresponse As HttpWebResponse
        postresponse 
DirectCast(postReq.GetResponse(), HttpWebResponse)
        
Dim reader As New StreamReader(postresponse.GetResponseStream())
        
RichTextBox1.Text reader.ReadToEnd

        
Return 0
    End 
Function 

Data im posting
PHP Code:

  PostData("http://www.youlikehits.com/youtubenew.php?rand=0.46525465317696757""http://www.youlikehits.com/stats.php?step=login"Sitelogincookie

Page it should load


Page it actually loads


whys it doing this and how do I fix it ??? thanks in advance

Viewing all articles
Browse latest Browse all 27193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>