RE: [PHP] Re: Host OnLine ?
Why not use ping like ? $bob = exec(ping -c 1 php.net); echo $bob; ? -Original Message- From: Arcadius A. [mailto:[EMAIL PROTECTED]] Sent: Monday, August 06, 2001 10:17 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Host OnLine ? What if the host I'm checking is a simple workstation not running neither a HTTP nor a FTP server ? I'm writing this script for an intranet to check which machines are currently on ... Thanks Arcad Arcadius A. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello ! Is there any function in PHP returning true or false or something similar when a given host is online or not ? Basically , I'm in need od something ping Thanks ... Arcad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Example high-profile PHP sites
www.insight.com is a publicly traded fortune 1000 company. The site is 50% php now and will be launching its new site this week that will move it up to 90% php. a demo will be available today. -Original Message- From: Maurice Rickard [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 26, 2001 10:14 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Example high-profile PHP sites While I do appreciate people's contributions, let me frame the discussion a little. The person I need to convince is an administrator of an organization within North America, and he's never heard of PHP. The response I'm hoping to provoke in him is something like this: You mean _ is using this PHP thing? Wow! They know what they're doing, so we'd better use it, too! Does this help frame things? Thanks for the suggestions! -Maurice At 10:59 AM -0600 7/26/01, Unni wrote: If every one is giving their website about mine http://www.malayalamovies.com -- Maurice Rickard http://mauricerickard.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] File upload error
that sounds like a permissions error. check the permissions for all of the directories and the file along your path. -Original Message- From: Data Driven Design [mailto:[EMAIL PROTECTED]] Sent: Friday, January 26, 2001 1:04 PM To: [EMAIL PROTECTED] Subject: [PHP] File upload error I have a script that works fine on my server but gives this error on the server where I need it. Warning: File Upload Error - Unable to open temporary file [./php06339aaa] in /home/sites/site9/web/photo_admin/upload.php3 on line 138 Could someone point me in the right direction? Thanks. Data Driven Design PO Box 1084 Holly Hill, Florida 32117 http://www.datadrivendesign.com http://www.rossidesigns.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] rand(), mt_rand(), and my inability to make either of them random.
this is a function that I wrote to solve this problem, but it is almost impossible to get a truly random number you can get somthing pretty close by seeding with somthing like the time function, using the seconds since epoch and this should be hard to duplicate. ?php function random_number($config, $lownum, $highnum){ $time = date(U); $seed = srand($time); $rand = rand($lownum, $highnum); echo "FONT FACE=\"$fontstyle\" SIZE=\"$fontsize\" COLOR=\"$fontcolor\"$rand/FONT"; $lownum = "1"; $highnum = "100"; random_number("config.inc.php", $lownum, $highnum); } ? -Original Message- From: April [mailto:[EMAIL PROTECTED]] Sent: Friday, January 26, 2001 1:50 PM To: PHP General Subject: [PHP] rand(), mt_rand(), and my inability to make either of them random. I have this scriptlet: $items = 6; $randnum = rand(1,$items); echo $randnum . "brbr"; Always, no matter how many times I hit refresh, it'll always return the lowest possible value, in this case 1. If I have rand(4,$items), it returns four. So I tried mt_rand(), with this: $items = 6; $randnum = mt_rand(1,$items); echo $randnum . "brbr"; This always, without fail, returns the highest possible value. 6 in this case. I'm using Apache/4.0.3pl1 on Windows 2000, locally, just to develop. Could this be a cache type problem? Could the gods be conspiring to drive me steadily insane? April -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Check for Page
Try this: ? $filename = "dat.txt"; if (file_exists($filename)){ echo "file exists"; } else { echo "file does not exist"; } ? Robert W. Collins Web Developer II Insight / TC Computers www.insight.com www.tccomputers.com -Original Message- From: Karl J. Stubsjoen [mailto:[EMAIL PROTECTED]] Sent: Friday, January 26, 2001 1:58 PM To: PHP Mailing List Subject: [PHP] Check for Page How could I: How could I check to make sure a page exists before I redirect to it (a page within my own server, but page name passed in querystring - therefore it could be changed by client)? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] HELP!!! $PHP_AUTH_USER!!!!!!
Try this: ? function authUser($username,$password,$realm,$message) { if (isset($GLOBALS["PHP_AUTH_USER"]) (($GLOBALS["PHP_AUTH_USER"] != $username) || ($GLOBALS["PHP_AUTH_PW"] != $password))) { header("WWW-Authenticate: Basic realm=\"$realm\""); header("HTTP/1.0 401 Unauthorized"); echo $message; exit; } elseif (!isset($GLOBALS["PHP_AUTH_USER"])) { header("WWW-Authenticate: Basic realm=\"$realm\""); header("HTTP/1.0 401 Unauthorized"); echo $message; exit; } return true; } authUser("test","test","mine","You are not permited to access this area!BRBRtry:BRpassword : testBRusername : test"); $title = "Password"; echo "OK, you can look at this page!"; ? -Original Message- From: Bruno Freire [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 23, 2001 10:45 AM To: '[EMAIL PROTECTED]' Subject: [PHP] HELP!!! $PHP_AUTH_USER!! Look I justs wanna make that password box show up in the screen But without a protected directory... Thanks Bruno
RE: [PHP] decimal point movement...
Christopher, try a regular expression somthing like this ? $temp = "007170"; ereg ("([0-9]{2})([0-9]*)", $temp, $test); $changed_to_deicmal_form = $test[1].".".$test[2]; echo "$changed_to_deicmal_form"; ? Robert -Original Message- From: Christopher Allen [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 18, 2001 11:35 AM To: php Subject: [PHP] decimal point movement... Greetings! I am looking for an efficeient way to assign a decimal to a number and store the new number. I wanto add a decimal point after the first 2 leading digitis.. while ( query runs) { $temp=007170; $changed_to_deicmal_form; // would store .7170 } Furthermore I was using printf to round up numbers...has anyone found a different or better way? Christopher C. M. Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] REGEX for tag attributes?
Thomas, Not sure if this si what you want but it may start you in the right direction. ? $bob = "div key1=val1 key2 = val2 key3='val3' key4 = \"val4\""; preg_match_all( '/\S*\s?=\s?\S+[^]/', $bob, $match ); foreach ($match[0] as $match_result) { echo $match_result."BR"; } ? Robert W. Collins Web Developer II Insight / TC Computers www.insight.com www.tccomputers.com -Original Message- From: Thomas Angst [mailto:[EMAIL PROTECTED]] Sent: Monday, January 15, 2001 5:47 AM To: [EMAIL PROTECTED] Subject: [PHP] REGEX for tag attributes? Howdy, I need to divide several attributes of a tag. div key1=val1 key2 = val2 key3='val3' key4 = "val4" how can I do this without too many time lost? Is it possible to do this with a regular expression? Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]