EzPortal - Portal Software for Forums

EzPortal Forums => ezBlock Coding Forums => Topic started by: ratr on November 20, 2010, 01:57:55 am

Title: Need help with a php block please.
Post by: ratr on November 20, 2010, 01:57:55 am
I have a php orientated league program. The writer of the program has this simple instruction to show the league ladder on a website: <?php include ("pokerleague_.php"); ?>

I have set up a php block for the bottom of my page but using the above example gives me the following message within the block of ezBlock unable to run PHP syntax error! .

I have tried putting the following options after the first " and before pokerleague_.php.

http://www.mydomain name/tester/
/home/ratr/public_html/mydomain name/ezportal/
("../tester/pokerleague_.php")
and even tried \ instead of /

No luck so far, I'd really like to get my league ladder to show in a block rather than include it in the site code. I'd ask the writer of the program however while he mentions a help forum I can not find a link to it on his site or in the readme within the software.
any help would be appreciated, as giving me a little information is like handing a stick of dynamite to a lunatic which should explain that my php knowledge is about .01%
I'm running SMF 2.0 RC4 with the latest version of ezPortal.

Thank You
Title: Re: Need help with a php block please.
Post by: EzPortal on November 20, 2010, 07:15:38 am
Use just include ("pokerleague_.php");
Title: Re: Need help with a php block please.
Post by: ratr on November 20, 2010, 03:45:52 pm
Thank You for your reply, but that didn't work. It just left it blank. So I thought I would try putting a copy of the pokerleague_.php in the same folder as the forum in case that was the problem. It game me an error and from that I copied the directory structure it said it was trying to access.

So I then tried
include ("/home/ratr/public_html/mydomain name.com/tester/pokerleague_.php"); and it works  :)   however without your prompt to my problem and my newbieness (if that is a word) trying everthing (and a bit of luck too) I'd still be at it.

So thank you for your time and effort, without such I would not have the block I wanted working i'm certain.
Title: Re: Need help with a php block please.
Post by: DenDen66 on September 22, 2015, 07:52:28 am
On this PHP issue. the

Code: [Select]
include (name_file.php); works.

However, if I move my file to another domain name: example http://otherdomainname.com/

and us this code:

Code: [Select]
include (http://otherdomainname.com/name_file.php);
It does not work.

What I my missing?

I have tried using  Ratr approach as well

Code: [Select]
include ("/home/ratr/public_html/mydomain name.com/tester/pokerleague_.php");
and it did not work either.

I am using SMF 2.0.11 and I am trying to fetch a file that is used by several forums all the time and I do want to use one copy of this file, because it does change from time to time.

Thanks for your help



Title: Re: Need help with a php block please.
Post by: Maxx on September 22, 2015, 08:54:07 am
Denis,

More then likely EZ, will need to assist you on this, but ezblocks some times, take time to fetch RSS feeds and other stuff, so please try to give it chance to fetch, before making alterations in code@!

regards,
Maxx
Title: Re: Need help with a php block please.
Post by: DenDen66 on September 22, 2015, 09:53:55 am
Denis,

More then likely EZ, will need to assist you on this, but ezblocks some times, take time to fetch RSS feeds and other stuff, so please try to give it chance to fetch, before making alterations in code@!

regards,
Maxx

Thanks for your answer Maxx.

I understand your point. However, when I use this code:

Code: [Select]
include (name_file.php);
It appeares almost instantly.

So what you are telling me is that if the information it need to fetch is on another domain, it will take more time, even if it is on the same server? Ok so I have no problem with that,

The question then is the following: should the following code work to go and get the information that is on another domain.

Code: [Select]
include ("http://otherdomainname.com/name_file.php");
I imagine it should, but when I try it it does not.
Title: Re: Need help with a php block please.
Post by: EzPortal on September 22, 2015, 11:21:34 am
This topic may help you Denis on the remote include
http://stackoverflow.com/questions/9038694/fopen-is-not-working-on-my-server
Title: Re: Need help with a php block please.
Post by: DenDen66 on September 22, 2015, 12:36:45 pm
It worked. It was the allow-url-fopen that was not activated. Now it is. ;-)

Thank you
Title: Re: Need help with a php block please.
Post by: EzPortal on September 22, 2015, 01:09:15 pm
Glad to help