EzPortal - Portal Software for Forums

EzPortal - Made to Fit Your SMF Forum - Glad You Found Us!
+- +-

UserBox

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Recent Posts

Re: Converting to HTTPS by EzPortal
September 24, 2017, 07:11:26 pm

Converting to HTTPS by Padisha
September 24, 2017, 12:22:45 pm

Re: Mobile Only Blocks by EzPortal
September 23, 2017, 03:15:10 pm

Re: Mobile Only Blocks by morenos
September 23, 2017, 12:04:30 pm

Re: Members online block not displaying. by EzPortal
September 19, 2017, 12:02:55 pm

Re: Members online block not displaying. by Kocsis
September 19, 2017, 12:29:13 am

Re: EZPoll block by Julian
August 17, 2017, 03:43:31 am

Re: EZPoll block by EzPortal
August 16, 2017, 12:37:26 pm

+- HTML Menu


Sample HTML Block Usage - You May Custom Code it, as needed!

Author Topic: Need help with a php block please.  (Read 8355 times)

0 Members and 1 Guest are viewing this topic.

Offline ratr

  • Posts: 2
  • Karma: 0
  • Gender: Male
Need help with a php block please.
« 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

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1159
  • Karma: 63
Re: Need help with a php block please.
« Reply #1 on: November 20, 2010, 07:15:38 am »
Use just include ("pokerleague_.php");

Offline ratr

  • Posts: 2
  • Karma: 0
  • Gender: Male
Re: Need help with a php block please.
« Reply #2 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.

Offline DenDen66

  • Newbie
  • *
  • Posts: 45
  • Karma: 0
Re: Need help with a php block please.
« Reply #3 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




Offline Maxx

  • VN Vet E4
  • Hero Member
  • *****
  • Posts: 560
  • Karma: 8
  • Gender: Male
  • Web Designer
    • SurfaceThemes - Web Design Ideas Classic Rock
Re: Need help with a php block please.
« Reply #4 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

Offline DenDen66

  • Newbie
  • *
  • Posts: 45
  • Karma: 0
Re: Need help with a php block please.
« Reply #5 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.

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1159
  • Karma: 63
Re: Need help with a php block please.
« Reply #6 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

Offline DenDen66

  • Newbie
  • *
  • Posts: 45
  • Karma: 0
Re: Need help with a php block please.
« Reply #7 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

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1159
  • Karma: 63
Re: Need help with a php block please.
« Reply #8 on: September 22, 2015, 01:09:15 pm »
Glad to help

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
2514 Views
Last post September 30, 2014, 10:24:54 pm
by EzPortal
0 Replies
1248 Views
Last post May 22, 2016, 04:39:46 pm
by Miker1029
4 Replies
8269 Views
Last post July 03, 2016, 12:01:02 pm
by DenDen66
2 Replies
1720 Views
Last post February 07, 2017, 07:55:45 am
by landyvlad
1 Replies
9526 Views
Last post March 18, 2017, 09:04:41 pm
by DenDen66

+-SMF Gallery

Quick Menu








Members Online

17 Guests, 0 Users
Powered by EzPortal