I know similar questions have already been asked, however, I have tried the solutions without any success. I keep getting this error:
Fatal error: Call to a member function asXML() on a non-object in ... on line 188
Here is my code:
$dom->save("productInfo.xml");
$feedHandle = file_get_contents("productInfo.xml");
$params = array(
'AWSAccessKeyId'=> "*****",
'Action'=>"SubmitFeed",
'SellerId'=> "********",
'SignatureMethod' => "HmacSHA256",
'SignatureVersion'=> "2",
'Timestamp'=> gmdate("Y-m-d\TH:i:s.\\0\\0\\0\\Z", time()),
'Version' => "2009-01-01",
'FeedContent' => $feedHandle,//must be a string
'FeedType' => "_POST_PRODUCT_DATA_");
// Sort the URL parameters
$url_parts = array();
foreach(array_keys($params) as $key)
$url_parts[] = $key . "=" . str_replace('%7E', '~', rawurlencode($params[$key]));
sort($url_parts);
// Construct the string to sign
$url_string = implode("&", $url_parts);
$string_to_sign = "GET\nmws.amazonservices.com\n/Feeds/2009-01-01\n" . $url_string;
// Sign the request
$signature = hash_hmac("sha256", $string_to_sign, "******", TRUE);
// Base64 encode the signature and make it URL safe
$signature = urlencode(base64_encode($signature));
$url = "http://ift.tt/14wpXhs" . '?' . $url_string . "&Signature=" . $signature;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$response = curl_exec($ch);
$parsed_xml = simplexml_load_string($response);
@fclose($feedHandle);
Header('Content-type: text/xml');
print($parsed_xml->asXML());
I know that $parsed_xml === FALSE so I know the processing of the XML is not working. I suspect it has something to do with $feedHandle as I was previously receiving an error that said FeedContent in the array $params was empty. I know the xml is formatted correctly as I have printed it out and also directly put it in the required field and it worked fine. Also we used curl-ing in a similar file and it was working fine so I do not think that would be the issue either.
ReplyDeletesabung ayam
adu ayam
ngadu ayam
laga ayam
permainan adu ayam
ayam petarung
ayam sabung
ngadu ayam jago
adu ayam online
taruhan ayam
sabung ayam terbaik
judi online ayam
ayam sabung online
judi adu ayam
situs sabung online
judi sabung online
permainan laga ayam
sabung online
sbobet
agen sbo
agen sbobet
agen sbobet terbaik
agen sbobet terpercaya
sbobet asia
ibcbet
agen ibcbet
agen ibcbet terbaik
agen ibcbet terpercaya
ibcbet online
sbobet online
Agen togel
judi togel
bandar togel online
bandar togel
togel singapura
togel online
bandar judi togel
agen togel online
judi togel online
togel sydney
togel hongkong
Agen togel
judi togel
bandar togel
bandar togel online
togel singapura
togel online
bandar judi togel
agen togel online
judi togel online
togel sydney
togel hongkong
agen poker
agen poker terbaik
agen poker terpercaya
poker uang asli
situs poker
poker online
I have read many blogs live casino malaysia free credit in the net but have never come across such a well written blog. Good work keep it up
ReplyDeleteYou got a really useful blog I have been here reading for about half an hour. I am a newbie and your post is valuable for me.
ReplyDeletescr888 apk
scr888 casino
scr888 kiosk
scr888 agent
scr888 bonus
scr888 hack
scr888 download
scr888 / 918kiss
scr888 download 2019
scr888 kiss