这是代码的 2 部分(第 108 行是 NoBlankFunctions.php 的最后一行): 似乎 2me 一切都很好。它是一个带有 newReposnderOAuth 的 $responder 声明(可以假设这个类工作得很好,因为它被该公司的许多其他客户使用)。在某些时候,代码会调用 addNewUser,它是 NoBlankFunctions 的一部分。在这个函数内部有一个对响应者的调用,这是同一个 php 文件中的另一个函数。最后它在尝试发送http请求时崩溃。
include 'OAuth.php';
include 'responder_sdk.php';
include 'NoBlankFunctions.php';
$client_key = '28FB957EA00B920BE7F83A365CC7ABAF';
$client_secret = '0B06B5A69DB0F3BCB80A716031C2DE6C';
$user_key = '1F566B1DE821BE68B5F485F75610F610';
$user_secret = '5D1406DACCA6B862AD4AE361823BB108';
$responder = new ResponderOAuth($client_key, $client_secret, $user_key, $user_secret);
.
.
.
addNewUser($registerFirstName, $registerLastName, $registerUserName,
$registerPass, $registerEmail, $registerGender,
$registerAge, $registerCountry, "Heb", $registerUserGMT);
noBlankFunctions.php
function addNewUser($registerFirstName, $registerLastName, $registerUserName,
$registerPass, $registerEmail, $registerGender,
$registerAge, $registerCountry, $registerLang, $registerUserGMT)
{
global $db;
$sql = "INSERT INTO `".$db."`.`users` (`userEmail`, `nickName`, `password`, `firstName`, `lastName`, `State`, `userGMT`, `language`, `gender`, `age`, `currentDay`, `dateForCurrentDay`, `isUserCheck`, `isUserDone`, `isUserPayed`)
VALUES ('".$registerEmail."', '".$registerUserName."', '".$registerPass."', '".$registerFirstName."', '".$registerLastName."', '".$registerCountry."', '".$registerUserGMT."', '".$registerLang."', '".$registerGender."', '".$registerAge."', '0', '".date("Y/m/d")."', '0', '0', '0');";
$result = mysql_query($sql);
if ($registerLang == 'En')
{
$listNum = 37742;
}
elseif($registerGender == 'Male')
{
$listNum = 37713;
}
else
{
$listNum = 37741;
}
responder($registerEmail, $registerFirstName, $listNum);
}
function responder($userMail, $userFirstName, $listNum)
{
$post_data = array(
'subscribers' => json_encode(
array(
array(
'EMAIL' => $userMail,
'NAME' => $userFirstName
)
)
)
);
$response = $responder->http_request('lists/'.$listNum.'/subscribers', 'post', $post_data);
}
有任何想法吗?