PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Troubleshooting (http://www.phpdig.net/forum/forumdisplay.php?f=22)
-   -   Adding a variable to the end of every link? (http://www.phpdig.net/forum/showthread.php?t=948)

cwheat 05-19-2004 03:16 PM

Adding a variable to the end of every link?
 
Hello,

I want to use this for a intranet and inorder to get past the user auth I need phpdig to automaticly add a couple of varaibles to the end of the links it tries to open.

so

http://www.myserver.com/index.php would auto look like:

http://www.myserver.com/index.php?bypassauth=1

and when it found lets say the news link
news.php it would auto add to it as well:
news.php?bypassauth=1

Thanks
Chris

vinyl-junkie 05-20-2004 05:00 PM

Instead of monkeying with the phpdig code, why not setup a process to append that string to every URL in the database? Just a thought.

cwheat 05-20-2004 05:17 PM

The problem is that phpdig keeps getting bounced to our login page. So it only is able to index 2 pages index.php and login.php

by having phpdig add the ?bypass=yes to the urls it will be able to bypass the securities.

Thanks
Chris

vinyl-junkie 05-20-2004 05:35 PM

Sorry, I must have misunderstood what you were asking. Take a look at this thread and see if it helps. I think it's probably closer to what you need to know. Unless, of course, I'm way off base, which is entirely possible. If so, perhaps you could explain a little more what you're trying to do.

cwheat 05-21-2004 07:16 AM

I already tried the username:password@domain.com

it does not work. I am not using .htaccess to authenticate users I am using custom php code. Basicly if the username and password matches the database the auth script sets a varaible.

ie $goodauth=1

and at the top of ever page the scripting looks similar to:

if ($goodauth !== "1"){
headerlocation to login.php
} else {

page content

}


So to bypass this I need phpdig to add ?goodauth=1 to every url it tries to spider. Adding the ?goodauth=1 would bypass the login.

Thanks
Chris

cwheat 05-25-2004 01:26 PM

any one?

vinyl-junkie 05-25-2004 05:03 PM

Um, can I take another stab at this? :)

Change your custom script to let the phpdig user-agent through without authentication. Here is a thread that talks about how that's defined in phpdig.

So what you'd have for authentication is something like this:
PHP Code:

if ($_SERVER['USER-AGENT'] == 'PhPDig'){
page content
} else {

if (
$goodauth !== "1"){
headerlocation to login.php
} else {

page content



Would that work for you?

You gotta give me an A for effort! ;)

cwheat 05-26-2004 10:15 AM

A++++

THANK YOU!!!!!!!!!


Chris


All times are GMT -8. The time now is 10:14 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.