NameSilo

[Resolved] PHP help

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

buyer123

Established Member
Impact
0
PHP help

i have a little problem with a script that i have..

$this->dom = new domDocument ;
@$this->dom->loadHTML($this->data);
foreach ($this->dom->getElementsByTagName('body') as $node) {
$this->parseNode($node, $exclude);
$object = $this->dom->createElement('div');
ob_start();
include 'php/includes/urlForm.inc.php';
$content = ob_get_clean();
$object->nodeValue = '{URL_FORM}';
$references = $node->getElementsByTagName('*');
$i = 0;
foreach ($references as $reference) {
if (!$i) {
$node->insertBefore($object, $reference);
}
$i++;
}
}

I have this code...

when i try to execute it i get this line:


Warning: domdocument() expects at least 1 parameter, 0 given in /home/...........php on line 107

can anyone help me? thanks
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Last edited:
0
Close
so how should it look like?

sorry for these questions but i'm new in php programming and i'm learning :)

thanks
 
0
Close
there is an example on the php.net page

$this->dom = new domDocument ;

should be something like:-

$this->dom = new domDocument('1.0') ;

change 1.0 to the version of xml you are using.
 
0
Close
i put it like you said and i have the following error right now

Warning: domdocument() [function.domdocument]: Start tag expected, '<' not found in /home/..................php on line 107
 
0
Close
would need to see the proper code. Also the xml you are loading is it valid xml?
 
0
Close
sent you a pm
 
0
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back