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 Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Getting Info Using POST Automatically (without A Browser)
I'm writing a script to harvest data from a number of different sites. Some of these use a FORM with method=POST to display the data I want - however I want the script to run using CRON without any user intervention (ie. there's nobody around to press a submit button).
Putting Info Into A DB / Passing Info Between Pages
I have run into an issue...I have posted previously, but my scenario has changed. Here is the situation... If a user clicks on a link ('abc123' for example) I want to insert into my database some predefined information about 'abc123' - I have assigned a value that is echoed in future pages for 'abc123'. So, what I need is some mechanism to, when a user clicks 'abc123', have a pre-defined username and password be entered into the database. I need this so future pages can utilize the session values.
I Need Info...
I want to write a very simple PHP script that just picks random images from a directory, you know what i mean. So I'd like to know where I could find information about this in the PHP manual maybe?
PHP - SSL Info
How do i know if ssl has been enabled in a WAMP configuration using PHP ?
Looking In $var For Certain Info
I pulled certain collums from my database. The value of the collums is either Y or N. I want to figure out on each $var how many Y's there are. I don't care how many N's. At the end I'm going to add up all the Y's of all the VARs for stats. Whats the best way of counting Y's in a $var?
Getting Users Info
I need to get the following information, User's IP User's Browser User's Screensize What is the code for any of these as I can't find it in the PHP manual.
How To Get Header Info
I've been trying to extract the status codes from http header information to find whether a page is 200 ok or 404 not found by using an fsock() connection which works. To actually extract the data what do you use? i've seen fputs() and fgets() listed on the documentation page but how do these function actually work?
Info From MySql DB
Problem : I have a table in mysql with titles as such : ShipIDNameMcostCcostBuildETA(there are more) I run the query : for($i=1;$i<=9;$i++){ $query = "select Name, Mcost, Ccost, BuildETA from ships where ShipID=$i"; $result = mysql_query($query) or die("Query failed"); I want to refer to "Name", "Mcost", "Ccost" and "BuildETA" so i can use them to build a table. So i need to assign them to variables in an array so i can loop to make a table with as many rows as there are "ShipID"'s. The thing is that all the ways i have tried of refering to individual column names have failed.
PEAR/Info.php
I tried to use Example 49-1. Using PEAR_Info This is not showing PEAR installation information on local/remote server. What I see local, I've no file Info.php in package PEAR in PEAR directory. I've installed PEAR, why this file is missing? My Web host say, they've installed PEAR, and I can use PEAR.
Getting Info Into A Object..
I'm sitting and trying to understand this OOP - and need to create a class wich can do the following.. ShowBlocks() - Displays the data wich is inside it - If empty creates a form wich sends the info back to the Object, wich show the stuff.. AddBlock( $type ) - Creates an empty blok - wich is addet to a blocks area object...( Or somethin like it ) Store() - safes the info into a file, and updates mySQL... I have figured out most of the stuff but the way to get the empty block -> creating form with some different strings/textbloks and a file -> putting stuff into object -> now showing what its looks like and aking if i want to add a extra block....... now showing x blocks then asking if i want an extra block - i haven´t got a clue of how to do it ! Does anyone of you have an example with an object thats goes : See im a empty object -> here you can put an line into me -> see im not empty now ( showing the string) do you want to add an extra line ? - ect ect..
Help Need Php Security Info
I need to put on a demo of a php security flaw and how to fix it. Can anyone point me in the direction of a good doc and fix example ...
Getting Caller Id Info
I am developing an application where I need to read the caller id from an incoming call. The only info (for now) I need is the caller id info, so that I can display the propper caller info on screen if so desired. I was thinking on using asterisk (asterisk.org) for this with appropriate 2FXO/2FXS card but I do not know if this is just overkill (asterisk for this). Do you know of any other solution/way of getting the caller id and passing it to PHP?.
Getting Info From A Website.
I have been doing PHP for over a year now but when I came round to writing a script I discovered that there was a reasonably sizeable gap in my knowledge that I didn't even know where to start finding out about. Anyway this is a reasonably nooby question: If I have a script on http://url-a.com/script.php and I want to get some dynamic information of my friend's site at http://url-b.com/info.php , How can I get it? I need to use get variables in getting it and it must also be server side.
Drawing Info From D/b
I'm trying to get sum info from my database, but its only returning the first record, and not any after that Heres my code: PHP Code:
Php Form Info...
have a form, with a text input "fieldname". method POST $var = $_POST["fieldname"] $var is then used to search in mysql select * from table where jobtype like '$var%' OR jobtype like '%$var%' OR jobtype like '%$var' OR jobtype like '$var' order by date asc; basically i'm doing a search for any string that matches the searched input, being at the beginning, middle or end of the jobtype column. query works great, except when the string contains the 4-letter word 'info' such as information or informative then the mysql query breaks down and give the usual: Error performing query: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY date ASC' at line 1 Now after much debugging, i found out that the php _POST variable treats anything with info as a numner of 0 value. inf is treated as text, nformation is treated as text, but anything with info gets a 0 value. Searched php.net and couldn't find anything related to this feature, looked under security to see if it was related to that, but nothing.
User Info
How can i be able to show a users profile after they have logged in of course? But i dont want a user to edit another users profile. I am using sessions.
Php Form Info...
have a form, with a text input "fieldname". method POST $var = $_POST["fieldname"] $var is then used to search in mysql select * from table where jobtype like '$var%' OR jobtype like '%$var%' OR jobtype like '%$var' OR jobtype like '$var' order by date asc; basically i'm doing a search for any string that matches the searched input, being at the beginning, middle or end of the jobtype column. query works great, except when the string contains the 4-letter word 'info' such as information or informative then the mysql query breaks down and give the usual: Error performing query: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY date ASC' at line 1 Now after much debugging, i found out that the php _POST variable treats anything with info as a numner of 0 value. inf is treated as text, nformation is treated as text, but anything with info gets a 0 value. Searched php.net and couldn't find anything related to this feature, looked under security to see if it was related to that, but nothing. Can anyone look into it and elaborate? create a form, then echo the value of the $_POST variable and try words that contain info in them.
Verify Info Was Placed In Db...
Hey, i am having trouble finding out how i can verify that the data that i inserted into my db realy got there, and if it did to redirect me to another page. and if the data didn't get inserted to re-direct me to a diffrent page.
I'm Getting The Same Row Of Info Repeated
I need to access data from a database and repeat the display for how many rows there are...Well I figured out the whole repeat thing I just can't make it go to the next row when it outputs... Code:
Pulling Info
Here is what I I am trying to do. select * from table where fname='fname' order by 'time_sent' desc <-- This works what I am trying to do is: select * from table where fname='fname' and opened='y' and opened='n' and opened='r' order by 'time_sent' desc <-- This doesn't work :( the entries in opened are y, n, r, a I only want it to pull y,n,r and list them where fname='$fname' only I tried googling for a solution with very little luck. Anybody have any ideas how I can accomplish this?
Retrieve Info Via Id
How can I retrieve data from my database based on the item's id and how can I built it up on one page dynamically?
Cannot Write Info To DB
I had this script working for a couple days and was fiddling around with it, which now has me unable to write the form data to my db table. The email confirmations are still being sent without any problems but the data isn't being stored. I'm sure it's something simple, but I'm still new to this and just can't see it. Code:
Enter Info Into Mysql
I am relatively new to PHP and MySQL and I am testing a simple form that is not working:
Getting Mysql Table Info?
Suppose I have a table with name 'tablename' in my database. If I have no idea what are the contents of this table, is it still possible to retrieve the structural info in this table, like the field names and sizes?
Script Cannot Add Header Info
This is a contact us script that sends an e-mail to me with the the three fields i made e-mail,name and message. The script is supposed to bring the user to a thankyou page after submitting. but for some reason i get this error cannot add header info headers already sent. here is the PHP code:
Getting Table Meta Info
I can query a table in a MySQL database for meta info using SHOW TABLE STATUS LIKE 'images' That gives me a single row result of info (Name, Type, Row_format, Rows, Avg_row_length, etc. But how do get one field from that record in PHP? Here's what I have so far: $sqlstatement = 'SHOW TABLE STATUS LIKE 'images'' $result = mysql_query($sqlstatement) or die("Query failed : " . mysql_error()); I don't know how to reference a field from $result.
Editing Info In A File
I am using a tab delimited file to provide information for a page to be displayed. I have used fgetcsv() to get information from the file, and it returns an array of information. I was wondering if there is a way I could change information in the file. For example lets say that $content[2] = "This" how could I change it so that, $content[2] = "That". I know how to change the variable to a different value, but I haven't figured out how to change the actual file.
Can't Get Package Info In Apache
I can't get packageInfo of some packages installed on my system(Fedora Core 3 with bundled httpd and php): # pear list Installed packages: =================== Package Version State Archive_Tar 1.1 stable Console_Getopt 1.2 stable DB 1.7.4 stable DB_Pager 0.7 stable HTTP 1.2.2 stable Log 1.8.7 stable Mail 1.1.3 stable Mail_Mime 1.2.1 stable Net_SMTP 1.2.6 stable Net_Socket 1.0.1 stable PEAR 1.3.2 stable XML_Parser 1.0.1 stable XML_RPC 1.1.0 stable I've a simple script to check existing of these modules: --------------------- cut here ----------------- <?php include_once ("PEAR/Remote.php"); // PEAR::Remote include_once ("PEAR/Registry.php"); // PEAR::Registry $pear = new PEAR_Config(); $pear_reg = new PEAR_Registry($pear->get('php_dir')); $pear_info = $pear_reg->packageInfo("PEAR"); $pear_version = $pear_info["version"]; print("PEAR Version:" . $pear_version . " "); $Log_info = $pear_reg->packageInfo("Log"); if (strlen($Log_info["package"]) < 2) { print("Can't find Log module "); } else { print("Log module found "); } ?> --------------------- cut here ----------------- It works if passing to php directly in bash. However, some of modules can't be located using this method (DB and Log) when run it through Apache. Would anyone pls help? My PEAR config follows. --------------------- cut here ----------------- Configuration: ============== PEAR executables directory bin_dir /usr/bin PEAR documentation directory doc_dir /usr/share/pear/doc PHP extension directory ext_dir /usr/lib/php4 PEAR directory php_dir /usr/share/pear PEAR Installer cache directory cache_dir /tmp/pear/cache PEAR data directory data_dir /usr/share/pear/data PHP CLI/CGI binary php_bin /usr/bin/php PEAR test directory test_dir /usr/share/pear/test Cache TimeToLive cache_ttl 3600 Preferred Package State preferred_state stable Unix file mask umask 22 Debug Log Level verbose 1 HTTP Proxy Server Address http_proxy <not set> PEAR server master_server pear.php.net PEAR password (for password <not set> maintainers) Signature Handling Program sig_bin /usr/bin/gpg Signature Key Directory sig_keydir /etc/pearkeys Signature Key Id sig_keyid <not set> Package Signature Type sig_type gpg PEAR username (for username <not set> maintainers) --------------------- cut here -----------------
Photogallery/ Getting Info From Directory.
I am trying to create a photogallery on my website. I have pictures files in one directory, with lots of different names. The thing is, I want to 'know' all these file names and put them in an array/string. I don't have a clue though how I should retrieve all those file-names that are in that certain directory $dir. I have been browsing through the filesystem helpfiles on php, but I could not find one function that does this. Did I overlook this function, and if, what function should I use OR should I write my own function, and how would you recommend I would do that?
Info In URL (Short Question)
Sometimes on a website you see a url like domain.com?view My question is, how can i get any word behind the questionmark? I know how to get it when it says domain.com?word=view, so that's not it.
(Adding/getting Info From MySQL Db)
I need to be able to login to add names and coordinates (X and Y) into a MySQL database from a webpage and from another page, allow people to type in a name to seach for their coordinates. the coordinates can be -/+ (negative or possitive). I'm just not sure of how to do it, I'm not that far in the learning process yet. Any help would be greatly appreciated. I have created the database (no rows or anything). I also have phpMyAdmin installed.connection string: PHP Code:
GD Module – Need Basic Info...
GD module – need basic info... I want to create graphs from int arrays. I'm told I can use the GD module... I have RedHat 9, PHP4 and apache 2. I know nothing about the GD module so I need to know: How do I know if the module is installed on my computer? Where can I find some tutorials or instructions for "idiots"? Where can I find documentation like reference manual and user manual?
Info On OOP Error Systems
This is a general computer question, but I'm writing in PHP so I'll post this to comp.lang.php. I've been writing a content management system. I've a Singleton object that keeps track of all errors and stores them in an array. As things work right now, I write out each error message individually. I'm thinking that as the code grows, this system will not continue to scale. Right now my software consists of 1.4 megs of PHP code. I don't know how many error messages there are, but a reasonable guess is 1800 (I've 900 functions and classes in 900 files, and I'm guessing two error messages in each, on average). You can see an example of what I mean below, setFilterObject is a fairly standard class method, with 3 possible error messages when things go wrong. As you can see, I've written out each error message in English. There are a number of problems with this. One is that at some point I'd like to internationalize the software, which I assume means making it easy to rewrite the error messages in other languages. Therefore, I assume I'm making a mistake by hard-coding them as English. The other problem is that it takes a lot of time to write out these error messages, and the error messages constitute a growing percent of the code. I know that as software project grow some system is usually put in place to regulate error messages. Can anyone point me to tutorials or books that have good info on this? function setFilterObject($filterObjectName=false) { $imported = $this->controllerForAll->import("IntfFilter", "ExteriorFilter"); if ($imported) { if ($filterObjectName) { $filterObjectName = ucfirst($filterObjectName); $filterObjectName = "Filter".$filterObjectName; $this->filterObjectName = $filterObjectName; $this->filterObject = & $this->controllerForAll->getObject($filterObjectName, "ExteriorFetch"); if (is_object($this->filterObject)) { return true; } else { $this->resultsObject->error("In the command setFilterObject(), in ExteriorFilter, we expected to get an object called '$filterObjectName', but we could not find it.", "ExteriorFilter"); } } else { $this->resultsObject->error("In the command setFilterObject(), in ExteriorFilter, we expected to be told the name of a filter object we should look for, but we were given an empty string.", "ExteriorFetch"); } } else { $this->resultsObject->error("In setFilterObject(), in ExteriorFilter, we tried to import the interface IntfFilter, but we were unable to.", "ExteriorFilter"); } }
Submitting Info To Table?
Can anyone help me to create a simle "one field" form to submit keywords to the following table? It's a simple table, just has an ID, Keyword and Date. Sorry I do not know anything about mySQL or how to submit info to them! PHP Code:
Upload Photo With Other Info
I am trying to create a script that will upload a photo with othe rinformation the information is suppose to goto one table while the photo goes to another the problem is it chokes when trying to send the photo can anyone tell me what is wrong with this PHP Code:
Recall Database Info
Hi, I want to create a page where users can put in certain information like you normialy would in a form but when they click submit another page will load that will look like the original form the signed up with and everything they filed in that time will be there and they can make changes to that and then click submit and the changes are made to databse automaticialy.
Security - PHP Files With DB Info
If you have a file in the includes which has the host/database/login/password credentials for a MYSQL, how do you keep that totally secure? When you go to change the file attributes, should it read 644? (Owner: Read/Write Group: Read and Public: Read) or how should it normally be dealt?
Getting Info Out Of Dynamic Form
I am using the following code to produce a dynamic form. $result = mysql_query("SELECT id,weight,date FROM weekly_data WHERE weight IS NULL AND subscr_id = '$toss' AND date <= now()"); if (!$result) { die('Invalid query: ' . mysql_error()); } print"<table width=ď`%' id='catchup' border=Ɔ' cellspacing=Ɔ' cellpadding=Ɔ'>"; print "<form name='form1' id='form1' method='post' action='catchupprocess.php'>"; print"<tr>"; print"<td></td>"; print"<td>Weight</td>"; print"<td>Date</td>"; print"<td>Waist</td>"; print"<td>Measure</td>"; print"<td></td>"; print"</tr>"; while ($row = mysql_fetch_array ($result)){ //echo $result; print"<tr>"; print"<td>"; print"<input name='".$row['id']."' size=Ɗ' type='text' value='".$row['id']."'/>"; print"</td><td>"; print"<input type='text' size=ƌ' name='weight".$row['id']."' value=''/>"; print"</td><td>"; print"<input type='text' size=ཆ' value='".$row['date']."'/>"; print"</td><td>"; print"<input type='text' size=Ɖ' name='waist".$row['id']."' value=''/>"; print"</td><td>"; print"<input type='text' size=ƌ' value='$measure'/>"; print"</td><td>"; print"<input type='hidden' size=ཆ' value=''/>"; print"</td>"; print"</tr>"; } print"<tr>"; print"<td> </td>"; print"<td><input name='Reset' type='reset' value='Reset'></td>"; print"<td> </td>"; print"<td><input name='submitcatchup' type='submit' value='Submit'></td>"; print"<td> </td>"; print"</tr>"; print"</form>"; print"</table>"; ?>
Using Mail() With .info Emails?
I am trying to send an email with the mail() function to an email address on a .info domain. I get an error. Everything else is correct, because as soon as I switch the email address to a .com address, it works fine.
Where Do They Go? How Can I Gather Click Info In PHP
I was wondering if it is possible to find out what people click on, using PHP. For example, I have a PHP page with an email link and some third party links (e.g. www.someone-else.com). I want to know where people go. My own solution would be to make the link not to an email or a third-party website, but to another page along the lines of <?php //check out where it came from and where it is going //write info to database header = {where it should be going} ?> I am not sure if you can do this with email, but I am also wondering if there is an easier/smarter way to do this.
Host Info Script?
Is there a script that can tell you about your web server example proccesing power memory how many people on server.
PHP, MySQL And Snippets Of Info ...
I'm looking at storing snippets of details in MySQL about what credit cards a business excepts. Rather than have a whole column for Visa, another for Amex etc ... I am looking at having a column called payment types and inserting multiple codes ... e.g. ViAmBcCa Is this a good way of doing things? To me it'd be a lot cleaner and limit amount of Db work to be done. Is this a sensible way in your opinion? What's the best way of getting the info back out via PHP? Put in a delimiter e.g. Vi-Am-Bc-Ca- or keep codes to two digits and split by that length?
MySQL Does Not Show On Php Info
I installed Apache, php5 and MySQL 5. The usual <?php phpinfo(); ?gives the php info, but there is no sign of MySQL, so something is wrong. I installed the latest connectors. Can someone help me getting php and MySQL interconnect?
Retrieve Certain Info From A File
I am wanting to bascally do an fread() on a file with a starting point and ending point. For eaxmple: I want to retrieve text in position 60 for 30 characters and place it in a string.
Retrieving Flash Info In PHP
Does anyone know how to retrieve Flash info in PHP? Meaning, I need a script to extract the framerate of a SWF file. Is this possible? How to read flash file's headers, as framerate is probably in the header?
Info Into Message On Email
i have a first page where they put like, comments or something, then they click submit to sendmail.php, im using the mail() and i know how to send it to people, but how do i get the comments into the message body? ive tried at the top of my script: $comments = $_REQUEST['comments']; $comments = $_POST['comments']; $comments = $_GET['comments']; then in my mail () code its like this PHP Code:
Retrieve Header Info ?
I'm looking for a way to retreive header("location..."); info from external urls (assuming they are indeed using header("location..."); I was told to use fsockopen to open the url, and after that there should be a way to retrieve the header info, can anybody tell me exactly HOW I can retrieve that header info using fsockopen ?
|