Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 730303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:53:47+00:00 2026-05-14T06:53:47+00:00

I am having an issues but don’t know where to solve it. My template

  • 0

I am having an issues but don’t know where to solve it. My template works great in xampp but not on the host server. I get this message:

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disables in the server configuration in homepage/……./twitter.php.

The error is on line 64.

<?php
/*
For use in the "Parse Twitter Feeds" code below
*/
define("SECOND", 1);
define("MINUTE", 60 * SECOND);
define("HOUR", 60 * MINUTE);
define("DAY", 24 * HOUR);
define("MONTH", 30 * DAY);
function relativeTime($time)
{
$delta = time() - $time;
if ($delta < 2 * MINUTE) {
    return "1 min ago";
}
if ($delta < 45 * MINUTE) {
    return floor($delta / MINUTE) . " min ago";
}
if ($delta < 90 * MINUTE) {
    return "1 hour ago";
}
if ($delta < 24 * HOUR) {
    return floor($delta / HOUR) . " hours ago";
}
if ($delta < 48 * HOUR) {
    return "yesterday";
}
if ($delta < 30 * DAY) {
    return floor($delta / DAY) . " days ago";
}
if ($delta < 12 * MONTH) {
    $months = floor($delta / DAY / 30);
    return $months <= 1 ? "1 month ago" : $months . " months ago";
} else {
    $years = floor($delta / DAY / 365);
    return $years <= 1 ? "1 year ago" : $years . " years ago";
}
}


/*
Parse Twitter Feeds

*/
function parse_cache_feed($usernames, $limit, $type) {
$username_for_feed = str_replace(" ", "+OR+from%3A", $usernames);
$feed = "http://twitter.com/statuses/user_timeline.atom?screen_name=" . $username_for_feed . "&count=" . $limit;
$usernames_for_file = str_replace(" ", "-", $usernames);
$cache_file = dirname(__FILE__).'/cache/' . $usernames_for_file . '-twitter-cache-' . $type;

if (file_exists($cache_file)) { 
    $last = filemtime($cache_file);
    }

$now = time();
$interval = 600; // ten minutes
// check the cache file
if ( !$last || (( $now - $last ) > $interval) ) {
    // cache file doesn't exist, or is old, so refresh it
    $cache_rss = file_get_contents($feed); (this is line 64)

Any help on how to give this access on my host server?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:53:48+00:00Added an answer on May 14, 2026 at 6:53 am

    your server administrator has disabled access to urls for php file functions (allow_url_fopen ini setting). Ask them to enable it, or consider other methods, like curl.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not sure if this is a simulator issue, but I don't remeber having
I know it can be done but am having issues getting it to work.
I'm just trying to get started with NDjango but am having issues running a
I know this probably has been asked before but I am having issues with
I'm trying to get started with twitter4r but I'm having some issues: Why I
I'm having issues with ob_start. Not sure what the deal is, but I've bubbled
Working on a dev tracker custom PHPBB BBCode but I am having issues with
I am looking to make a horizontally layed website but I am having issues
I'm trying to learn C++ currently, but I'm having issues with the code below.
I'm using LINQ to Entities to display paged results. But I'm having issues with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.