GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   .php > perl troubles. Ideas anyone? (https://gfy.com/showthread.php?t=714320)

Adult Site Traffic 03-13-2007 02:50 PM

.php > perl troubles. Ideas anyone?
 
I have a perl counter that I want to include in .php pages, but no matter what I do, it doesn't work.

It's just a counter that I can include with JS, but I don't want to do that.

Here's what I've tried, doesn't work and I don't mess with perl much at all.
Code:

<? require('http://domain.com/cgi-bin/counter.cgi'); ?>
--
<? include_path="/hsphere/local/home/account/domain.com/cgi-bin/counter.cgi" ?>
--
<? require('/hsphere/local/home/account/domain.com/cgi-bin/counter.cgi'); ?>
--
<? require_once('/hsphere/local/home/account/domain.com/cgi-bin/counter.cgi'); ?>
--
<? include('/hsphere/local/home/account/domain.com/cgi-bin/counter.cgi');?>
--
<? include('http://domain.com/cgi-bin/counter.cgi');?>
--
<?php virtual("/hsphere/local/home/account/domain.com/cgi-bin/counter.cgi"); ?>

Here's the JS version:
Code:

<script>
a=new Image();
refer=document.referrer;
doc=document.location;
x=screen.width;
y=screen.height;
a.src="http:/ /domain.com/cgi-bin/stats/logger.cgi?ref="+escape(refer)+"&doc="+escape(doc)+"&res="+x+"x"+y;
</script>

Here's the SSI version:
Code:

<!--#include virtual="/cgi-bin/stats/logger.cgi" -->
Any ideas? I've tried Google, but I can't come up with anything useful :(

TY

A-S-T

borked 03-13-2007 02:59 PM

virtual();?

donborno 03-13-2007 03:04 PM

What's the output of that counter? If it's an image you only need to include <img src="http:domain.com/cgi-bin/counter.cgi" alt="Counter" title="" /> in your template.

Meaty&Needy 03-13-2007 03:19 PM

I would think include() should do it. If you just go to domain.com/cgi-bin/counter.cgi in your browser, does the counter increment?

What about your allow_url_fopen and allow_url_include ? You'd have to have those turned on in include() or fopen() a URL.

hth:2 cents:

Adult Site Traffic 03-13-2007 03:28 PM

It technically is an image SOURCE, but it's really a page, no image exists.

Yea, the counter is working, I have it on 3 other sites for this guy, running from his admin domain, it's just when I use the JS version, it leaves the code open for snooping to the login, which isn't real secure.

He's going to start getting affiliate traffic in a couple of weeks, so I just want to tighten down the sites some.

When I use the SSI (or include .php) version, it only displays "<!--Logged User-->" in the page source, not the full path to the script. That's why I want to do it this way.

TY.

A-S-T

.

Adult Site Traffic 03-13-2007 03:28 PM

Duplicate post

naitirps 03-13-2007 03:30 PM

could also try curl()... or rewrite the counter ;-)

Adult Site Traffic 03-13-2007 03:32 PM

.. I might just stick it in an .shtml page and then include that. Kind of the long way around, but it'll work.

borked 03-13-2007 03:47 PM

Quote:

Originally Posted by Adult Site Traffic (Post 12070701)
When I use the SSI (or include .php) version, it only displays "<!--Logged User-->" in the page source, not the full path to the script. That's why I want to do it this way.

that will always give you the relative path, not the full path - you need to cwd() to the script directory before including (with virtual() for eg), if that's what is causing you probs...

PHP-CODER-FOR-HIRE 03-13-2007 03:48 PM

See me if you still cannot get it

Adult Site Traffic 03-13-2007 03:54 PM

Quote:

Originally Posted by PHP-CODER-FOR-HIRE (Post 12070914)
See me if you still cannot get it

Ahso!

I prolly could make it work, eventually, but I'd much rather have someone do it ;)

A-S-T

.


All times are GMT -7. The time now is 03:46 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123