Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2006-10-03, 08:59 AM   #2
kitty_kate
Well you know boys, a nuclear reactor is a lot like women. You just have to read the manual and press the right button
 
kitty_kate's Avatar
 
Join Date: Jun 2006
Location: The Colloseum
Posts: 155
Send a message via ICQ to kitty_kate
In your script, I see at the line number 36 this:
PHP Code:
$xml_content file_get_contents$xml_source 
Here is where you have to make the change.

Add this function to your script, at the beggining of it, right after the <?php tag line:

PHP Code:
/**
  * Retrieves the url
  *
  * @param string $url
  * @param string $uagent
  * @return string
  */
 
function retrieveUrl($url) {
     
// create a new CURL resource
     
$ch curl_init();
     
// set URL and other appropriate options
     
curl_setopt($chCURLOPT_URL$url);
     
curl_setopt($chCURLOPT_HEADERtrue);
     
curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
     
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
     
// grab URL and pass it to the browser
     
$result curl_exec($ch);
     
// close CURL resource, and free up system resources
     
curl_close($ch);     
     return 
$result;
 } 
Then change your code at the 36th line into:
PHP Code:
$xml_content retrieveUrl$xml_source 
I didn't tested it 'cause I'm on the run, but it should work.
__________________
My Asian Kitty - My Free Sites
kitty_kate is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:42 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc