您好,欢迎访问一九零五行业门户网

PHP 远程调用有关问题!望高手帮忙教下如何做

php 远程调用问题!望高手帮忙教下怎么做!
以下是我自己弄的!
建立个 123.php文件 如下
$url = http://www.123456.com/ajax.ashx?action=addorder&orderidshow=1&id=10086&amt=10&mb=2&[email protected];
$result = file_get_contents($url);
echo $result;

显示出的结果是 yes_5e286f3e
可是我想把 yes_去掉 单单显示出 5e286f3e 请问我需要怎么做! 本人小菜一个,望高手能帮忙解答!
------解决思路----------------------
$str = yes_5e286f3e;
$arr = explode('_',$str);
echo $arr[1];

------解决思路----------------------
$url = http://www.123456.com/ajax.ashx?action=addorder&orderidshow=1&id=10086&amt=10&mb=2&[email protected];
$result =explode('_',file_get_contents($url));
echo $result[1];
------解决思路----------------------
$result = ltrim('yes_5e286f3e','yes_');
echo $result;

------解决思路----------------------
這樣就可以了。
$url = http://www.123456.com/ajax.ashx?action=addorder&orderidshow=1&id=10086&amt=10&mb=2&[email protected];
$result = file_get_contents($url);
$result = str_replace('yes_', '', $result); // 把yes_替換為空
echo $result;

其它类似信息

推荐信息