Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

86 users online



file_get_contents help

file_get_contents help

Currently viewing this thread: 1 (0 members and 1 guests)


alanr2193

alanr2193

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?

BigToach

BigToach

Neversidian
Status: Offline!

why isnt it getting the file?

___________________

Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

Pandora

Pandora

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/ Wink go figure.

Dachande663

Dachande663

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.

___________________

http://www.hybridlogic.co.uk/sig.jpg
http://www.hybridlogic.co.uk/winamp.jpg

aonic

aonic

Neversidian
Status: Offline!

is the dir chmodded correctly>?

___________________

-Developer
-Forum Leader
-NeverNET

alanr2193

alanr2193

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

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0076 seconds.