Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Detecting Frames With PHP


Is it possible to use PHP to see if the person who is accessing ur website is using the frame set up or the non frame set up?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Detecting Host URL.
I've got a site that has both secure access (https) and normal http access. both use the same index.html.

The problem I have is that I cannot find a way to check which method is being used to access the site.

Ideally I want to check for https access and if that's not being used, redirect to the https url.

Anyone know of a way of doing this in PHP?

Detecting Flash
I need a way to detect whether someone has flash installed. I will use this information to take them to two different pages depeding on the result.

Detecting Recursion
Say I have an array containing a reference to itself:
$myArray = array();
$myArray['self'] =& $myArray;
How can I, looping iteratively through the array, detect the fact that
$myArray['self'] will "take" me to where I have already been? The print_r()
and var_dump() functions print *RECURSION* in such a case (though only after
the "second round"). Setting a flag seems to be the only solution, but I
don't want to modify the array in question - I want to produce a visual
representation of its contents like var_dump(), but formatted to my taste. I
had considered parsing the output of var_dump(), but first, that format
might change in a future version of PHP and second, an array key might be a
string resembling part of the output (like $myArray['["myArray"]=>']), which
seems to be difficult to detect by the parsing code.

Is there another way of doing this?

Detecting Domain?
how I can use PHP to detect the domain that is being used? Or just detect the full URL? Because I have more then 1 domain and I want to redirect the others to the first one, so that google won't think I am using duplicate content and penalize me for it.

So like either a way to detect what the domain is (E.G. domain2.com) so that I can redirect to domain1.com

Or just a way to detect if it ISN'T domain1.com, and redirect to domain1.com if it isn't? Because I like to register more then 1 domain for common misspellings, like the way google has gooogle.com redirect to google.com

Detecting The Name Of The Page You Just Came From
I know there is a way to detect the name of the page you just browsed from, but I cannot seem to find it.

Problem With Detecting Speed Of Net.
Well i comes accross little bit tricky problem around in php..there is any way to detect net speed in php ?

Waiting for some one to reply

Detecting Sum Of Array = 0 Problems
I use the following code to put directories that are on the server but not in the database yet on my website, so I can use a function to have them added.

However, when all my directories are in the database I get just an empty page, I want to put in a nice line that says all dirs are already added.

I don't know why the following code doesn't do just that. I tried several other things, no luck yet.

Do you have any idea what goes wrong, or how to solve this?

Detecting Windows Servers
Is there a way, within PHP, to determine if it is running on a Windows
Server?

Detecting If There Is A Mobile Phone
Is there a way (maybe a variable) to detect whether the user is using a mobile phone with internet to view your website?

Detecting Browser Resolution
How can I detect the resolution used by a visitor (i.e. 640x480, 800x600, etc.)?


Detecting Multiple Sessions
I have an address database running on POSTGRESQL web based ofcourse with php. My Web application has a login page that gives the users a session_start if their data is correct. Users can login at the same time. I would like to know how i can detect the session from these users. Than i want to know:

- How many user are online
- Wich users are online

When they didn't logged out but have closed their browser, how can i detect if their offline?

Detecting User-Agent
I have a site that uses access-restriction to only allow registered users to view certain pages. However, I would really like Google to be able to index *every* page regardless of whether it's password protected or not.

Is there a way to identify the user-agent header in PHP? That way I could identify the Googlebot, and then set a session variable that would allow the Googlebot to spider my entire site.

Detecting URL Forwarding / Redirection
I'm working on a feature in my software that will delete urls from a database if they no longer exist or do exist, but are redirecting to another page. Both cases have a setting to optionally allow a user to delete or keep them based on either one of the two scenarios. My problem is the header status which is being returned and detecting which urls are forwarding - For example,

Page 1) This no longer exists - HTTP/1.1 301 Moved Permanently

Page 2) This page is redirecting - HTTP/1.1 301 Moved Permanently

Page 3) This page is available - HTTP/1.1 302 Found

So page 1 & 2 are showing the same header status, even though page to really does exist.
Any suggestions?

Detecting User Country?
Is there a way using PHP to detect the country a person is browsing from?

Automatically Detecting Tables In A Db
Is it possible to write a script that, when provided with a database,
it will return all the tables names?

I will go onto try and put together a script that will not only output
the table names but also output the sql code required to CREATE the
table (i.e. CREATE TABLE example (exampleid auto_increment not null
primary key integer, name text, email text);) - Is this pretty simple
to do? Are there any free scripts online that would do this?

Php Detecting Javascript Enabled
Is there any php script to detect if java or javascript is enabled?

What is a difference between java, javascript and applet?

