$value="$s@$g@$t@$d@$m@$j@@$bz@@@@$pwd@df@";
$url = "http://58.40.18.90/prepayment/payment_interface.php?value=$value";
$content = file_get_contents($url);
if ($content == 'Y')
{
 $sql = "insert into B(id,zt) values ($s,1)";}else{
 $sql = "insert into B(id,zt) values ($s,0)";} 转化成java代码实现 用什么函数 ?
是这样吗 ?
URL url = new URL(url);
URLConnection URLconnection = url.openConnection();
HttpURLConnection httpConnection = (HttpURLConnection) URLconnection;
int responseCode = httpConnection.getResponseCode();
if(responseCode == HttpURLConnection.HTTP_OK){
{
$sql = "insert into B(id,zt) values ($s,1)";
}else{
$sql = "insert into B(id,zt) values ($s,0)";
}
但是php中返回的是Y,java则是200呢 ,怎样让java中也返回Y