Reputation: 5986
these lines of code work fine on my localhost, but not on my VPS hosting:
$url = "http://gdata.youtube.com/feeds/api/videos/".$videoID;
$doc = new DOMDocument;
$doc->load($url);
$title = $doc->getElementsByTagName("title")->item(0)->nodeValue;
$description = $doc->getElementsByTagName("description")->item(0)->nodeValue;
I can't figure out why they would work on localhost and not my vps which is set up like the exact same as localhost.
Upvotes: 0
Views: 209
Reputation: 522042
DOM is explicitly disabled there: --disable-dom
.
Either contact your host and ask them to enable DOM (unlikely), use a different host or rewrite your code using another DOM/XML library.
Upvotes: 2