Detecting And Displaying The Domain Name
I have a site that has several domains pointing to its DNS.
I would like to implement a script that will grab the domain name visitors typed in, and display it
on the page. Is there a way to do it?


Detecting Multiple Windows
How would a man go about checking if another window (or tab.. same thing) is open from my site? Not allowing the pages (other than that 1 that is allowed) to load, thus showing an error.

Im doing this as more of an expieremental thing, but I have no clue where to start with it. I don't even know if PHP would be involved. Anyways, I've searched and searched and I couldn't find any examples/tuts so I came back here.

Detecting If A String Has A Certain Character?
Is there any sort of function to be able to go through a string and return if there is a certain character in it.

I have a variable for a persons name but and i need to know if there is a space between there name or not.

Detecting Dead Images
My database contains the images of other sites.... when other sites remove some images from their websites, my side shows blank images as i am using their images and the same_path of their images.

1) Is there a way i can detect the blank images.

2) Is it possbile that the desciption of that image will appear only when that image is opened.

Frames In Php
HI. I have a very successful private members club with all pages protected via authentication, I now want to include a section using frames, I have this already in html but I wish to have the frameset protected as well. I realise that this is not going to be a quick convert but my question's are can this be done in php using 3 frames, if so can someone please give me some pointers as to start and / or point me in the direction of some information on this subject, books I have bought make no mention of frames in php.

Frames And PHP
I actively read through the articles here and find them a extremely helpfull
as I am just entering into PHP. Today came across this article "How does the
PHP website colorize the code snippets?" and followed the link
<a target="_blank" rel=nofollow href="http://daevid.com/">[link]</a> and noticed he is using IFRAME in the site.
What are the Experts views on FRAMES and PHP. Surely "include" replaces the...

Php And Frames
I have a frameset and i want it to have php cod in the same file. Since there is no <body> tags can I add php?

my code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Admin Panel</title>
</head>
<?php
require_once('authentication.php');
?>
<frameset cols="20%,80%" framespacing="0" border="0" frameborder="NO">
<frame src="admin_sidebar.php" name="sidebar" scrolling="no" noresize frameborder="yes">
<frame src="admin_body.php" name="body" scrolling="auto" noresize>
</frameset><noframes></noframes>
</html>

Frames And Php
frames and php.

i have

-------------------------
----------------------------------------
| Button |
Frame
1
| |
----------------------------------------
--------------------------

----------------------------------------
Frame 2

-----------------------------------------

i have two different outputs,output1 and output2.

when ever i press the button in form i should get output1 in frame 1
and then after 10 seconds i should get the
output 2 in frame2.

PHP And FRAMES?
I'm developing a website which incorporates a header section at the top,
side areas and a central area. If I was developing the site with straight
HTML, I'd simply use FRAMES. However, by using PHP I thought I'd be able to
get around this as I use a single PHP to decide what information should be
present in each area of the page and render it appropriately. However, I
also need to incorporate 3rd party HTML files into the centre section/area
of my page. As these files include the full HTML page contents ie. with
<BODY> and <HEAD> tags I'm wondering how best to do this.
As far as I can see, the only way I can do this is to incorporate frames
into my PHP code. Without altering the contents of the 3rd party html files,
is there any other way of doing this?.

If I do have to have frames, what is the best method for integrating them
with the PHP code?. Would you have seprate PHP scripts in each frame, or
would you have a single script that is capable of generating each frame
depending on variables past to it (and extracted using $_GET{}?).

PHP And Frames
I wanna have a web site seperated into two frames (an upper and a lower one). The upper frame contains kinda navigation bar with several buttons. When clicking on a buttons it will change its picture and stays that way. Meanwhile the lower frame switches to the responding URL.

How can you do that using PHP ? I did it using JavaScript before, but JavaScript can (and should) be turned off.

Detecting User Abort Or Timeout
I'm writing a download script in php. This script sends files using
echo in order to limit download speed. My script has to do something
after connection abort. Everything is ok unless client pauses
downloading.

I'm using ignore_user_abort() and I'm checking connection_status()
while sending a file. When the user aborts connection, my loop breaks
and script finishes its job. But if the user pauses connection, the
script still sends a file!

I want my script to execute some commands after a break of the loop and
not to send file, if the user doesn't receive it! I don't know how to
implement that. Is it possible to do such script?

Detecting All Game Servers Running On LAN
does anyone know of a way to detect all game servers running on a LAN, preferably Half-life servers. Is this even possible ?

Half life the game obviously detects all the servers running on the network but I have no idea how this could be done in PHP.

