DrupalBin
Submit Code
About
Recent Posts
Drupal 5 menu
1 hour 14 min
ago
Views 2 get all field names
1 hour 56 min
ago
Code
2 hours 34 min
ago
How do i make this work in D6 (I have to clear the cache everytime to see the tabs)
5 hours 25 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
xml
getDOM
July 29, 2008 - 6:56pm —
Rob Loach
function
getDOM
(
$url
)
{
$ch
= curl_init
(
)
;
curl_setopt
(
$ch
, CURLOPT_RETURNTRANSFER,
1
)
;
curl_setopt
(
$ch
, CURLOPT_URL,
$url
)
;
curl_setopt
(
$ch
, CURLOPT_TIMEOUT,
10
)
;
DOM
SimpleXML
xml
Read more
scrape it up
July 16, 2008 - 7:26pm — Anonymous
$xml
= simple_get_xml
(
'http://www.cotrip.org/atis/web.TraveltimeMarshal'
)
;
$table
=
$xml
->
xpath
(
'/html/body/table[3]'
)
;
foreach
(
$table
[
0
]
->
tr
as
$item
)
{
if
(
count
(
$item
)
==
1
)
{
scraper
SimpleXML
xml
Read more