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
Did you know?Explore Trending and Topic pages for more stories like this.
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
Converting from one format to another
"I have got a date in DD/MM/YYYY but I need it in MM-DD-YYYY. Help!"
dynamic table with forms
I have a table that is populated with mysql data and in teh first column there is a raido button tha
Need help making a blockquote and line items conditional
I have some code I bought a few years ago that allows my clients to update content on their site usi
Php WordPress help
I am writing the following code for making a plugin
<?php
header("Content-Type
login to other site by sending post variables
hey,
here is my problem: my school gave me a mail account for school-stuff use. they mail us
ScriptResource.axd gives an error on fresh install of ASP.NET Ajax 1.0
Hello,I have a fresh install of Microsoft ASP.NET Ajax 1.0. When I create an Ajax enabled website in
browse folder only
hi,
is there a way i can browse or get the directory or folder only and not the file?
i just w
How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor
TimeZoneOffset
Hello,
Please i need your help. I have a system that users can use to punch in and out. This
Any decent php formatter/beautifier/pretty printer?
Any decent php formatter/beautifier/pretty printer class/function?
I found the following whil