# Error when accessing PHP script from VB.net

**URL:** https://forum.kirupa.com/t/error-when-accessing-php-script-from-vb-net/302486
**Category:** programming
**Created:** [January 1, 2010, 6:53am UTC](https://forum.kirupa.com/t/error-when-accessing-php-script-from-vb-net/302486 "2010-01-01T06:53:53Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![arundracula](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@arundracula](https://forum.kirupa.com/u/arundracula)
#### Post date: [January 1, 2010, 6:53am UTC](https://forum.kirupa.com/t/error-when-accessing-php-script-from-vb-net/302486/1 "2010-01-01T06:53:53Z")

</div>

How to send a variable to a PHP script in a hosting server from my [VB.Net](http://VB.Net) Application?

I tried earlier but the response was Permission denied…

But the PHP script is chmodded to 777. Then also same error…

This only happens in [byethost.com](http://byethost.com) server.  
Is there any work around for this. I am using their free hosting service.

The script I used in [VB.net](http://VB.net) was…

```auto

Imports System.Net
Imports System.IO
...
        Dim myUrl As String = "http://www.google.com"

        Dim request As WebRequest
        Dim response As WebResponse
        request = WebRequest.Create(myUrl)
        response = request.GetResponse()

        Dim sr As StreamReader = New StreamReader(response.GetResponseStream())

        Dim txt As String = sr.ReadToEnd()

```

and this

```auto

Imports System.Net
...
Dim wc as new WebClient
dim x as String = wc.DownloadString("http://google.com")                      

```

These are working for [google.com](http://google.com), but not for any files in byethost.  
Is it a chmodding problem or any other problem?  
All php files are working, and I can access without any problem in html/flash.  
But not for [vb.net](http://vb.net).  
Error:

```auto
'System.Net.WebException' occurred in System.dll"

```
