0
I am studying php and I was looking at the Curl function and wanted to know if it is possible to take the content only of a certain ID of another page
example:
<div id="teste2">
n pegar esse aqui
</div>
<div id="teste">
Pegar somente o conteúdo que esta aqui dentro
</div>
You can treat the return of Curl with the Domdocument class
– Woss
It is not possible to use Curl to get only a certain part of the HTML code, which you can use Curl to get all HTML content and then parse the data you want.
– anderson
@Anderson n understood what that would be like?
– Cyber Hacker
what language you are using shellscript?
– anderson
@Anderson, I’m using php
– Cyber Hacker
Then you better use Domdocument as @Andersoncarloswoss mentioned a look here: http://php.net/manual/en/domdocument.getelementbyid.php
– anderson