473,225 Members | 1,401 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,225 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 3900
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...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

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.