Get Element By id or Name in Curl

waiqueetert

New Member
My target site contains code like this\[code\]<form><input type="text" name="suggest" value="http://stackoverflow.com/questions/10548664/www.google.com"><input type="submit" value="http://stackoverflow.com/questions/10548664/submit"></form>\[/code\]I Get this page with Curl Php\[code\]<?php$url="http://mysite.com"; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); $result = curl_exec ($ch); echo $result; curl_close($ch);?>\[/code\]How can I get an element value using id or name? For example "www.google.com" in input name="suggest". Thanks for helping me.I cant use this code for remote like this :\[code\]<?phprequire 'Path/QueryPath.php';qp('http://hipfile.com/bbgfom5ej9tm/zakhme_shaneie_haava_dvdrip.wmv.html/')-\[/code\]\[quote\] find('[password="login"]')->writeHTML(); ?>\[/quote\]and return this error\[quote\] Fatal error: Uncaught exception 'QueryPathParseException' with message 'DOMDocument::load() [domdocument.load]: AttValue: " or ' expected in http://hipfile.com/bbgfom5ej9tm/zakhme_shaneie_haava_dvdrip.wmv.html/, line: 18 (C:\xampplite\htdocs\test1\Path\QueryPath.php: 2106)' in C:\xampplite\htdocs\test1\Path\QueryPath.php:2346 Stack trace: #0 [internal function]: QueryPathParseException::initializeFromError(2, 'DOMDocument::lo...', 'C:\xampplite\ht...', 2106, Array) #1 C:\xampplite\htdocs\test1\Path\QueryPath.php(2106): DOMDocument->load('http://hipfile....', 0) #2 C:\xampplite\htdocs\test1\Path\QueryPath.php(179): QueryPath->parseXMLFile('http://hipfile....', NULL, NULL) #3 C:\xampplite\htdocs\test1\Path\QueryPath.php(23): QueryPath->__construct('http://hipfile....', NULL, Array) #4 C:\xampplite\htdocs\test1\index.php(3): qp('http://hipfile....') #5 {main} thrown in C:\xampplite\htdocs\test1\Path\QueryPath.php on line 2346\[/quote\]Can help me? I used two DOM And simplehtmldom but not working for me . it works for local page only.
 
Back
Top