NubcakeJR Posted October 25, 2009 Share Posted October 25, 2009 Hey all (sorry I know I'm a leecher, but I soon won't be. This is my first PHP project, but not my last ). I need help with a little problem I am having. I am using cURL to navigate through some pages to validate a login and download some sources there. What I need to do is search through the tags of these sources to parse data within them. For instance <table width="195" border="0" align="left" cellpadding="0" cellspacing="0" class="data_table"> I need to get that element so that I can get the values inside of the table. The problem lies in the fact that i am using cURL to do this. since it is not in my document, I cannot say document.getElementByTagName('table'); or whatever. I need to make document from the source that I get from the cURL. here is my current code - //This is all code which reads the file of the website and puts the information in $data //I am positive it works because when I echo $data, the information loads (in encoded form) $data = curl_exec ($ch); echo $data; $params = $data->getElementsByTagName('data_table'); Apparently I cannot use $data and then get the elements. Does anyone have any ideas? Link to comment https://forums.phpfreaks.com/topic/178973-retrieving-innerhtml-with-curl/ Share on other sites More sharing options...
Mchl Posted October 25, 2009 Share Posted October 25, 2009 JavaScript will be of no use here Perhaps try using DOM Link to comment https://forums.phpfreaks.com/topic/178973-retrieving-innerhtml-with-curl/#findComment-944258 Share on other sites More sharing options...
NubcakeJR Posted October 25, 2009 Author Share Posted October 25, 2009 alright, yeah that's how I did it (before you responded ), but now I have another problem. I don't know how to cycle through the rows of the tables looking for information. Any help on that? Link to comment https://forums.phpfreaks.com/topic/178973-retrieving-innerhtml-with-curl/#findComment-944266 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.