Detecting And Replacing Line Endings
ive got a .txt file which i downloaded from a server..when i viewed the file, it was in one line in my editor and realized later that they used a different operating system than what im using..i dont know what their operating system is but im using linux..

i need then (using a php script) to detect the line endings of the text and eventually change it to the line endings for which linux (my operating system) is using so that i can get the strings line by line.

Detecting User Presence/absence
i'm trying to make code which with the help of a db will enable me to keep a check on all the ppl on my site.. the site is tatally dynamic.. just like forums.devshed.com anyway. So what i've got right now is:

when user comes to main page.. session is created. and if he/she clicks on some link then i update the db using the sessionid.. this is all well and good. but
how do i (not pun intended) get the page they are on if the address is typed directly for instance www.mysite.com/file.php?id=5&subid=57 is there anyway to detect this url?

secondly.. how do i find out that the user has left the site (closed browser window or gone to some other webaddress).

Algorithm For Detecting/highlighting Changes In Documents
Anyone knows a good algorithm for detecting difference between two
pieces of text? I'm working on a content management system and would
like to add the ability to highlight changes made between versions. I
don't think diff is suitable here, since I want word level detection.
Besides, I'll need to handle a large number of relatively short
strings. Spawning an process for each would be too time consuming.

AFAIK, PHP doesn't have a build-in function. If necessary, I can build
a wrapper extension.

Problem Detecting An Ajax Request
I have the following code in Javascript which is creating and sending
an XMLHttpRequest .

<code>
var xmlHttp;

/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e2) {
xmlHttp = false;
}
}
@end @*/
alert(xmlHttp);
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
xmlHttp = new XMLHttpRequest();
}

// Build the URL to connect to
var url = "getURL.php";

// Open a connection to the server
xmlHttp.open("GET", url, true);

// Setup a function for the server to run when it's done
xmlHttp.onreadystatechange = updatePage;

// Send the request
xmlHttp.send(null);

</code>

The problem I am having is server side where I am trying to detect an
Ajax request.
I have the folowing function isAjax() which is returning false:

<code>
<?php

if(isAjax()){
echo "This is an Ajax request";
}
else{
echo "Not Ajax";
}

