I want to get information from remote mysql database from my VB6 Application.
I want to use PHP, because mysql database don't accept remote access.
I've seen an Example and then I try but not seccessfull.
Can anybody help me?

Hare i want to check the db for, is there available my name? yes or not Just It.

VB Code:
  1. sql = "Select * FROM usrtbl Where name='" & Text1.txt & "'"
  2.         path = "http://localhost/name.php?sql="
  3.         myPath = path & sql
  4.         MyIP = Inet1.OpenURL(myPath)
  5.         Text1.Text = MyIP

PHP Code:
<?php
$host
="localhost";
$user="root";
$db="ant";
$link=mysql_connect($host,$user) or die ("Couldnot connect".mysql_error());
if (
$link) {
    
mysql_select_db($db) or die ("Couldn't".mysql_error());
    }
    
$result=mysql_query('sql'); 

    
$num_rows=mysql_num_rows($result);
    if (
$num_rows 0)
    {
    print
"1";
    }else{
    print
"0";
    }
?>