Page Index Toggle Pages: 1 2 [3] 
There are no actions to perform.
Very Hot Topic (More than 25 Replies) Add php include to perl (Read 17,245 times)
westwegoman
Ex Member
**




None
Re: Add php include to perl
Reply #30 - May 18th, 2012 at 7:54am
There are no actions to perform.
Bill Myers wrote on May 18th, 2012 at 7:44am:
Now if we can just get this forum to install at least one anti-spam mod. Then we won't have to keep wading through the spam when this forum gets hit.

I know what you mean. I tested the header includes out on my YaBB 3 test forum first... In the 10 minutes that I had it out of maintenance mode, 2 spammers registered. Its like they were standing there waiting for me to open the gates. geesh!!! Spamtards!!!
  
Back to top
 
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,866
Location: Los Angeles

YaBB 2.4
Re: Add php include to perl
Reply #31 - May 18th, 2012 at 7:58am
There are no actions to perform.
westwegoman wrote on May 18th, 2012 at 7:54am:
Spamtards!!!

What a great word!  Grin
  

Morning, noon, or night, have a great one!

Note: Like most others, this forum doesn't allow us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Add php include to perl
Reply #32 - May 18th, 2012 at 1:08pm
There are no actions to perform.
westwegoman wrote on May 18th, 2012 at 7:39am:
Just finished adding it and it works like a charm on php pages and YaBB.

Derek and the crew comes through once again

Great! Smiley

JonB wrote on May 18th, 2012 at 7:03am:
* JonB snarfs and giggles

He he! Grin
  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,594
Location: Earth

YaBB 2.6.1
Re: Add php include to perl
Reply #33 - Aug 10th, 2012 at 4:13pm
There are no actions to perform.
This Topic was moved here from Non-YaBB Programming and Technical Help [move by] Dandello.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
siri
YaBB Newcomer
*
Offline



Posts: 4

None
Re: Add php include to perl
Reply #34 - Sep 15th, 2017 at 1:14pm
There are no actions to perform.
Perl interpreter can execute Perl syntax commands, despite there are some similarities between Perl and PHP syntax, you will need a PHP interpreter to run PHP code. Instead you can use some Perl commands to use output of a PHP script. you should execute the PHP script using the system PHP interpreter in your Perl code, and then use the output of that execution. your PHP code needs to be some command line code that will return (like echo or print) the output. if you need to pass arguments to the PHP code, use command line arguments when executing the PHP script in your Perl code. so your Perl code will be like this:

// your code before PHP call
$php_output = `php /path/to/php/script -param1 -param2 -param3`;
// your code after PHP call
and your PHP script can receive parameters like this:

<?php
// argv() is defined by PHP and contains all command line params
$params = argv();
// first index of argv is the name of the PHP script you are running.
array_shift($params);
// now you have all parameters.
// your code here generates some results.
echo $resutls;
?>
I'm not a Perl programmer, so there might be other (better) ways to execute a external program in Perl. but the general steps are like this.
  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,594
Location: Earth

YaBB 2.6.1
Re: Add php include to perl
Reply #35 - Sep 15th, 2017 at 5:12pm
There are no actions to perform.
Well, the original discussion was concerning using the same templates for a PHP script as for YaBB. (answer: yes, it can be done. How easy it is depends on the server set up. Some server set ups make it nigh onto impossible without being really clever.)

That is NOT exactly the same as including a PHP script into a Perl script (Supposedly Perl does have mods for that.) 
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 
There are no actions to perform.