473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

parsing RSS feeds where allow_url_fopen=OFF on php 4.4.4??

I need to get, parse and display RSS feeds while having the ini setting,
allow_url_fopen = Off.

I used to use (in version 4.1) domxml_open_mem() but it's not longer
available in this verison for some reason - and cannot install pecl
extensions.

Any ideas? Any example scripts?

Thanks!!
Nov 18 '06 #1
5 3902
Paul wrote:
I need to get, parse and display RSS feeds while having the ini setting,
allow_url_fopen = Off.

I used to use (in version 4.1) domxml_open_mem() but it's not longer
available in this verison for some reason - and cannot install pecl
extensions.

Any ideas? Any example scripts?

Offload the URL retrieval from the server to the client?

The client would get the RSS XML via JavaScript, and
then it would pass it to your server as a file
upload, cookie, or form variable.
Nov 18 '06 #2
Paul wrote:
I need to get, parse and display RSS feeds while having the ini setting,
allow_url_fopen = Off.

I used to use (in version 4.1) domxml_open_mem() but it's not longer
available in this verison for some reason - and cannot install pecl
extensions.

Any ideas? Any example scripts?

Thanks!!

There are at least two ways to make an http connection in PHP without allow_url_fopen being enabled
(I've tried both of these; the second one seems to be slightly faster).
1. The cURL library: http://www.php.net/cURL
If your host has it installed. For example, Dreamhost has allow_url_fopen disabled and offers cURL
as a replacement.

2. The open-source Drupal CMS contains a very powerful HTTP function that has no other dependencies
within the Drupal code - meaning you can easily copy and re-use it elsewhere. You can see the
function here: http://api.drupal.org/api/HEAD/funct...l_http_request . This function uses
fsockopen().

--
Christoph Burschka
Nov 18 '06 #3
"Christoph Burschka" <ch****************@rwth-aachen.dewrote in message
news:4s************@mid.dfncis.de...
Paul wrote:
>I need to get, parse and display RSS feeds while having the ini setting,
allow_url_fopen = Off.

I used to use (in version 4.1) domxml_open_mem() but it's not longer
available in this verison for some reason - and cannot install pecl
extensions.

Any ideas? Any example scripts?

Thanks!!


There are at least two ways to make an http connection in PHP without
allow_url_fopen being enabled
(I've tried both of these; the second one seems to be slightly faster).
1. The cURL library: http://www.php.net/cURL
If your host has it installed. For example, Dreamhost has allow_url_fopen
disabled and offers cURL
as a replacement.

2. The open-source Drupal CMS contains a very powerful HTTP function that
has no other dependencies
within the Drupal code - meaning you can easily copy and re-use it
elsewhere. You can see the
function here: http://api.drupal.org/api/HEAD/funct...l_http_request
. This function uses
fsockopen().

--
Christoph Burschka
OK _ I got a handle to the file using cURL. However, for some reason,
domxml_open_file() is not working. I have verified the curl gets and and
display the xml file properly. I just need to rpocess it and format it the
way I want without the domxml_open_file().

Any ideas?
Nov 19 '06 #4
Paul schrieb:
"Christoph Burschka" <ch****************@rwth-aachen.dewrote in message
news:4s************@mid.dfncis.de...
>>Paul wrote:
>>>I need to get, parse and display RSS feeds while having the ini setting,
allow_url_fopen = Off.

I used to use (in version 4.1) domxml_open_mem() but it's not longer
available in this verison for some reason - and cannot install pecl
extensions.

Any ideas? Any example scripts?

Thanks!!


There are at least two ways to make an http connection in PHP without
allow_url_fopen being enabled
(I've tried both of these; the second one seems to be slightly faster).
1. The cURL library: http://www.php.net/cURL
If your host has it installed. For example, Dreamhost has allow_url_fopen
disabled and offers cURL
as a replacement.

2. The open-source Drupal CMS contains a very powerful HTTP function that
has no other dependencies
within the Drupal code - meaning you can easily copy and re-use it
elsewhere. You can see the
function here: http://api.drupal.org/api/HEAD/funct...l_http_request
. This function uses
fsockopen().

--
Christoph Burschka


OK _ I got a handle to the file using cURL. However, for some reason,
domxml_open_file() is not working. I have verified the curl gets and and
display the xml file properly. I just need to rpocess it and format it the
way I want without the domxml_open_file().

Any ideas?

Instead of domxml_open_file(), use domxml_open_mem().

http://de3.php.net/manual/en/functio...l-open-mem.php

That function will parse the XML it receives directly, instead of
loading it from a file. Since you have the file's contents from cURL,
just pass them to domxml_open_mem.

---
CB
Nov 21 '06 #5
"Christoph Burschka" <ch****************@rwth-aachen.dewrote in message
news:4s************@mid.dfncis.de...
Paul schrieb:
>"Christoph Burschka" <ch****************@rwth-aachen.dewrote in message
news:4s************@mid.dfncis.de...
>>>Paul wrote:

I need to get, parse and display RSS feeds while having the ini setting,
allow_url_fopen = Off.

I used to use (in version 4.1) domxml_open_mem() but it's not longer
available in this verison for some reason - and cannot install pecl
extensions.

Any ideas? Any example scripts?

Thanks!!

There are at least two ways to make an http connection in PHP without
allow_url_fopen being enabled
(I've tried both of these; the second one seems to be slightly faster).
1. The cURL library: http://www.php.net/cURL
If your host has it installed. For example, Dreamhost has allow_url_fopen
disabled and offers cURL
as a replacement.

2. The open-source Drupal CMS contains a very powerful HTTP function that
has no other dependencies
within the Drupal code - meaning you can easily copy and re-use it
elsewhere. You can see the
function here:
http://api.drupal.org/api/HEAD/funct...l_http_request . This
function uses
fsockopen().

--
Christoph Burschka


OK _ I got a handle to the file using cURL. However, for some reason,
domxml_open_file() is not working. I have verified the curl gets and and
display the xml file properly. I just need to rpocess it and format it
the way I want without the domxml_open_file().

Any ideas?
Instead of domxml_open_file(), use domxml_open_mem().

http://de3.php.net/manual/en/functio...l-open-mem.php

That function will parse the XML it receives directly, instead of loading
it from a file. Since you have the file's contents from cURL, just pass
them to domxml_open_mem.

---
CB
thanks - I'll give it a try.
Nov 21 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: diablo | last post by:
Hello , I have a file that contains the following data (example) and does NOT have any line feeds: 11 22 33 44 55 66 77 88 99 00 aa bb cc dd ....to 128th...
5
by: Tamir Khason | last post by:
http://khason.biz/blog/2004/12/why-microsoft-can-blow-off-with-c.html -- Tamir Khason You want dot.NET? Just ask: "Please, www.dotnet.us "
4
by: Gérard Talbot | last post by:
Hello fellow stylers, What would be the best CSS equivalent of MSIE's wrap="off" and wrap="hard"? hard Text is displayed with wordwrapping and submitted with soft returns and line feeds. ...
9
by: ankitdesai | last post by:
I would like to parse a couple of tables within an individual player's SHTML page. For example, I would like to get the "Actual Pitching Statistics" and the "Translated Pitching Statistics"...
6
by: giulianodammando | last post by:
In the development of a simple numerical simulation software i need to read some initialization parameters from a file that looks like: # Global Setup species = 1; \begin{specie}<1>...
1
by: JackM | last post by:
I have a recent server issue that I need some guidance on. Someone hacked into one of my domains through a flaw in an older version of a script called Reviewpost Pro. Knocked the server offline for...
1
by: beaker | last post by:
Access Database-driven ASP page with embedded RSS feeds Hi, I know very little about web development in general - just some basic html scripting, CSS and a bit of XML. I've inherited a public...
1
by: ojsimon | last post by:
Hi I Am using Simplepie to display some rss feeds, currently it displays them in date and time order but i want it to display them in relevance order by using a usort function. here is the code...
4
by: Hillbilly | last post by:
Is Microsoft gradually killing off the newsgroups? There's been no --specific targeting-- for releases such as one would expect i.e. microsoft.public.aspnet.2 and so on and now nothing for WPF or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.