Has anyone used php sdk. I can't seem to run through this sdk. I don't know if it's my problem or php sdk has a problem. Has bothered me for a long time.
If i use 9810c as titleID, will get an error:cUrl Error: Could not resolve host: 9810c
Has anyone used php sdk. I can't seem to run through this sdk. I don't know if it's my problem or php sdk has a problem. Has bothered me for a long time.
If i use 9810c as titleID, will get an error:cUrl Error: Could not resolve host: 9810c
I haven't fully tested it but for login related PlayFab API. The property TitleId is required in the request. Please add it to the request body and give it another try. Feel free to tell us if there are still any other issues.
Also, I believe the TitleId field (the first field) should be filled with an ID instead of an endpoint.
Here is full fix reported by the team. Please fix the following code:
public static function GetFullUrl($titleId, $apiPath, $getParams) { if (!isset($titleId) && isset(PlayFabSettings::$titleId)) $titleId = PlayFabSettings::$titleId; $output = ""; if (!(substr(self::$productionEnvironmentUrl, 0, 4) === "http")) { if (isset(self::$verticalName)) { $output = "https://" . self::$verticalName; } else { $output = "https://" . $titleId; } } $output .= self::$productionEnvironmentUrl; $output .= $apiPath;
I have added a reply but it seems to be deleted somehow.
We are trying to reproduce your issue and here is something we have done. Please check the PlayFabHttp.php file in PlayFab SDK folder:
Around line 20:
if (!(substr($productionEnvironmentUrl, 0, 4) === "http"))
Replace it with:
if (!(substr(self::$productionEnvironmentUrl, 0, 4) === "http"))
Another place that refers $productionEnvironmentUrl is around line 32:
$output .= $productionEnvironmentUrl;
Replace it with:
$output .= self::$productionEnvironmentUrl;
Also, please keep the TitleID field filled with ID only, like "9810C", because I have noticed that SDK will concatenate it with other strings to be an endpoint URL. In addition, there is no need to add a "TitleId" property in the request since the SDK will check and add it automatically.
To be honest, I am not expert on php, there is a place that I don't fully understand, which is located at login related function in PlayFabClientApi.php. for example, in line 1090, function LoginWithCustomID:
if (!isset($request->$titleId)) !$request->titleId = $titleId;
I believe what it wants to do is to add TitleID property if the request doesn't contain one. If there is no other issues can be found, you may try to modify this line.
Moreover, Could you please output the $fullUrl in function MakeCurlApiCall of PlayFabHttp class, which is also located in PlayFabHttp.php?
3 People are following this question.