Identifying Browser
Is there a way to identify the brwser a visitor to my site is using? I would like to include site style based on the visitor's browser. If their us IE show layout one way, if their using Firefox show it another way...etc...etc.
View Complete Forum Thread with Replies
Related Forum Messages:
Identifying People
on my website i'm finding people are coming back and signing up again and again... how can i log them so i know who has logged in before. was thinking IP but does this not change per session online with dial up?
View Replies !
Identifying A Value Range
i have a form that submits to a php file, the form basically has a hidden field called number: <input type="hidden" name="number" value="12"> i know how to read the value of that, its simply putting <?php echo $_POST['number']?> but what i want to do is check if the number is between 1 and 25 and if it is then echo A else if it is between 25-75 then echo B else if it is anything above 75 then echo C .
View Replies !
Identifying SSL Clients
I have a site that uses PHP sessions through SSL, my employer does not wish the site to require cookies so I have switched on the use_trans_sid option for users who have cookies disabled. The problem I have is stopping session hijacking. If I am on a page "https://secure.mysite.com/page.php?PHPSESSID=XXXXX" And I email the url to someone else they can get onto the site without being challenged for a logon. I am trying to find a way to check that the connection is still coming from the same SSL connection, e.g. by checking the clients public key, but I can't find a way to get any information about the SSL connection from PHP.
View Replies !
Identifying An Image
Ive got a tracking system which tracks how many times a user clicks on an advert on my site. At the moment all the listings are set as one so when a user clicks on that advert it gets one click. However, one of the adverts is now going to contain two images advertising two separate companies. Ive set it up so the images and urls are different and they go to their own websites and in my tracking table i have just added an extra column called image and the number 1 goes in if image 1 is clicked on or 2 if image 2 is clicked on. However, to display this is the bit im not sure about. At the moment its displayed in a table like this: Advert Name Category Number of clicks Advert 1 Shopping 257 However, if advert 1 has two images, meaning two separate companies, how can I show this in the above table?
View Replies !
Identifying The Clicked Record
i already know how to load the my list of suppliers using mysql/php/apache, but what i would like to do now is put a link for each and every supplier and when someone clicks it, they will automatically go to that supplier's list of products. i want something like this: SUPPLIERS TABLE supplierID, Name, Address, AA Alfin21 1506 w. 66th street <>EDIT<>
View Replies !
Identifying Search Engines
my website is pretty much database driven and i've typically parsed the data in PHP and just output flat HTML. however, i'm trying to save some badwidth by spitting out just the critical information, and have javascript parse out the data. however, i'm kinda worried how search engines would react to this. (especially google) would search engines ignore the keywords if they are inside javascript tags? how do i detect search engines? maybe i can just setup a special script that output's "search-engine-friendly" output.
View Replies !
Identifying Black Images
I would like to be able to identify completely black images in order that I can exclude them. I am thinking I could use gdlib but I cannot find a suitable function. If I can find the rgb of the image then I can exclude it.
View Replies !
Identifying Individual Users
I know that you can identify users using an ip address. But what if you have several users with different computers in one room sharing the same ip address. Is there anyway to differentiate each individual. Is there a unique signature from the computers that can be used?
View Replies !
Identifying Parts Of A String
$url = /blah/elephant/spaghetti/page.php This gives you the whole path. But how can you identify each directory in the url individually? ie. I want $one to equal 'blah', $two to equal 'elephant' etc.
View Replies !
Identifying Off-site Links
Is there an easy way to identify off-site links using php? For example, on a forum site like phpbuilder.com, I'm looking for code to flag posts that contain: Code:
View Replies !
Identifying A Page Via Hyperlink
I have a page (product_wide.php) that displays sale items. In that page, I "include" a 2nd page that contains hyperlinks to general item categories. The hyperlinks in filternavbar point to product_wide, and display items from the category selected. I need a way, using the same hyperlinks I am using now in filternavbar, to tell, from product_wide, that it was from filternavbar that the link was clicked (as opposed to some other page in the site that takes you to product_wide. I can't change the configuration of the filternavbar url because of duplicate content issues with google.
View Replies !
Identifying Dynamic Form Fields
User goes to page which is a form that asks for some basic info regarding returning products for credit/exchange, and also asks for how many products are going to be returned. Upon submitting, a return authorization form is presented to them with the specified number of product fields. I now want to take the input from this form and email it to myself, as well as, display a confirmation page to the user. The problem I have is a can't say, for instance, echo "$field_name"; because field_name will get created dynamically after the user specifies how many products to return. For example, say the user says 5 products, this will generate a form with field names like: return_code0 inv_num0 qty0 product0 cre_exch0 stockout0 return_code1 inv_num1 qty1 product1 cre_exch1 stockout1 return_code2 inv_num2 qty2 product2 cre_exch2 stockout2 and so on.... These get created with a for() loop. Once this form is submitted, how can I address the field names? Code:
View Replies !
Identifying Non-Supported Characters In A TTF File With GD?
I've managed to get GD working (mostly anyway) on my site - and am utilising the "imagettftext" function. I am using this function to display individual characters on my website - with a nominated Font. However, sometimes the characters in my StringText are not supported by the particular font that I am using ... Directly from http://www.php.net/manual/en/function.imagettftext.php imagettftext - "If a character is used in the string which is not supported by the font, a hollow rectangle will replace the character." Can anyone suggest some code that would: 1) compare/look at the StringText supplied within the "imagettftext" function (in my case the StringText will comprise of a single character only) 2) where the supplied StringText (ie character) is NOT supported by the font, then I need for that character to be reported as not supported. ie. either; return a flag or skip the non-supported character entirely - rather than displaying the standard "hollow rectangle".
View Replies !
Identifying Opening Link For Database Query?
I've got a tricky problem i need to solve, i'm building a banner exchange type site in which there are already about 100 banners so i've had to code things around what already exists to a certain extent. Now each of the banners that go out on other sites have a link on the banner which pops open a window with details of the banner. this would be fine if all my banners were gifs and jpgs but there are also swf and dcr banners so i have no real control over the actual link on the banner. up until now each banner had a html page made for it so when you clicked on a banner it would open a page banner_1.html which had the details of that banner. for obvious reasons i'm going to replace all these redundant pages and put a htaccess redirect at their url to all redirect to a common page popup.php so all details will be dealt with in one file. ok this is fine but my problem is in this page popup.php i need to identify the link that just opened the window so that i can then get the info from the database to put on the page.. remember i can't use the url like so... bannerpage.php?thisbanner=1 but all existing links have unique addresses, is there a way to do this, i'm pretty sure there must be but i can't get my head around it?
View Replies !
Identifying Auto Increment Values For Each Of The Fields
I have set up a database i mysql, identifying auto increment values for each of the fields (eg AdminID). I was wondering how i can set up a form which will, when i go to add a new member, have the autoincrement value already present in the field and i can continue to input the rest of my data as usual.
View Replies !
Identifying User's Pick From Selection List
I have an application that uses PHP to access a MySQL table and extract rows which match the user's search entry. Data from the matching rows are loaded into an HTML selection list, and the user can scan the list and highlight a selected item. My question: In PHP, what is the syntax for identifying which row is highlighted? My goal is to pass the unique row ID of the selected item to a subsequent form where all the fields will be displayed for the user to edit. I already have the code that loads the selection list and the code that displays the fields. I just need to know how to determine the highlighted item. I have two PHP books, and both discuss loading the selection list, but there is no mention of what to do next.
View Replies !
Form, Type=file And Identifying By Isset()
Windows XP PHP 4.4.2 Apache 2.2 Register_Globals = Off Safe_Mode = On ----------------------- Hi All, I am having a problem getting a file browse input field to be recognized on the next page. Let me show you... page1.php Contains a web form with a file input to attach a file using a browse button. <form method='POST' action='page2.php' enctype='multipart/form-data'> <input name='uploadFile1' type='file' id=uploadFile1'> page2.php contains a validator to check the input and perform an action based on whether or not the browse input field has been populated. // IF THE POST CONTAINS A FILE UPLOAD, PROCESS SECTION 1 IF NOT PROCESS SECTION 2. if (isset($_POST['uploadFile1'])) { echo "File is attached so print this."; } if (!isset($_POST['uploadFile1'])) { echo "File is NOT attached so print this."; } If the user uses the browse button on the form page to populate the field with a file path to a file on his pc, then I expect to see the "File is attached message". However, regardless of whether someone does or does not browse a file, the message is always that they have NOT browsed a file and the variable "uploadFile1" is effectively left unpopulated. OUTPUT File is NOT attached so print this. Conversley, I thought I might be able to use the _FILES variable instead of _POST, but I get the exact opposite, that the browse field is populated all the time whether or not someone has browsed a file or left the browse field blank. if (isset($_FILES['uploadFile1'])) { echo "File is attached so print this."; } if (!isset($_FILES['uploadFile1'])) { OUTPUT File is attached so print this. So, I am missing something. Can someone give me some direction so that I can simply identify (with register_globals = Off) whether or not an input field (input type=file) has been populated or left blank? Is this even possible? What am I missing?
View Replies !
Voting System - Identifying Voter And Integrity Of The Vote
I am trying to setup a voting system for our intranet (staff awards - free text fields). I have the database adding the votes no problem. What I would like to do however is the following: 1. It's our intranet, there is no need for each person to login so it just uses "user/user". However I need to capture the person's login on the vote record so I can identify who voted. 2. restrict the users to one vote each. I have done some research and it looks like I have to create a cookie.
View Replies !
Identifying Different Unicode/utf-8 Types Inside A Text String
I am dealing with a script that reverses a string that is in hebrew, so I can display it properly when I write that string onto an image, however sometimes the string might be half hebrew half english, so I need a way to identify what language is in the string and only reverse the hebrew parts. in technical terms the hebrew text is encoded in utf-8, and the english text will be encoded in the normal encoding for english, (anscii, latin-swedish whatever, i dont know the name of that encoding) so the simple question is how do I identify different types of encoding within a string? that way I can break up the parts that i identify as being utf-8 and reverse only those (yes I am well aware of methods to display hebrew properly in php, but when writing to an image this is another story, only method i found so far is reversing the hebew text string)
View Replies !
File_get_contents - Making A Browser Within Browser
im making a browser within browser (dont bother asking why), but the problem is when i use file_get_contents, it works, however, the original HTML doesnt use absolute locations of images etc... so it tries to look for them on my server . I tried using str_replace to change it but i cant distinguish between things which are relative and absolute references...
View Replies !
PHP Outside Of Browser?
I am working on several projects using PHP and MySQL and two of them will require monitoring incoming data from a source other than a browser, query the MySQL and send data to another non-browser output. I would like to do all in PHP, if possible. If not, any suggestions on a language for Linux that has easy interface to MySQL?
View Replies !
PHP Won't Run In Browser
for some reason when I goto run a PHP script in my browser, it tries to open/save the file instaed of actually running the script. I did do: AddType application/x-httpd-php .phpadded to httpd.conf But is there something else I'm missing in my setup?
View Replies !
Browser For PHP
Does anybody here know of a good tool for PHP that can aid refactoring when you're OOing? Something like a refactoring browser as in Smalltalk.
View Replies !
Browser
I try to access a php page, instead of running the script, I get a 'open/save as' application window. I tested to see if php is running using phpinfo() and it popped up fine, but when I try to pass a var or access the page using firefox or IE it treats the php page as a file to be opened rather than script to be run.
View Replies !
Browser
I have a simple form that calls a .php script once submitted. It's currently on a Linux server. The form data is sent via method="post" but the data isn't being sent by the browser. I have tested the form and .php script on another server on a different network and it works fine.
View Replies !
PHP In Browser
I've been viewing my php files fine using my localhost and MS windows and apache server. However, when i uploaded the files to my linux/ apache server, i can no longer view my files.. instead, it opens in dreamweaver. I've got AddType application/x-httpd-php. php in my conf file.
View Replies !
Emulating A Browser Using Php
I'm trying to access a web using php (fread) to parse bits of info from it but doesn't appear to work as the .asp page has probably been set to redirect php requests to a basic error page. Can anyone post point me in the direction to find any code that will appear the request is coming from a browser with all the usual User-agent stuff in it.
View Replies !
Browser Or Php Problem?
I have a form that is very large 289 fields and it occasionally has a display problem where all the fields are mushed (for lack of a better term) together and the user can not click into the field because the display and the coordinates are not aligned.
View Replies !
Browser Not Supporting Php
With my XP Pro, I have installed php5.2 plug in. With my IIS, I have a index.php(display today date) in my c:Inetpubwwwroot, when I open my browser, goto http:localhostindex.php, the page didn't show me the date, it only show me the text which is coded with html. what is the problem? Any ideas? How can I test whether my IIS support php or not (even I have install the plug-in). Where can I get these info from?
View Replies !
PHP And Lynx Browser .....
I'm having problem running lynx at my server with my web browser. I set all the default installation for the lynx web browser at my server but when I tried to run a php file that will execute the lynx thingy, it will give me permission denied problem. First of all, I had tried to install that on other servers and it works perfectly fine but then when I tried to install at another server, it won't work. It will still give me permission denied problem. PHP Code:
View Replies !
Browser Resolution
I was wondering if it is possible to test the clients browser size and resolution with php4. Could this be done with server side code or would it need to be done with javascript?
View Replies !
Browser Choking
I am working on a wireless application that may be too big. I put my functions in an included file so that the load on the wap browser would be reduced. Then I tested my code in an http direct browser to check for errors in script. Everything seemed fine until I tested my site through a gateway. It timed out on me after about a minute. Is there something else that I am missing or am I just trying to do to much with wml.
View Replies !
Reading As Browser
I have a file, for example... lets say it looks like this: ----------- <HTML> <BODY> MyStuff <?PHP do some php stuff ?> </BODY> </HTML ---------- I need to read it into an array/variable, however, I need to have the php code already executed, as if I was reading through a browser, instead of strait off of the disk. I can't have it simply printing... like require or include would do... I need it as a variable... I considered eval, but that doesn't return anything.
View Replies !
Browser Issue
I have written the following code as a test, (yes I know it is a resource hog). Basically it pulls all images out of a MySQL table. <?php $conn = mysql_connect(host, user, pass); mysql_select_db(testuser, $conn); $query = "SELECT * FROM gallery"; $result = mysql_query($query, $conn); echo "<table width="50%" align="center">"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>$row[NAME] <br> $row[DESC] </td>"; echo "<td><IMG SRC="data:image/jpeg;base64," . base64_encode($row[IMG]) . ""></td>"; } echo "</table>"; mysql_close($conn); ?> Now I don't know where my problem is, but, when viewed with firefox, the images load correctly, however when viewed with Internet explorer, the images do not load.
View Replies !
Folder Browser
I'm looking for some sort of php folder browser - basically if i have the following folders; index index/welcome help help/email help/web docs in one pull down will display the folders index, help, and docs - where as menu 2 will display the folders that lie in index, help or docs.
View Replies !
Why Appears A ?> On My Browser?
I had wroten two closing tags of scripts (?>), but I read again all the script, and I didn't found it. Then I deleted the supposed unnecesary ?>, and I get a parse error, just in the <html> line... Of course! The PHP preprocessor needs the ?> to end the PHP script! The question is: Why appears a ?> on my browser, although I just copied and pasted some script I wrote before, modifying some variables, that was working perfectly (without writing any ?>)?
View Replies !
How To Tell Cmd Line Vs. Browser
I have a script that will be run as a cron task every night but occasionally will run when request by the browser. When run by the browser, I want it to output results to the screen. What's an easy way to tell how my .php file was invoked?
View Replies !
PHP 4 Sessions, Browser
I am experiencing a very strange problem with sessions. My site has session variables which are populated with data based on the users login name and password. I have written some debug code to "watch" the state of the variables during a session. What I am seeing is quite disturbing and I am not sure if it something I am doing wrong or a php bug or browser bug, or a problem with my host etc. If I hit the site with IE 5.5 I can log in, and get the welcome screen with the users name and the content of the session variables displayed at the bottom of the page. If a collegue of mine tries to log in with IE 5, no name is displayed and naturally nor are the session variables. However if I look in the /tmp directory on the host a new session file has been created, I can't view it's contents as I don't have sufficient priviledges, but it contains the same number of bytes as the session variable that is create for the user when I log in with IE 5.5. At this stage I can only assume the same data is being place in the session file, but for some reason it is not making it to the browser. Some more to consider, it does the same for K-Meleon (an open source browser using the Mozilla engine). And the problem does not occur when my collegue is working on the site locally (running apache and PHP on win2k).
View Replies !
Browser Statistics
I would like to have a script like http://www.hscripts.com/scripts/php...rStatistics.php but with more options as firefox, netscape, safari, etc...
View Replies !
Browser Cache
I'm working on an 'e-commerce-like' site, where users can look at catalogs, look at items description, and put items in shopping carts. Most of my pages are dynamically generated (using PHP4), with the contents pulled from a MySQL database. The problem is, for example, from the catalog page I click on an item to see more detailed description (which is also dynamically generated). But then, if I want to go back to the catalog page by clicking the browser's Back button, I'll get a page saying that the page that I wanted has expired or no longer available.
View Replies !
Browser Caching ?
Let's say I have a page that is primarily HTML but I added a few small parts that are PHP, for example a random banner. The page is in no way PHP driven, it just has some some random stuff like the banner and/or a tip of the day. What bothers me is that the PHP page won't be cached, so if the page has a lot of links and, on average, the user clicks ten links (hitting the back button after he does that) my bandwidth usage increases tenfold. I think I can send cache headers but I don't know much about them. Is it possible to set it for, say, an hour so that if he hits the back button he'll get the same banner/tip of the day that he originally got (because he's looking at his cached page) and only after an hour will he get a new random banner/tip ?
View Replies !
Browser Authentication
I need to write a script which will pass paramters to another web page which will then return an XML result. I then loop through the XML data to get the relevant data and use that data to reform some Links. I need some guidance on a few items. 1) The script is password protected with a password, how can I auto-authenticate and pass a username and password to the browser automatically? This script will run on the backend so there will be no user involvement. 2) Once I am authenticated, can I simply use fopen to get this page? 3) If yes to the above, can I then use simpleXML() to loop through the data to find the relevant pieces?
View Replies !
Browser/OS Info
Is it possible to make (or find if one is premade) a php file that will check the users browser and operating system info and see if they have things like the flash player installed (and check the version on that too), then if they need it, open up links to the pages where they can update? I'm totally fine with having to go out and find the pages to update stuff and manually set variables for the most recent versions myself, I just need to know it its possible to check all this information and process it this way.
View Replies !
|