첫 번째 부분 : 서버가 일부 출력을 생성하는 하나의 단일 PHP 파일이 있습니다.
두 번째 파트 : 서버에서 생성 한 출력을 사용하여 정보를 제출합니다.
은 내가 무엇을했는지 :
파일 이름 : 오류
<?php
//first part
based on the information here server generates some output say:
111 success: id:104.123/12345678 |value:10000045
//second part
i will be using the output generated in the first part.
what i have done is something like this
$server_said = file_get_contents('http://http://abc.php');
//abc.php is the file name
if (preg_match_all('/104.123\:(\d*)/', $server_said, $matches))
//i want to display only 104.123/12345678 part
{
$input = $matches[1];
}
$xmlfile = '<?xml version="1.0" encoding="UTF-8"?>
<identifier identifierType="id">'.$input.'</identifier>';
?>
abc.php : 의도 한 결과가 $ 입력에 표시되지 않는, 그냥 $ 입력으로 머물고
내가 어떻게 할 수 있니?
위의 코드는 잘못되었을 수 있습니다. 정규 표현식이 실패
을 정보를 제출 하시겠습니까? – 3emad
@ 3emad .. ID로 인정하는 서버입니다.이 ID는 XML 파일에 포함되어야합니다 .. –