ผิดที่เครื่องหมาย Single quote ที่บรรทัดที่ 8 กับ 19 ครับ
มันไม่ใช่ Single quote มันเป็น back quote
ถ้าไม่เข้าใจพี่ผมพิมพ์ ก็พิมเครื่องหมาย ' ลงไปเอง อย่าก๊อบมา
เพิ่มอีกนิด เวลาแก้ไขไฟล์ php ให้ใช้โปรแกรมที่สามารถแสดงสีของ syntax ได้ครับ เช่น editplus
แต่จริงๆ ที่คุณก๊อบมาลงใน [ code] ก็พอรู้แล้วนะว่า syntax มันผิด เพราะสีมันแสดงไม่ถูกครับ
ดูโค้ดที่ผมเอามาลง ดูผิวเผินก็เหมือนกันเด๊ะๆ แต่ทำไมใช้ได้หละ

<?php
$truemoney_password = $_POST[truemoney_password];
function tmn_refill ($truemoney_password)
{
if(function_exists('curl_init'))
{
$curl =
curl_init('[url]https://www.tmpay.net/TPG/backend.php?merchant_id=GG12092xx&password=[/url]$truemoney_password&resp_url= http://www.mywebsite.com/tmpay_result.php');
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
curl_setopt($curl, CURLOPT_HEADER, FALSE);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
$curl_content = curl_exec($curl);
curl_close($curl);
}
else
{
$curl_content = file_get_contents('[url]https://www.tmpay.net/TPG/backend.php?merchant_id=GG12092xx&password=[/url]$truemoney_password&resp_url= http://www.mywebsite.com/tmpay_result.php');
}
if(strpos($curl_content,'SUCCEED') !== FALSE)
{
return true;
}
else
{
return false;
}
}
?>