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.
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 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?
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 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 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?
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?
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.
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 ?
Detecting Line Breaks In A Text Area?
This is really frustrating... I have a form in which there is a text area for people to post comments on the site. I'm hoping that people will take the time to fill out reasonable length responses which my spread over two or more paragraphs. My problem lies there; it might spread over two paragraphs... I know I can use 'special character(s)' which the user can put in that I can then do a ereg_replace() to put the <p> or <br> tags in but I would prefer that they didn't have to... like for instance in this forum I've tried to see whether there are any line breaks or something in the textarea when a carriage return has been made but I can't seem to pick anything up, has anybody managed to come up with a solution to this?
Dual Array: For Detecting Invalid GET Values?
I'm not sure what the terminology of it would be but I would like to do what I'm referring to in my head as a dual array or maybe a parallel array? I have a list of properties that can be manipulated with certain values. However I would like to detect when a GET request with a non-existent property or an invalid value occurs. I'm using CSS terminology here too so let me clarify visually... Array Sample property, value, ( audio, 0, audio, 1, audio, 2, bandwidth, 1, bandwidth, 2, browserpatch, 0, browserpatch, 1, dhtmleffects, 0, dhtmleffects, 1, dhtmlengine, 0, dhtmlengine, 1, dtd, t, dtd, s, dtd, 1, dtd, 2, mediatype, xx, mediatype, ax, mediatype, tx, mediatype, th, ieccss, 0, ieccss, 1, powerkeys, 0, powerkeys, 1, theme, classic, theme, cityblue, theme, emerald, theme, lavender, ) These are examples of my working properties and values. If I could keep the list like it is right now with minor modifications to get it working it would be great as I plan on adding further options in the future. However I'm not exactly sure how I should approach this. Also this is important as I have tested invalid values and it broke the page once while being served as application/xhtml+xml so this could potentially lead to loosing visitors if I do not address this issue. Suggestions to create this error handler script?
Detecting Whether Or Not A Query Has Results (if Statement Problems)
this is the situation. a person comes to a login page, with a form. they type in their password and username. the form sends it to another page, which tests the username and password against the records in my mySQL database. i want to do an if statement where if their username/password match, then they do so and so (write a cookie, display text saying hi, so on so forth) BUT, if their username/password does NOT match, it gives back a message saying they are not logged in, etc etc... i can get it to do the log in part correctly, just fine. but how do i detect an incorrect match in the database. here is what i have: Code:
Is_dir() And Opendir() - Detecting Sub_directories And Echoing Them?
I am working on a single script to: 1) create a menu of directories containing photos (jump to script below) 2) output all the thumbnails of each photo (linked to photo itself) within each linked directory I have step 2 solved. However, as I was about to solve step 1, I mucked up my code so badly I lost it. I simply want to output all the sub_directory names within a directory. my structure is as follows: ../images/photos/group ../images/photos/sports ../images/photos/outdoors etc. The script itself is currently located in the images directory but could also be located in the photos directory as I want to detect all sub_directories of photos. Here is the part of the script that is supposed to do what I want in step 1. PHP Code:
Detecting PDF Files In A Folder And Sorting Them By Date
I am about to write an application that will display all pdf files in a folder and display them by file name in order of date. Is there an easy way of doing this? I was thinking about somehow adding filename and date created in an array, sorting by date and then printing onto an html page with a link to that file. How would I do this though? Is this the simplest method or is there a better way of doin this?
Regular Expression Detecting Entire Page
I am making a flat file, static HTML search engine for a site. I downloaded a script from the net and have been working with it for my needs. Everything was working OK with a few test Lorem Ipsum pages. But the moment I try to search real data, fit hits the shan. The script uses a regular expression to search through the files. And for most of these files, the regular expression doesnt seem to pick up the matches as it should, and for lack of a match, it outputs the entire html page as a hit. The search word is on the page somewhere, but it still outputs the entire page. Allow me --------8<---------------------------- if(preg_match_all("/((sS*){0,3})($keyword) ((s?S*){0,3})/i", $portion, $match, PREG_SET_ORDER)); { if(!$limit_extracts) $number=count($match); else $number=$limit_extracts; for ($h=0;$h<$number;$h++){ // no limit if (!empty($match[$h][3])) $text = sprintf("... %s<font class='keyword'>%s</font>%s ...", $match[$h][1], $match[$h][3], $match[$h][4]); else{ //print_r($match); } } } --------8<---------------------------- There's the regex that looks through $portion, which is the strip_tags version of the file's contents. And if I echo $portion right before that line, I see the stripped code. However, when I get to the line where it checks $match[$h][3] for the keyword that was searched for, it craps out. Not 100% of the time, but most of the time. Im trying to figure out details about these html pages, to no avail. So as a result of failing that empty test, the entire html page is dumped out as a search result. Not being a regex expert, Ive had a hell of time troubleshooting. But I feel the problem lies in there. Something with the regex not finding the keyword correctly, or something.
Detecting User Abort Or Timeout [download Script]
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.
Detecting 404 Aqnd Other Page Errors On A Remote Website
Is it possible to detect page errors such as 404 (page not found)? I've searched good but can't find anything, or i'm not looking in the right places. If so, would you be able to detect it even if a htaccess redirects it to an error page?
Php And Flash
How to send a simple variable like a result from a query to Flash?
Php And Flash
I'm just getting my feet wet with PHP. I'm trying to load variables from cookies that are connected to a MySql database. I have a php login script already and am trying to create a flash interface for it. I can't seem to get the variables to load into flash from the cookie that is in the top of the html page. If anyone knows the process I would be totally in your debt.
Flash, PHP & XML
Is anyone out there doing anything in terms of parsing in XML into Flash using PHP as a go between so to speak? I have done some stuff parsing XML directly into Flash but I ntoiced a huge speed hit. Anyways, I was wondering if anyone has done anything or has seen a way to parse XML into Flash via PHP.
Flash And PHP
Can Flash tack over a variable (string, array, a object, ...) from a PHP - Script? When yes, such as.
Php And Flash
Is there any good resources (tutorials) out there that topic php scripting into a flash presentation with actionscripting? Any advice would be apreciated as I only found one site so far and it didn't take up to much about the subject.
Php/flash
I have a text field (multiline) in Flash. When I click "submit" it hits a PHP script. The PHP file sends the message in the text field to an email address. My problem is that when i receive the email, the message is joined together, not recognizing the line breaks that were made on the Flash end. Does the variable of the text field need to be manipulated before it gets posted to the php file?
Re:FLASH MX
I presume PHP sience you are in the php forum?
PHP Flash
I am connecting PHP & Flash.. $var = $this->_nm->getVar(); <-- Get data from database $var1 = gettype($var); if (is_string($var1)) { echo "s=".$var1; } If i print in the browser, it will return s=string, however if i LoadVars in flash it will return s=NULL
|