function isAjax() {
return isset($_SERVER['HTTP_X_REQUESTED_WITH']) &&
$_SERVER ['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'
}

?>
</code>

Detecting Checkboxes And Option Lists
I am trying to figure out how to detect a <Form> check box being checked in a PHP script.  Likewise, I am trying to figure out how to detect which option was chosen in a <option> list of drop-down items in a form. Code:

Detecting/Disabling Back Button Using PHP
I was wondering if there is a way to disable or detect when a user presses the browser back button in PHP.

What I want to do is that when a back button is pressed, the page reloads.

Please let me know if there is a way to do this. If any of you use modernbill, it has that feature.

Detecting HEX Codes For Similar Colors
Is there any way by which i can detect the HEX codes for similar colors if i input a color code ?

What i mean if if i enter the color code for an Orange, the output should be another shade of Orange.

This can be seen in action at http://feeds.feedburner.com/~fc/GotChance?bg=FF9900&fg=000000&anim=0

If you change the "bg" parameter, the background color changes to that color and a similar shade is applied to the smaller background. How do i do something like that ? Also, how to i find HEX codes for complement colors ?

$GLOBALS And Frames
I have a global variable in the main frame.

$GLOBALS['name'] = $name;

I tested it and the value is ok.

echo ${'name'};

But I need to pass it (the value) to the top frame. Actually, I don't know what I need to put replacing the ???.

<A href=../main_new.php?name=??? target=Main>Home</A>

Frames And Sessions
I ran into a problem and couldnt make out way it happened !. Basicly i got top bottom frames and the links target the middle frame. Now intially they were HTML files but then i needed to pass the session id so i converted it to *.php.

Using the normal method of starting a session at the start...in both the top and bottom frames....i started getting errors. I get a different sessiod id number for the top frame, the bottom frame and also the files loading on the middle frame...so in total 3 different ones !!.

Does n e one know why that happens ....and is there a solution to this problem?

Consistency Without Frames.
I am beginning a shopping cart program, and I would like it to be able to post just about any html file that is sent to it, so that I can have it inject a side menu and top menu before showing the page. Our previous cart program does this, and it looks like it takes the HTML page, scans for the <BODY> tag and then puts its form contents in, how would one go about doing this efficiently? So basically I want my PHP script to scan for the <BODY> tag, then insert the menu HTML code, and the post the page, it isn't that difficult, and really I know how to do it, but I don't know how I would scan for a <BODY> tag that may change with each page.

Sessions And Frames
I have a frameset page made up of two frames, both needing to use variables from the same session. If I call session_start() at the start of both frames, will this create 2 seperate sessions?

Frames W/ PHP Question
If I load a framset containting 2 frames, lets say..

<frameset cols="25%,75%">
<frame src="http://www.example.com" name=left>
<frame src="http://www.example.com" name=right>
</frameset>

Is there any way I can get at the code in those 2 frames from a 3rd frame using PHP? There is no way to do this in HTML or Javascript as far as I've been able to find.

Help Regarding Frames With Sessions
I am using frames in my website,main application links are present on
the top of page above mainframe, in main window. These links have
target=mainframe, thus opening respective pages in mainframe.
I have put the session timeout period on each page so if some user
remains inactive for 10 minutes, he will be redirected to logout.php...

Help With Sessions And Frames
I am using frames in my website, there are 2 frames in site. when
sessions are expired the login page is displaying in the main frame,
but the other frame as it is in above. why the above frame is not
disappearing? is it means sessions are not expired in the above
frame?

Redirection And Frames
My website contains a login page and as soon as the user succesfully
logs in, he will be directed to the homepage that contains two frames
(with cols=20%,*). The left frame contains the list of products, which
are URLs with target as the right frame. Each page that loads in the
right frame is a PHP page does session validation. If the session is
timed out or the user types the URL of the page directly in the
address bar (without logging in), he'll be redirected to login page
with appropriate error message.

Problem is, when the session times out and the user clicks on any of
the links in the left frame, the login page loads into the *right
frame*, which is not what I want. What I really want is, a way to load
the login page as the "top level page" without any frames.

Sessions And Frames
I am having difficulty with PHP sessions and frames. Here is the setup. I have Page A which authenticates a user, opens and sets sessions variables, and opens a 2 framed page, Page B. In a frame of that page, Page B, is a menu. When you click on an option in the menu it opens, in the second frame on Page B, a page that also has two frames.

My problem is that the session variables are carried from Page A to the framed Page B, particularly the menu, but after the user clicks on the option in the menu and the page loads in the second frame on page B the session is not carried over. code:

<?php
session_start();
$sessionid = session_id();?>

at the top of all of the pages. Any ideas? I would definitly prefer not to use the URL method, but if that is what is necessary I would appreciate exactly how to do it.

Problem With Frames
I have a page, where user selects a database table. After pushing search -button, user goes to a page which is in frames. User makes a query at main frame and result goes to footer frame.

My problem is that the pages don't get what database is in the question? Frame.php is in the way..everything works fine without frame.php. How to include or pass or somethinhg the variable from the firstpage.php trough frame.php to query.php page? I have used this: <?php print($DBtable);?> and I can see the information on the URL, what database is in question but not on the query.php page.

Alternative To Frames In Php?
everywhere I go, i get told "don't use frames, use php instead"

ok... so how do i go about it?

I want a top banner that doesn't move, and a "contents" type list on the
left (that may have a scroll bar)
and the rest of the window is the main page (obviously)

now, I dont want all 3 areas to be loaded/repainted when i click a link on
the contents, just the "main area"

Is this achievable in php?

Isset And Frames
I run an affiliate program, and everything was fine until I just found a bug today! The tracking script runs fine if the affiliate sends a visitor directly to (website.com/?ref=USERNAME)

However, if the affiliate uses frames or some kind of tracking service (ie, the URL displayed in the address bar will be different), the script fails to give credit to the affiliate. The reason why I'm so sure is because I retrieve the name of the affiliate and display it on the home page under "Presented By:".

This is mostly true when the affiliate is using Traffic Exchanges. Of course, Traffic Exchanges uses frames, so the URL displayed in the address bar is different from the affiliate URL assigned to each affiliate.

The referral link of each member is: Code: http://www.mydomain.com/?ref=USERNAME
And the index.php page has this script at the beginning: PHP Code:

PHP, Target, And Frames
I have a frameset with two column frames. A form is processed in the right frame. If the submitted form data were processed without errors, I want a congratulations page to be loaded into the left frame, otherwisean error message replaces the form in the right frame. Can this be done with PHP, and if yes, how?

Frames And Targetting
got a form together that browses a mysql database and all worx fine. Added a frame for the navigation buttons and i can't get it happening. The nav buttons are tested in the main frame script by using the button_name_x value since they are image buttons.

The current index is passed using a hidden field. Because the action is targetted to a different frame i can't get the $current variable to increment in both frames. I think i need a method in the form description to call a static function that increments the $current and then calls the new target page.


Copyright © 2005-08 www.BigResource.com, All rights reserved