![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help. |
|
Thread Tools |
![]() |
#1 |
Registered User
Join Date: Feb 2006
Posts: 38
|
cURL RSS Parsers
Anybody have any knowledge of RSS Parsers using cURL. My webhost doesn't allow the allow_url_fopen option in the php config.
I am looking at using rss-feeds with a few affiliates. thanks!
__________________
arakele [at] gmail [dot] com 224739233 [at] ICQ |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#2 |
Too lazy to set a custom title
Industry Role:
Join Date: Oct 2002
Location: Montreal, Quebec
Posts: 29,676
|
hummmm.... weird.. curl is used in so many instances.
we allow " allow_url_fopen" on our boxes.
__________________
I know that Asspimple is stoopid ... As he says, it is a FACT ! But I can't figure out how he can breathe or type , at the same time .... |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Dec 2007
Location: Chatsworth, CA
Posts: 1,964
|
There are so many ways to parse a site. Take a look at a PHP library called Snoopy. It implements the HTTP protocol in PHP so you simulate a browser request.
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jan 2006
Location: Canuck land!
Posts: 921
|
Code:
function getContent($url) { $ch = curl_init ($url); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 5); $result = curl_exec($ch); curl_close ($ch); return $result; } from there you can either load it under SimpleXML or parse it manually (which could be painful) Need more help or need something done? Feel free to contact me at xenilk(at)gmail.com
__________________
40$/Page PSD->XHTML/CSS Transformations |
![]() |
![]() ![]() ![]() ![]() |