[PHP] Re: Checking if

2005-01-11 Thread Ben Ramsey
Bruno B B Magalhães wrote: how to determine if the last char of a string is a '/'... The problem, a webpage can be accessed by www.domain.com/page.php or www.domain.com/page.php/ Use substr()... http://www.php.net/substr $url = 'http://example.com/index.php/'; if (strcmp(substr($url, -1), '/') ==

[PHP] Re: Checking if a website is up?

2004-03-30 Thread Jason Barnett
Henry Grech-Cini wrote: Hi All, I am trying to check if a website is up (reachable) and I have used the standard code below: Unfortunately this works for most sites but Microsoft doesn't work most of the time even thought the site is definiately up! (Occassionally it does say it is reachable but

[PHP] Re: checking if a link is still "alive"

2002-03-21 Thread Julio Nobrega Trabalhando
Open a connection? Maybe fopen, dns search, ip search, anything. I just don't know which way is faster (I think it's fopen). -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

[PHP] RE: checking if a link is still "alive"

2002-03-21 Thread Christoph Starkmann
Outsch, sorry, I just found what I wanted... > Is there any posibility to check if there is > actually a website behind a link or just, let's > say a 404? http://www.hotscripts.com/PHP/Scripts_and_Programs/Link_Checking/ Have a nice day ;) Kiko - It's not a bug, it's a feature. christoph s

Re: [PHP] Re: Checking if session has been started

2001-09-22 Thread Alexander Skwar
So sprach »Fredrik Arild Takle« am 2001-09-22 um 18:00:37 +0200 : > session_register("valid_session"); > > OR SOMETHING LIKE THIS? > > if (session_is_registered($valid_session)) { Yep, that seems better. Thanks to both of you! Alexander Skwar -- How to quote: http://learn.to/quote (germ

[PHP] Re: Checking if session has been started

2001-09-22 Thread Fredrik Arild Takle
session_start(); $valid_session = true; session_register("valid_session"); OR SOMETHING LIKE THIS? if (session_is_registered($valid_session)) { // Do something?! } "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Why not populate a

[PHP] Re: Checking if session has been started

2001-09-22 Thread Gaylen Fraley
Why not populate a session variable, in the page that starts the session, like : session_start(); session_register("valid_session"); $valid_session = true; Then in the page that you need to check, like: if ($session_valid) { // Do something since a session is already running } -- Gay

[PHP] Re: checking if checkbox is checked

2001-07-06 Thread George Whiffen
To check if a type checkbox variable has been set use isset() i.e. if ( isset($interest) or isset($interest2) or isset($interest3) or isset($interest4) or isset($interest1) ) { // Everthing is ok } else { $error = . ) This should do exactly what you want, and a