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 Question ... (https://gfy.com/showthread.php?t=108550)

lil2rich4u2 02-15-2003 03:17 PM

PHP Question ...
 
How else can i include a php file into my .shtml file?

TTT Script tells me to use this:
[!--#include file="ttt-in.php" --]
which has worled for me on other servers, but this new server has a problem with that format.


I tried:
[!--#include file="http://www.domain.com/ttt-in.php" --]
but that didnt work


Any other ways?

X37375787 02-15-2003 03:20 PM

uhm, did you replace [ ] with < > ??

Libertine 02-15-2003 03:22 PM

The [ should be a <, but I assume you know that.

You need to have the relative server path to the file, not the url.
Try this:
[!--#include virtual="ttt-in.php" --]

(replace the ] and [ with > and < ofcourse)

lil2rich4u2 02-15-2003 03:22 PM

no why would i do that?


lol j/k ofcourse i did




btw nice sig, lol

X37375787 02-15-2003 03:24 PM

:glugglug

lil2rich4u2 02-15-2003 03:24 PM

Quote:

Originally posted by punkworld
The [ should be a <, but I assume you know that.

You need to have the relative server path to the file, not the url.
Try this:
[!--#include virtual="ttt-in.php" --]

(replace the ] and [ with > and < ofcourse)


ok ill go try it, thanks for trying to help.

Ill keep you posted.

X37375787 02-15-2003 03:25 PM

You gotta have SSI enabled on your server in order for it to work. Ask your noc.

Libertine 02-15-2003 03:25 PM

Btw, what error message do you get?

mrthumbs 02-15-2003 03:25 PM

php and ssi dont go along..

Just convert the page to php..no need for ssi
if php is enabled on the machine.

Libertine 02-15-2003 03:26 PM

Quote:

Originally posted by mrthumbs
php and ssi dont go along..

Just convert the page to php..no need for ssi
if php is enabled on the machine.

:eek7

lil2rich4u2 02-15-2003 03:27 PM

Quote:

Originally posted by punkworld
The [ should be a <, but I assume you know that.

You need to have the relative server path to the file, not the url.
Try this:
[!--#include virtual="ttt-in.php" --]

(replace the ] and [ with > and < ofcourse)


Ok nope didnt work, its still showing all hits as bookmarks.


Any other ideas?

BTW Im assuming that goes between the [head] [/head] tags?

mrthumbs 02-15-2003 03:28 PM

you can, ofcourse, include a php files content with shtml but youll experience processing/execution difficulties by default.

Libertine 02-15-2003 03:29 PM

hit me up on icq, 85992840

lil2rich4u2 02-15-2003 03:48 PM

Quote:

Originally posted by mrthumbs
php and ssi dont go along..

Just convert the page to php..no need for ssi
if php is enabled on the machine.


ok i changed it to .php

same issues. It is counting all hits as bookmarkers even though i know the hit came from a referrer.


Any other ideas?

lil2rich4u2 02-15-2003 04:07 PM

so nobody knows any other ways to include a php file?


there must be more than one way, lol

lil2rich4u2 02-15-2003 04:37 PM

Ok this is what i have tried ...


with main page as a .shtml,
[!--#include file="ttt-in.php" --> (within the head> tags)
[!--#include file="ttt-in.php" --> (outside the head> tags)
[!--#include file="http://www.totaltwat.com/ttt-in.php" --> (within the head> tags)
[!--#include file="http://www.totaltwat.com/ttt-in.php" --> (outside the head> tags)
[!--#include virtual="ttt-in.php" --> (within the head> tags)
[!--#include virtual="ttt-in.php" --> (outside the head> tags)

with main page as a .php,
[?php include("ttt-in.php"); ?> (outside head> tags)
[? require("wb_pgm.inc"); ?> (outside head> tags)
[!--#include file="ttt-in.php" --> (within the head> tags)
[!--#include file="ttt-in.php" --> (outside the head> tags)
[!--#include file="http://www.totaltwat.com/ttt-in.php" --> (within the head> tags)
[!--#include file="http://www.totaltwat.com/ttt-in.php" --> (outside the head> tags)

buran 02-15-2003 07:02 PM

Unless you're running Apache2, you cannot process a file through more than one module (SSI, or PHP). The solution then is this:


&lt;?php
require_once("/path/to/file.php");
?>

alternatively, you can configure to look at a list of paths to find files, called the include_path. If your file is in one of those directories, you can include it as just

require_once("filename.php");

Recommend you trying running a page with just this command to see how your PHP is configured:

&lt;?php
phpinfo();
?>

(had to change &lt; to & lt ; in order for it to render in phpBB)

lil2rich4u2 02-15-2003 09:27 PM

Quote:

Originally posted by buran
Recommend you trying running a page with just this command to see how your PHP is configured:

&lt;?php
phpinfo();
?>


here is the result:
http://totaltwat.com/test.php


here is my page with the !--#include:
http://totaltwat.com/index.shtml

here is my page with .php extension:
http://totaltwat.com/index.shtml



nothing is working. All the hits still register as bookmarkers meaning the cookie is not working (the php include)

Libertine 02-15-2003 09:34 PM

Edit your post <i>now</i>. You do <b>not</b> want to give out the details of phpinfo() to a bunch of strangers.

The problem lies in the fact that you use revsharehosting, I am 99% certain of that. Try to find some people who have dealt with that problem before. (ie the problem of the trade script not recognizing referers)

Also, the problem most likely isn't the cookie, since that is used for counting productivity, not hits.

lil2rich4u2 02-15-2003 09:37 PM

Quote:

Originally posted by punkworld
Edit your post <i>now</i>. You do <b>not</b> want to give out the details of phpinfo() to a bunch of strangers.

The problem lies in the fact that you use revsharehosting, I am 99% certain of that. Try to find some people who have dealt with that problem before. (ie the problem of the trade script not recognizing referers)

Also, the problem most likely isn't the cookie, since that is used for counting productivity, not hits.


omg, lol

ok i deleted the file, rofl

lil2rich4u2 02-15-2003 09:39 PM

Quote:

Originally posted by punkworld
The problem lies in the fact that you use revsharehosting, I am 99% certain of that. Try to find some people who have dealt with that problem before. (ie the problem of the trade script not recognizing referers)

yes that is the problem, im trying to find a way to get it working. Ive tried on rev's board, and on chicken board, figured id try here also.

rowan 02-15-2003 09:42 PM

This is just a hunch, but try this...

&lt;?php
echo $_COOKIE["ttt_cookie"];
?&gt;

This will show if your PHP scripts are seeing the TTT cookie.

Libertine 02-15-2003 09:43 PM

Instead of including the ttt-in.php, try including a php script containing the following:

PHP Code:

<?php
$towrite 
$_SERVER["HTTP_REFERER"] . "\n";
$handle fopen("refs.txt""a");
flock($handle2);
fputs($handle$towrite);
flock($handle3);
fclose($handle);
?>

Make a blank file called refs.txt, upload it to your server and chmod it 777. After a few dozen hits, check out what's in it. The referers as seen by the server will be in it, if they are in order, the trade script is at fault.

lil2rich4u2 02-15-2003 09:45 PM

Quote:

Originally posted by rowan
This is just a hunch, but try this...

&lt;?php
echo $_COOKIE["ttt_cookie"];
?&gt;

This will show if your PHP scripts are seeing the TTT cookie.


Ok i did it and it echoed some numbers, i guess the name of the cookie?

http://www.totaltwat.com/test.php

lil2rich4u2 02-15-2003 09:47 PM

Quote:

Originally posted by punkworld
Instead of including the ttt-in.php, try including a php script containing the following:

PHP Code:

<?php
$towrite 
$_SERVER["HTTP_REFERER"] . "\n";
$handle fopen("refs.txt""a");
flock($handle2);
fputs($handle$towrite);
flock($handle3);
fclose($handle);
?>

Make a blank file called refs.txt, upload it to your server and chmod it 777. After a few dozen hits, check out what's in it. The referers as seen by the server will be in it, if they are in order, the trade script is at fault.


ok gimme a sec

lil2rich4u2 02-15-2003 09:50 PM

Quote:

Originally posted by lil2rich4u2



ok gimme a sec


ok you guys click this so i can see if its logging ref's

http://totaltwat.com/test2.php

lil2rich4u2 02-15-2003 09:52 PM

ok its logging ref's

http://totaltwat.com/refs.txt


what does that mean again?

Libertine 02-15-2003 09:52 PM

It's logging refs alright.

http://totaltwat.com/refs.txt

Libertine 02-15-2003 09:54 PM

Quote:

Originally posted by lil2rich4u2
ok its logging ref's

http://totaltwat.com/refs.txt


what does that mean again?

That means that something is going wrong in the trade script. You see, this tiny piece of code could (with a whole lot of work) be transformed into a trade script, and that trade script *would* be working on your server.

lil2rich4u2 02-15-2003 09:54 PM

Quote:

Originally posted by punkworld
It's logging refs alright.

http://totaltwat.com/refs.txt


why do they keep disapering?

and what does that accomplish?

lil2rich4u2 02-15-2003 09:55 PM

Quote:

Originally posted by punkworld
That means that something is going wrong in the trade script. You see, this tiny piece of code could (with a whole lot of work) be transformed into a trade script, and that trade script *would* be working on your server.


but i use this script on a few other sites and never had problem, and a zillion other people use it too .... only problem is on revshare

Libertine 02-15-2003 09:56 PM

btw, you can delete the test2.php and refs.txt from your server now.

Libertine 02-15-2003 09:57 PM

Quote:

Originally posted by lil2rich4u2




but i use this script on a few other sites and never had problem, and a zillion other people use it too .... only problem is on revshare

You said it... the problem is on revshare, in combination with your script.

How many trades do you have in your script?

lil2rich4u2 02-15-2003 09:59 PM

Quote:

Originally posted by punkworld


You said it... the problem is on revshare, in combination with your script.

How many trades do you have in your script?


yes i know the problem is in revshare, lol ... i was hoping to find a way to call the php that will work with the bug within revshare.


I have 4 trades in my script.

Libertine 02-15-2003 10:03 PM

Your problem:

http://chickenboard.com/read.php?f=13&i=1097&t=1097

Libertine 02-15-2003 10:05 PM

That means the problem is with revsharehosting, and so far nobody has been able to figure out what it is yet.

lil2rich4u2 02-15-2003 10:06 PM

Quote:

Originally posted by punkworld
Your problem:

http://chickenboard.com/read.php?f=13&i=1097&t=1097

yes ive been there, as well as several other threads on this same exact problem. Cant seem to find a resolve though.

I have contacted server admin and he is "looking into it", just figured someone here might help me find a resolve.

lil2rich4u2 02-15-2003 10:08 PM

this is an exact copy of an email the admin wrote me ...


i was just looking through the board of turbotraffictrader.com and it seems there's a lot of issues regarding the hit counter... please refer to the

http://www.chickenboard.com/read.php?f=13&i=1276&t=1276

this guy is talking about the full server path which i think this is the only issue...
we are currently using PHP 4.2.3 which it is compatible with their script.

alot of people are having problem with this hits and this is the key issue is the server path...please let me know what paths you have setup for the script?




Now what exactly is a server path and how do i change it?

Libertine 02-15-2003 10:12 PM

Quote:

Originally posted by lil2rich4u2

Now what exactly is a server path and how do i change it?

Server path = path on the server to your files.
You can either use absolute paths, for instance:

/var/www/html/in.php
/blegh/blagh/www/httpdocs/cj/in.php

or relative paths, for instance:

in.php
cj/in.php

Libertine 02-15-2003 10:16 PM

Now, the question is what paths are used in the script.

For instance, it could be that
$_SERVER['DOCUMENT_ROOT']
is used as the path to the scripts, which on certain servers may give problems.

lil2rich4u2 02-15-2003 10:20 PM

Quote:

Originally posted by punkworld
Now, the question is what paths are used in the script.

For instance, it could be that
$_SERVER['DOCUMENT_ROOT']
is used as the path to the scripts, which on certain servers may give problems.


if (time() > $row[1]) { require_once("ttt-do_reset.inc.php"); dailylog(); }


thats a line from the script, so it uses simple path's?

Libertine 02-15-2003 10:26 PM

Everything below this is illegal. Do it at your own risk. (It might work though).

In ttt-in.php, replace

$referer = getenv("HTTP_REFERER");
$ip = getenv("REMOTE_ADDR");

with

$referer = $_SERVER["HTTP_REFERER"];
$ip = $_SERVER['REMOTE_ADDR'];


I repeat, this is illegal, and Choker may get pissed off because of it. If you tell him, that is.

lil2rich4u2 02-15-2003 10:29 PM

Quote:

Originally posted by punkworld
Everything below this is illegal. Do it at your own risk. (It might work though).

In ttt-in.php, replace

$referer = getenv("HTTP_REFERER");
$ip = getenv("REMOTE_ADDR");

with

$referer = $_SERVER["HTTP_REFERER"];
$ip = $_SERVER['REMOTE_ADDR'];


I repeat, this is illegal, and Choker may get pissed off because of it. If you tell him, that is.


well it would prolly work since obviously you know your stuff, but ive already had a run-in with choker about editing his script, never again, lol

Thanks though

lil2rich4u2 02-15-2003 10:41 PM

or maybe if i edit it, he will get pissed at me and send me 5 million free hits?


lol j/k

lil2rich4u2 02-16-2003 08:25 AM

damnit, server admin still cant figure it out and lord knows im as useless as a set of tits on a bull, lol


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

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