Have an account? / Register

Forgot your password?

Forgot your username?

Results 1 to 3 of 3

Thread: URGENT - Warning: file_get_contents() [function.file-get-contents]

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation URGENT - Warning: file_get_contents() [function.file-get-contents]



    Hi,

    I am reciving an error from my PHP file, the error is :

    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /www/zxq.net/x/c/l/xclusivegigs/htdocs/XclusiveGigs.php on line 14

    The php file is:

    PHP Code:
    <?php
         
    //connects to our database
         
    require_once('db_connect.inc');
         
    db_connect();
         
         
    //create instance of XMLReader
         
    $xmlReader = new XMLReader();
         
         
    //define the filename we wish to write to and the url we wish to download from
         
    $filename "Ticketmaster_UK_Events.xml";
         
    $url "http://feeds.perfb.com/index.php/download?OEMAIL=adityakishor@hotmail.com&PX=1c53a6624ce5b96bcd7bf7c7971ffcfa&DISPLAYFORMAT=XMLGZIP&REVERSEMAPXML=yes&PRODUCTDB_ID=306";
         
         
    //this creates the file "feed_download".xml and takes he contents from the URL and stores them into the file
         
    file_put_contents(‘Ticketmaster_UK_Events.xml’file_get_contents('http://feeds.perfb.com/index.php/download?OEMAIL=adityakishor@hotmail.com&PX=1c53a6 624ce5b96bcd7bf7c7971ffcfa&DISPLAYFORMAT=XMLGZIP&R EVERSEMAPXML=yes&PRODUCTDB_ID=306'));
         
    //read in xml file
         
    $xmlReader->open(‘Ticketmaster_UK_Events.xml’);
         
         
    //loop to read in data
         
    while ($xmlReader->read())
               {

                                   switch (
    $xmlReader->name)
                                          {
                                                            
    //this finds the parent node for each instnc of a product
                                                            
    case 'product':
                                                                 
    //this initialises the xml parser
                                                                 
    $dom = new DOMDocument();
                                                                 
    $domNode $xmlReader->expand();
                                                                 
    $element $dom->appendChild($domNode);
                                                                 
    $domString utf8_encode($dom->saveXML($element));
                                                                 
    $product = new SimpleXMLElement($domString);
                                                                 
                                                                 
    //read in data
                                                                 
    $product_code $product->product_code;
                                                                 
    $product_name $product->product_name;
                                                                 
    $leval1 $product->level1;
                                                                 
    $description $product->description;
                                                                 
    $short_deeplink $product->buyat_short_deeplink_url;
                                                                 
    $oldstyle_deeplink $product->old_style_deeplink_url;
                                                                 
    $image_url $product->image_url;
                                                                 
    $currency $product->currency;
                                                                 
    $availability $product->availability;
                                                                 
    $apr_full $product->APR_full;
                                                                 
    $apr $product->APR;
                                                                 
    $balancetransfer_free $product->BT_Free;
                                                                 
    $interest_free_period $product->interest_free_period;
                                                                 
    $credit_limit $product->credit_limit;
                                                                 
    $benefits $product->benefits;
                                                                 
    $company_text $product->company_text;
                                                                 
                                                                 
    //insert query
                                                                 
    if(strlen($product_code) > 0//product_id is chosen because there must be an id for each product
                                                                                          
    {
                                                                                               
    $query mysql_query("REPLACE INTO seatwave
                                                                                                      (product_code, product_name, level1, description, short_deeplink, oldstyle_deeplink, image_url, currency,
                                                                                                      availability, apr_full, apr, balancetransfer_free, interest_free_period, credit_limit, benefits, company_text)
                                                                                                      
                                                                                                      VALUES ('$product_code', '$product_name', '$level1', '$description', $short_deeplink', '$oldstyle_deeplink',
                                                                                                      '$image_url', '$currency',
                                                                                                      '$availability', $apr_full', '$apr', '$balancetransfer_free', '$interest_free_period', '$credit_limit', '$benefits',
                                                                                                      '$company_text')"
    );
                                                                                               echo 
    $product_name "has been inserted </br>";
                                                                                          }
                                                            break;
                                          }
                                   }
    ?>
    Can someone please ell me how i can fix this?

    Thanks

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    Swansea
    Posts
    75
    Thanks
    3
    Thanked 6 Times in 5 Posts

    Re: URGENT - Warning: file_get_contents() [function.file-get-contents]

    This is a server configuration issue

    You need to edit your php.ini file

    from
    allow_url_fopen = Off

    allow_url_fopen = On

    speak to your hosting providers how may be able to do that for you

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: URGENT - Warning: file_get_contents() [function.file-get-contents]

    I am using a free account on zymic.com, have emailed them asking them if they cn do that, will wait for reply

    While that is happening, do you know any free hosting website which have this changeable and have mysql and php?

    Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. The mysql_affected_rows function
    By Barry in forum Programming
    Replies: 4
    Last Post: 11-08-09, 11:05 PM
  2. Buildings & Contents
    By Data--Broker in forum Lead Generation - PI, IVA, Loans, Mortgages
    Replies: 0
    Last Post: 08-04-09, 10:55 AM
  3. Urgent Warning! Adwords account been hacked
    By Top banana in forum Affiliate Marketing Lounge
    Replies: 20
    Last Post: 30-08-08, 11:39 AM
  4. Change HTML file to PHP file
    By internet-laptop in forum Programming
    Replies: 6
    Last Post: 10-07-08, 04:06 PM
  5. .htaccess file urgent help needed
    By Elaine in forum Affiliate Marketing Lounge
    Replies: 8
    Last Post: 21-11-03, 04:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
To Top

SEO by vBSEO 3.6.1