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
Help, Base64 encoding url and decoding server side.
Hello everyone, i have a website with videos and games and also provide an embed code which people c
help me, how to find text on an external html site using PHP
Would anyone know how to search an external html file for a work or phrase ?
I was thinking s
listing help
Hi,
at first, great new design!!! I like it,
i got a problem,
I want to list so
trouble printing an array....
I'm having some trouble printing out an array forwards. I'm figuring out the high and low of an arra
Pls help with PHP
Pls can anyone direct me on how to create a user account for a customer. For example i want know if
Need help with some php code :)
Hey! I'm quite new to this whole thing, so please don't fire me with shait on this one =D
I'm
order by date not ID number help php
I am trying to orginize the following code to order by date not id number.
any help would be grea
Problem with PHP/mySQL login code
Hello,
There is an error in my login script and I can't figure out what it is...
I believe
Date Question
I'm using the TIMESTAMP() function within mysql to set the date/time for certain events. However, ho
Run function every 5 mins ??
I have a function PostMessage()
How can I run it every 5 mins ??