manx Posted November 7, 2008 Share Posted November 7, 2008 I am trying to use a script that is on another domain to show up a bit of info on one of my blogs' sidebars. The script creator says to use the following code: <?php require_once 'http://www.domainname.com'; ?> But, when I add it to my sidebar it breaks the template (fatal error?) -- I know my hosting allows opening another URL to show info because I can use Popshops code, and other PHP codes that pull in other url's info. Can anyone help me get this line of code to work? I've tried to add a php.ini with allow_url_include -- didn't help. Plus I turned globals on in htaccess. BTW -- I am a complete PHP dummy Thanks! Anne Quote Link to comment https://forums.phpfreaks.com/topic/131808-require_once-problem/ Share on other sites More sharing options...
JonnoTheDev Posted November 7, 2008 Share Posted November 7, 2008 Whats the error please. Quote Link to comment https://forums.phpfreaks.com/topic/131808-require_once-problem/#findComment-684705 Share on other sites More sharing options...
.josh Posted November 7, 2008 Share Posted November 7, 2008 How are we supposed to help you with such general statements as "a script" and "my template" and "my sidebar" and "fatal error?" That's like calling up a mechanic and telling him you want to install " 'something' 'somewhere' in my 'vehicle' but there is 'a problem' " Quote Link to comment https://forums.phpfreaks.com/topic/131808-require_once-problem/#findComment-684708 Share on other sites More sharing options...
manx Posted November 7, 2008 Author Share Posted November 7, 2008 Hi "Whats the error please." I'm not getting a written error -- I was guessing that it is a "fatal" error because nothing appears on the sidebar after the inclusion of the code. The script (on a different domain) is a simple script that shows random links on the page. The problem is not in the script it is working in that if you put the 'http://www.domainname.com' in your browser, random links appear on this page in the way should. The problem is the code using 'require_once' -- this php coding is not working on my website as it should ... That is the help I am asking for -- is there something (more php coding) I can add to the code to make it work? Or, is there a line(s) of code that needs to be added on another file? Quote Link to comment https://forums.phpfreaks.com/topic/131808-require_once-problem/#findComment-684726 Share on other sites More sharing options...
Mchl Posted November 7, 2008 Share Posted November 7, 2008 You sure you have to do this include in PHP and not JavaScript? Quote Link to comment https://forums.phpfreaks.com/topic/131808-require_once-problem/#findComment-684732 Share on other sites More sharing options...
manx Posted November 7, 2008 Author Share Posted November 7, 2008 "You sure you have to do this include in PHP and not JavaScript?" Yes, it is php code -- the creator of the script gives this code to use. He shows it working on both wp-blogs and .html pages It may have something to do with my hosting? Quote Link to comment https://forums.phpfreaks.com/topic/131808-require_once-problem/#findComment-684738 Share on other sites More sharing options...
.josh Posted November 7, 2008 Share Posted November 7, 2008 How are we supposed to help you with such general statements as "a script" and "my template" and "my sidebar" and "fatal error?" That's like calling up a mechanic and telling him you want to install " 'something' 'somewhere' in my 'vehicle' but there is 'a problem' " Quote Link to comment https://forums.phpfreaks.com/topic/131808-require_once-problem/#findComment-684739 Share on other sites More sharing options...
manx Posted November 7, 2008 Author Share Posted November 7, 2008 I have found out this is a "hosting" problem -- The code works on one of my hosting accounts (I have 3 completely different hosting co's), but not on 2 of them. Thank you anyway Anne Quote Link to comment https://forums.phpfreaks.com/topic/131808-require_once-problem/#findComment-684749 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.