
December 5th, 2005
09:50 AM
Neverside Newbie
Status: Offline!
file_get_contents help
I have written a script that grabs an xml file from another server every 2 hours and writes specific data from the xml file to a text file, and it works perfect locally. Now that I have uploaded the file to the server its going to be running on, the script can't get access the xml file. I am using file_get_contents to get the xml file data, is there a way to force the server to grab the xml file?

December 5th, 2005
01:13 PM
Neversidian
Status: Offline!
why isnt it getting the file?
___________________
Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

December 5th, 2005
04:54 PM
Pandoras Box, Inc.
Status: Offline!
Originally posted by BigToach:
why isnt it getting the file?
If he knew, he would fix it, but it looks like he doesnt, maybe he needs to elaborate a bit more.
___________________
Pandoras Box, Inc.
http://localhost/pandorasbox/
go figure.

December 5th, 2005
08:08 PM
Web Developer & Geek
Status: Offline!
Some hosts (such as Dreamhost who I'm with) block certain functions that could be use maliciously e.g. exec(), glob() and, you guessed it, file_get_contents(). It could also be an error in your code, but if it is becuase you're blocked, try using cURL or similar.
___________________


December 5th, 2005
08:37 PM
Neversidian
Status: Offline!
is the dir chmodded correctly>?
___________________
-Developer
-Forum Leader
-NeverNET

December 6th, 2005
12:28 AM
Neverside Newbie
Status: Offline!
Originally posted by Dachande663:
Some hosts (such as Dreamhost who I'm with) block certain functions that could be use maliciously e.g. exec(), glob() and, you guessed it, file_get_contents(). It could also be an error in your code, but if it is becuase you're blocked, try using cURL or similar.
I believe this is the case. I have talked to the person I am writing the scripts for, and asked him to contact the host and see if the function is blocked. I will also look into using cUrl and see if this can help solve the issue.
Originally posted by aonic:
is the dir chmodded correctly>?
I have tried the script on another server, I uploaded the directory for all the files as is and didn't chmod anything and it worked perfectly, so I don't think that it has anything to do with how the directory is chmodded