Retrieving innerHTML with cURL?
Posted on
16th Feb 2014 07:03 pm by
admin
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
Code: [Select]<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
Code: [Select]document.getElementByTagName('table');
or whatever. I need to make document from the source that I get from the cURL. here is my current code -
Code: [Select] //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?
No comments posted yet
Your Answer:
Login to answer
77
54
Other forums
Output Full URL of Current Page
Let's say I am currently viewing a dynamic page:
http://www.mydomain.com/directory/index.php
Please help with SMTP Authenticated PHP Email Form
Hello, I'm creating a PHP email form, and for this particular server, I have to use SMTP Authenticat
Adding post count
How would I make it so everytime someone clicks submit on my form, their row in the database for the
I apologise! It's a newbie to PHP feedback form problem!
Hi,
I am a total newbie to PHP. I am also a unemployed and need to get a job. So after 100% r
Tree Menu
Hi guys,
Can anyone help me making a tree navigation system? I have a site where I'm allowin
timezone change with date()
so i put all my times for posts in my made from scratch forum(not phpbb3 or sm)
in my mysql db u
A Few Questions
Hi, I want to ask a few questions that I can't seem to find..
1) I'm creating a "shortcu
Help with Hyperlink
Hi,
What I am trying to do may be simple, I just can't get it to work. Ok...
I am usin
get multiple rows
Hi I want to get multiple rows from a db
I am using this for the db query
Code: public
Socket problem
Hello,
Earlier I posted about my problem with my socket script. It took up to 100% CPU usage.