จนปัญญาแล้ว รบกวนท่านมีเคยทำ ระบบเติมเงิน Tmtopup ช่วยทีครับ

เริ่มโดย $100perday, 22 กันยายน 2012, 23:08:54

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

$100perday

หน้า login
<html>
<head>
<title>เติมเงิน</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<body>
<table width="625" border="0" align="center" cellpadding="1" cellspacing="1">
  <form method="post" action="tmrequest.php"><tr>
    <td width="124"><font size="2">รหัสบัตร 14 หลัก</font></td>
    <td width="356"><input name="truemoney_password" type="text" size=50 maxlength="14"><input type="hidden" name="usermem" value="peter"></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input type="submit" value="เติมเงิน"></td>
  </tr></form>
</table>
</body>
</html>


หน้า tmrequest.php

<?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($curlCURLOPT_TIMEOUT10);
curl_setopt($curlCURLOPT_HEADERFALSE);
curl_setopt($curlCURLOPT_RETURNTRANSFERtrue);
curl_setopt($curlCURLOPT_SSL_VERIFYPEERfalse);
curl_setopt($curlCURLOPT_FOLLOWLOCATIONtrue);
$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;
}
}
?>



หน้า tmpay_result


<?php
require_once "connectdb.php";
$transaction_id $_GET['transaction_id'];
$password $_GET['password'];
$amount  $_GET['amount'];
$status $_GET['status'];
$usermem $_GET[usermem]
     
    if( 
$status === 
{
$sql_update"update member set status = '$status',point = '$amount' where usermem = '$usermem'";
mysql_query($sql_update);
echo 
"SUCCEED"

}
   else 
    {
         
/* ไม่สามารถเติมเงินได ้  */
        
die('ERROR|ANY_REASONS');
    }
?>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<body>

</body>
</html>



มันขึ้น error ว่า

Parse error: syntax error, unexpected T_STRING in /home/vdogirl/domains/xxxxxx.com/public_html/vdo/tmrequest.php on line 19

หาเท่าไหร่ก็ไม่เจอครับ ว่าผิด syntax ตรงไหน

รบกวนผู้รู้ช่วยดูทีครับ
:wanwan017:
เหนื่อย..

9wong

ผมใช้ tmtopup.com ครับ ง่ายกว่า tmpay.net ทั้ง 2 เจ้าเป็นเจ้าเดียวกัน

ลองลบ [url ][/url]  ออกสิครับ
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');

system-4x

หน้า tmrequest.php

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_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');

ลองเปลี่ยนตรง mywebsite เป็น ชื่อ domain ท่านสิครับ

ถ้าไม่ได้ก็ลองงมๆดู code เอานะครับ ผมก็มั่ว  :wanwan012:
[direct=http://www.system-4x.com/board]Naruto One Piece Bleach ใหม่ล่าสุด[/direct][direct=http://www.sakidkao.com]สะกิดข่าว[/direct][direct=http://www.system-4x.com/board/index.php/board,47.0.html]ลงประกาศฟรี[/direct]

MeenyFancy

ผิดที่เครื่องหมาย 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($curlCURLOPT_TIMEOUT10);
curl_setopt($curlCURLOPT_HEADERFALSE);
curl_setopt($curlCURLOPT_RETURNTRANSFERtrue);
curl_setopt($curlCURLOPT_SSL_VERIFYPEERfalse);
curl_setopt($curlCURLOPT_FOLLOWLOCATIONtrue);
$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;
}
}
?>

Have a good trip.
[direct=http://petdeecare.com]สุนัขป่วย[/direct] [direct=http://petdeecare.com]แมวป่วย[/direct]
[direct=http://petdeecare.com]หนูป่วย[/direct] [direct=http://petdeecare.com]อาหารแมว[/direct] [direct=http://petdeecare.com]อาหารหมา[/direct]

top18753


 
ปิดรับบริการ ชั่วคราว อย่างไม่มีกำหนดนะครับ

$100perday

เหนื่อย..

NooNaamz

อ้างถึงจาก: MeenyFancy ใน 23 กันยายน 2012, 11:09:29
ผิดที่เครื่องหมาย 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($curlCURLOPT_TIMEOUT10);
curl_setopt($curlCURLOPT_HEADERFALSE);
curl_setopt($curlCURLOPT_RETURNTRANSFERtrue);
curl_setopt($curlCURLOPT_SSL_VERIFYPEERfalse);
curl_setopt($curlCURLOPT_FOLLOWLOCATIONtrue);
$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;
}
}
?>


ยอดฝีมือจริงๆ คร่ะ