Unstoppable Domains

Help URL file-access is disabled...

Spaceship Spaceship
Watch

dsforsaken

Account Closed
Impact
11
Hi I am trying to run this script on dreamhost but it always says that url file-acess is disabled... Can somebody look a the script to see if there is another way to get it to work?
Errors that show up below:

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/.desmi/dsforsaken/videosite/admin/import.php on line 23

Warning: file_get_contents(http://www.fastfreemedia.com/export_full.php) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/.desmi/dsforsaken/videosite/admin/import.php on line 23

Warning: Invalid argument supplied for foreach() in /home/.desmi/dsforsaken/videosite/admin/import.php on line 30


This is the script below (.php):
http://shopquickly.com/import.txt

The script mentions this in it, although im pretty sure its not the problem, but if ytou ant to look:
http://shopquickly.com/xml_php5.txt
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
.US domains.US domains
Do you know if you are allowed to use CURL or sockets?
 
0
•••
I am allowed to use curl but i dont know how to fix this script to use thim... if someone knows how that would be awsome...
 
0
•••
class.curl.php
PHP:
<?php

class CURL {

	var $ch;
	
	function CURL () {
		$this->ch = curl_init();
		curl_setopt($this->ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
		curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1);
		curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($this->ch, CURLOPT_COOKIEJAR, 'cookie.txt');
		curl_setopt($this->ch, CURLOPT_COOKIEFILE, 'cookie.txt');
	}

	function request($method, $url, $vars) {
		curl_setopt($this->ch, CURLOPT_URL, $url);
		if ($method == 'POST') {
			curl_setopt($this->ch, CURLOPT_POST, 1);
			curl_setopt($this->ch, CURLOPT_POSTFIELDS, $vars);
		}
		$data = curl_exec($this->ch);
		if ($data) {
			return $data;
		} else {
			return curl_error($this->ch);
		}
	}

	function get($url) {
		return $this->request('GET', $url, 'NULL');
	}

}

$curl = &new CURL();

?>
Include that file into your current script (ex: include('class.curl.php');).

Change
$xmlParser = new XMLParser(file_get_contents($url));
to
$xmlParser = new XMLParser($curl->get($url));
 
0
•••
excellent thanks alot man so far it sorta working now, some stuff it gets just fine while other stuff gives this error:




Game Name: Stage Dancing
New Movie.

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/.desmi/dsforsaken/videosite/admin/import.php on line 54

Warning: file_get_contents(http://www.fastfreemedia.com/images/179575.jpg) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/.desmi/dsforsaken/videosite/admin/import.php on line 54

Error Reading Thumbnail.
Error writing thumbnail.Thumbnail Bytes Written: 0
Affected MySQL Rows: 1
 
0
•••
You have to change all of your file_get_contents to $curl->get
 
0
•••
what do i change all the fopen, fclose and fwrite to?
 
0
•••
It doesn't seem like you are getting an error for those. I'm really unsure of how else you could write to a file, but if it is on your own host it shouldn't be a problem.
 
0
•••
im not getting an error for those it just doesnt show the image files for the games because its either not writeing to the sql or ts not getting hte images properly, im using dreamhost and they dont allow fopen, and file_get_contents etc... btw
 
0
•••
By writing to SQL, do you mean doing mysql_query? You don't use fwrite for SQL.
To get images, you just need to do <img src="">.. there's no PHP.

It's not displaying any errors, so I don't know what to tell you.
 
0
•••
Unstoppable Domains
Domain Recover
DomainEasy โ€” Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back