Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Redirection And Server Availability


I have two servers, one hosted and one local. My local server uses dynamic dns and I am trying to write a script on my hosted server that will check to see if my local server is accessible. If it is accessible I would like the script to do a browser redirect to my local server. If the connection can't be made I would like the script to be in the header of an index page on the hosted server or redirect to a valid page one the hosted server. From what I've found on the net it should be possible using socket() but am not sure how to go about it.




View Complete Forum Thread with Replies

Related Forum Messages:
PEAR Availability
I'm starting to look into PEAR, and it looks like there's some interesting
stuff in there. I'm wondering how much I can rely on it for a distributed
app. If I understand correctly, it's now included in the PHP distro, and
installed by default. What version did this start with? Is the default
installation just the base class, or are some of the packages included as
well? The tricky question is: does anyone have any idea of how commonly
it's installed? Do most hosting companies provide it? I know end users can
install it for themselves, but I have enough support issues without having
to hold users' hands on that.

View Replies !
PHP Availability Calendar
Do you guys know somewhere where i can find a script which creates a Calendar which can be controled via a database, so if a date is "occupied" then the date will be marked at BOOKED.

View Replies !
Availability Checker
I'm trying to build a site for Broadband and I am wanting to put a Broadband availability checker on my site like alot of other site have, However i am quite  new to PHP. Could someone point me in the right direction as how to go about producing the above?

View Replies !
Availability Calendar
where I could get a PHP based availability calendar for a holiday apartment website? I currently have the calendar as a html tables based affair that is updated via DW, but I am trying to migrate the site to PHP and wish to introduce a web based calendar that can be updated online.

I am looking for something similar to http://www.lanzarotebreaks.com/vill...ar.php/3882.htm that displays in a table format
but is controlled by PHP/MySQL, would like it to have online admin functionality. Am willing to learn how to handcode one if there are any good tutorials. Any help is gratefully received.

View Replies !
Availability Script
i have a number of villas in spain but id like to be able to show there availability online to prosepctive clients to cut down on wasting there time when a particular villa is not available!

i need to be able to show booked and available periods from anything from 1 day to two months, does anyone know i way i could do this, are there any ready made scripts out there doing this.

View Replies !
PEAR Availability On Web Hosts
Just wondering if anybody knew the availability of PEAR classes on most web hosts... i mean like if i write a script using say the PEAR db abstraction class, would most web hosts have the PEAR class installed and in the include_path so that my script would work?

View Replies !
Varying Availability Of Libraries
I'm having problems connecting to postgres via php.  Error message = 'undefined function' when I make the call to pg_connect.  I have modified the php.ini file to enable the extension=php_pgsql.dll line.  The .dll in question exists in both windows and the defined php extensions directory.  I have confidence that the php.ini file in question is the one in use by Apache (if I rename, everything bombs). Code:

View Replies !
Writing Pseudo For Availability
creating an online store for a project in on of my classes. I've searched around and cant really find how to create some availability scripts. How can I create a script to check our database on whether certain things are available? Any suggestions? Just asking for a good starting point.

View Replies !
Checking For Amazon Availability
Rather than reinvent the wheel, I was wondering if anyone had a tried and true and fast way of checking a string containing availabilty information for an Amazon request.

View Replies !
Checking The Availability Of A Domain
I want to know whats the best way to check if a domain is available or not for registeration? Is there a recommended class i should use or is it easy to code myself?

View Replies !
Check Availability Button
I have a form that accepts user info. I want to create a button that enables the user to check for the availability of the username entered before continuing with the rest of the form. I have tried using the button onclick to call a JS function. The JS function have codes to compare the username with database select.

View Replies !
Date Columns Availability
I done an availabilitycheck that until now seems to work just perfect, except 1 problem. For exampel in the database if I have an booking in datecolumns llegada and salida dates 25/11 and 15/12, I would like the days 25/11 and 15/12 to be marked as available. This is the code I have:

$result = mysql_query ("SELECT llegada, salida, propiedad from bookings where ( propiedad = '$propiedad' )
AND (('$llegada' BETWEEN llegada AND salida) or ('$salida' BETWEEN llegada AND salida) or (llegada < '$llegada' AND salida > '$salida') or (llegada > '$llegada' AND salida < '$salida'))", $dbh);

In this piece of the code this is what I would like to do but don´t work:
('$llegada' BETWEEN llegada AND salida-1) or ('$salida' BETWEEN llegada-1 AND salida)

View Replies !
Calender - Availability Chart
I have availability on my site in an calendar and I manually introduces if available for that day or not. But I want to do it autmatically. At the moment I have the reservations in an database table, I have arrival in one column and departures in another column, both date types.

View Replies !
Check Room Availability System
I am super new to php/mysql etc. i am just trying to do a room availability system.
I have 5 rooms in 5 different category. i like to know how to design a DB and write a php that takes two different dates[checkin date / checkout date] and verifies the DB for availble rooms.

View Replies !
Ajax Script To Search Domain Name Availability In Php
hai friends can any one of you do my favour and send the script to
"search domain name availability in php using ajax"

View Replies !
Checking Room Availability For Hotel Booking System
I was wondering if anyone could help me with a problem I'm having.
I've been using Dreamweaver to create a hotel booking system for a
friend of mine, using MySQL (version 4.0.21) and PHP 5. The bit I'm
struggling with is checking the Room Availability based on dates that
are typed into a textfield and then returning a list of the available
rooms on the next page.

The three tables involved in this function are:

CREATE TABLE `room` (
Room_Number tinyint(1) UNSIGNED NOT NULL,
Price_Double_per_Night decimal(5,2) NOT NULL,
Price_Twin_per_Night decimal(5,2) NOT NULL,
Price_Single_per_Night decimal(5,2) NOT NULL,
Price_Double_per_Week decimal(5,2) NOT NULL,
Price_Twin_per_Week decimal(5,2) NOT NULL,
Price_Single_per_Week decimal(5,2) NOT NULL,
PRIMARY KEY(`Room_Number`),
)
TYPE=InnoDB
ROW_FORMAT=fixed;

CREATE TABLE `room_booking_link_entity` (
Room_Number tinyint(1) UNSIGNED NOT NULL,
Room_Booking_ID int(11) NOT NULL,
Single_Double_Twin enum('Single','Double','Twin') NOT NULL,
PRIMARY KEY(`Room_Number`, `Room_Booking_ID`),
INDEX `Room_Number`(`Room_Number`),
INDEX `Room_Booking_ID`(`Room_Booking_ID`),
FOREIGN KEY `Reference_14`(`Room_Number`)
REFERENCES `room`(`Room_Number`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
FOREIGN KEY `Reference_85`(`Room_Booking_ID`)
REFERENCES `room_booking`(`Room_Booking_ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION
)
TYPE=InnoDB
ROW_FORMAT=fixed;

CREATE TABLE `room_booking` (
Room_Booking_ID int(11) NOT NULL AUTO_INCREMENT,
Customer_ID int(11) NOT NULL,
Bill_ID int(11) NOT NULL,
Date_of_Arrival date NOT NULL,
Date_of_Departure date NOT NULL,
Number_of_Nights tinyint(3) NOT NULL,
Date_Booking_Made date,
Status_of_Booking enum('Booked','Arrived','Departed') NOT NULL,
Total_Cost decimal(7,2) NOT NULL,
PRIMARY KEY(`Room_Booking_ID`),
INDEX `Room_Booking_ID`(`Room_Booking_ID`),
INDEX `Customer_ID`(`Customer_ID`),
INDEX `Bill_ID`(`Bill_ID`),
INDEX `Date_of_Arrival`(`Date_of_Arrival`),
INDEX `Date_of_Departure`(`Date_of_Departure`),
INDEX `Status_of_Booking`(`Status_of_Booking`),
FOREIGN KEY `Reference_03`(`Customer_ID`)
REFERENCES `customer`(`Customer_ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
FOREIGN KEY `Reference_14`(`Bill_ID`)
REFERENCES `bill`(`Bill_ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION
)
TYPE=InnoDB
ROW_FORMAT=fixed;

I've just discovered that MySQL 4.0.21 does not support subqueries.
I'm basically stuck with this version of MySQL. I think I've got
round the subquery problem by using a multi query option as follows:

1.Create a temptable that will store all of the room numbers that
have bookings for the particular dates requested as follows:

SELECT DISTINCT a.room_number INTO temptable
FROM booking_link_entity AS a INNER JOIN room_booking AS b
WHERE b.departure_date >$_POST[‘ARRIVAL'] And b.arrival_date <
$_POST[‘DEPART'];

2.Left join this with the room table and pull out rows with no match

SELECT a.room_number, b.room_number
FROM room AS a LEFT JOIN temptable AS b ON a.room_number=b.room_number
WHERE b.room_number IS NULL;

3.Delete temp table

I've tried doing this in Dreamweaver, but to no avail. I have a
feeling it is too complex for Dreamweaver.

My php knowledge is very basic and was wondering if anyone could give
me some pointers as how to do this in PHP?.

View Replies !
Redirection...
I'd like to know how to redirect the browser to another page without using the header function beacause it's a hassle...
Or I don't know how to use it...

View Replies !
PHP Redirection
Quick Question here that I cannot figure out. I have a drop down menu
in a form with certain entries like plumbing painting flooring and so
on. What I can figure out is php html redirection. When i select
someting from that drop down menu i wold like the browser to point to
lets say plumbing.html

So when a suer select plumbing from drop down menu take them to
plumbing.html

View Replies !
Redirection
I come from an ASP background and have switched to PHP. I am used to the methods of:

Server.Redirect "/mypage.asp"
Server.Transfer
Server.Execute

Is there a corresponding bunch of functions/commands in PHP ?

View Replies !
Url Redirection
I am trying to build url redirection into a website I am working on. Let me explain....
To get around difficult url's I decided that it would be cool if a url alias could be set up and when the url alias is typed in, do a check in a custom 404 page to see if it is just a bad link or if it is a predefined alias, then forward the user to the appropriate url.

So instead of having to type in the following to get to department x's webpage...

http://www.domain.tld/path/to/get/to/departmentx

...the user could type in http://www.domain.tld/departmentx, which would redirect them to the first url. I could have done this by just having a directory for departmentx right under the root directory, but I wanted to keep some order to the site structure.

The url aliases are stored in a couple of arrays, and I am using a for loop to traverse the array looking for the aliases in the current url. The problem I am having is when I go to: http://www.domain.tld/departmentx

I am forwarded to my custom 404 page. The url I typed still appears in the address field in the browser but since I am actually at 404.php, I cannot get any values for $HTTP_REFERER. Is there any way, after being forwarded to my 404 error doc, to get the original url the user typed to see if there is an alias for it. PHP Code:

View Replies !
Redirection To Last Url??
I want my site to send users back to where they were prior to being told
they have to login. For instance, say user accesses page1.php. They try to
do something and they get a message telling them to login. So they login,
which is done at login.php. After they log in, I want them to end up back at
page1.php.

View Replies !
Php Redirection Help.
Their is a php redirection site, every time I go on it, it redirects me to a different website, I want to look at the source of the redirection page, but I don't have enough time to click on the view page source. Since as soon as I hit enter it redirects me to the redirection page. Is their away I can view the source of this page?

View Replies !
Redirection URL
I need to somehow obtain the final destination url for a redirection url and am having some problems... Can anyone think of a good way to obtain the address for a redirect.. Code:

View Replies !
Ip Redirection
how to do the following:

I want to retrieve the visitors IP address. Check the IP address and if it is from the USA I want to display a particular page If not display a different page.

View Replies !
No Redirection?
The following script outputs 12345. It should go to intro_page.php after the
4 session variables have been populated. Can you see what I'm doing wrong? Code:

View Replies !
Ur Redirection
i got a link like thi:

http://localhost/gallery/thumb.php?id=1

you know people be messing around to find flows in websites so i want to know how cna i rederect someone that enter the address link this:

http://localhost/gallery/thumb.php

View Replies !
Redirection With Url
How do I refer people to a page when they click a link? When someone clicks LINK the browser opens a new window with the website logo and "You are being redirected." and then forwards the visitor to the website(obviously this needs to be dynamic as the final destination url would change all the time and is pulled from a database).

View Replies !
404 Redirection
All not found files on my site redircts to my 404.php file. Inside my 404.php file i'd like to find out the original not found url and extract the file name.

for example if someone clicks on www.mysite.com/123.php or www.mysite.com/78.php I would like to extract 123 or 78 strings. How?

I tried both $_SERVER['PHP_SELF'] and $_SERVER['HTTP_REFERER'] but Apache does not sent the original not found URl to my 404.php page. Code:

View Replies !
Get Url From Which Redirection Occurs
I have a few domains which are either domain masked or forwarded to my site. eg.

www.domain1.com (masked) -> www.mysite.com/process.php

www.domain2.com (forwarded) -> www.mysite.com/process.php

Is there any function which can be used in process.php to determine from which domain the script is being invoked?

View Replies !
PAYPAL Redirection
I am using PAYPAL for one of my website for online payment. after redirecting the paypal site it takes all neccessary information and after successfull transcation the display the page showing the button to continue after clicking the button user is redirecting to our site but i want after successfull transaction paypal will redirect the user to our site instead of his own page.

View Replies !
Iframe Redirection
I have site where main content is shown in an iframe placed in the index. I'd like all files being open in that iframe. Well, I know how to do it: with a javascript that always call the index. The problem is that it obviously always shows the same page in the iframe. So I think I could solve this with php (all pages are .php), but I CAN'T CHANGE URLS, so I don't know how to do it. Any idea?

View Replies !
Redirection Of Pages In Php
First it check the text field, if the text field are not matched with your database values then after cliking the submit button it will show the error message in the same page , but if it matched then it will redirect to the specified page/link.

View Replies !
Redirection From A Form
I'm creating a form where users are directed to a page depending on what options the choose on the form. I've tried this with Javascript and although it works the information in the form is not passing on to the next page. The information the user inputs will eventually be mailed.

Here is simplified diagram:-

form-->
name_____
email______
option-->a.htm
-->b.htm
-->c.htm
submit

page a.htm, b.htm or c.htm--> this page displays information on option a b or c. then the page is emailed.

View Replies !
Redirection If A Condition Is Met
I know this topic has been discussed a few times here and also on
php.net, but I cannot find an answer to my specific problem. I check to
see if a user is logged in before serving admin.php like so:

<?php
session_start();
if (!isset($_SERVER['username']) or !isset($_SERVER['password'])) {
header("location:http://linux-place.com");
exit;
}
?>

These are the very first lines in the file. It works perfectly. The
problem is that I would like to output a message like "Please login
first before accessing the administration panel". How can I do that
without getting the headers already sent error?

View Replies !
Redirection And Frames
My website contains a login page and as soon as the user succesfully
logs in, he will be directed to the homepage that contains two frames
(with cols=20%,*). The left frame contains the list of products, which
are URLs with target as the right frame. Each page that loads in the
right frame is a PHP page does session validation. If the session is
timed out or the user types the URL of the page directly in the
address bar (without logging in), he'll be redirected to login page
with appropriate error message.

Problem is, when the session times out and the user clicks on any of
the links in the left frame, the login page loads into the *right
frame*, which is not what I want. What I really want is, a way to load
the login page as the "top level page" without any frames.

View Replies !
Redirection Emergency
I try to use PHP to redirect to other page and failed. Please give me a
help. Thanks.

The script is:

if($rows_num>0)
{
session_start();
session_register("userid");
session_register("username");
session_register("userpriv");
$userid=$data[0]['user_id'];
$username=$data[0]['username'];
$userpriv=$data[0]['priv_id'];
echo "<script
language=javascript>self.location='admin_cpanel.php'</script>";
exit;
}
else
{
echo "<script
language=javascript>self.location='admin_login.php'</script>";
exit;
}

The result is a blank page.

View Replies !
Frame Redirection
"Web redirection : Pointing of certain domain to certain folder or elsewhere.

Bought 123.com and forward it to www.abc.com/123
Bought xyz.com and forward it to www.abc.com/xyz
This is done not from the DNS level but using scripts or frame
redirection."

I am not sure if i am posting in the right forum but this is what I want to achive. Does anyone here know anything about frame redirection?

View Replies !
Observations Regarding Redirection
I don't know if it is only me but I was sure that header("Location:url")
redirects the browser instantly to URL, or at least stops the execution of
the code. But appearantely it continues to execute the code until the
browser send his reply to the header instruction. So an exit(); after each
redirection won't hurt at all

View Replies !
Automatic Url Redirection
i'm trying to redirect the user back to the original page he came from after logging in. when a user enters a page that requires logging in, the page will automatically jump to the login page.

so what's the problem u might ask? in the situation below, admin.php loads the login page with the variable $login_referer which is the url of admin.php if the user is not logged in. now this is what i want to happen but...... PHP Code:

View Replies !
Regarding Page Redirection
I have a form which when updated takes the user to an update screen. I was wondering if it was possible to redirect the user back to the screen where they entered the information and refresh the data basically just refreshing the page (and obviously updating the data in the database which is working fine).

I have tried using some code and I can easily redirect back to the right page but I also need to have the 'id' selected so that it displays the recently updated record. Below is the code I attempted to use (i have tried everything I can think of).

header('Location: OrganiseIDASX.php?id=echo $_GET[$id]');

View Replies !
Redirection Problem
I have over 3000 potential redirection in a database... with the wrong address!

What my code does is request this from mySQL and then it redirects to the site. So write up a simple "if" statement? Not possible, as every one of these links to a product with an individual 4 digit code.

What I need your help with is a code that will use the $_GET statment to request the "id" (4 digit code) and redirect accordingly with the new file path. Code:

View Replies !
Redirection Error
I'm currently making a CMS and I'm using a few globals instead of constantly setting variables.

The problem I'm having at the moment is when my scripts redirect they are redirecting to the testing URL (I've now bought the domain I want to use). I've set the global containing the domain name to $_SERVER['HTTP_HOST'] but it still redirects to the old URL.

View Replies !
Background Redirection
I need to create a redirection from a php page to another, without having a web browser opened.

Imagine that you make a php starting via command line or cron job, then your php is running in background and no web browser is open on it. How can this php (from the background, with no web browser opened) call (trigger) another php? please note that I'm not talking about include.

I need that the background php gives control to ANOTHER php url . per what I tested the php 'header' command does not work and obviously also any javascript redirection cannot work because there is no web browser opened. so, finally, how can that php running in background call another php url?

View Replies !
Page Redirection
I'm building a site that has a notes/blog on it. I have the blog set up so that there will only be a certain number of posts per page. The posts are submitted via a simple form. I'm trying to figure out how to redirect the browser to the page that the post will show up on after it is submitted. Right now it just goes back to page one even though you're making a post that will display on page two, for example. I have this line in my code:

header("Location: index.php?page=notes");I'm thinking that I need to set up some kind of variable to pass the page info to so that it goes back to the corresponding page after the post is submitted. Something like this:
header("Location: index.php?page=notes&pagenumber=some variable");How would I set this up?

View Replies !
Redirection - Reload
I wonder if it posible to reload a web page using php ? ? ?

No javascript or something similar.

View Replies !
Instant Redirection
I want the script to direct a browser directly to a page after a certain event.

Case: I want to delete a file with get, then go to the page without the get request, so as not to delete a file that isn't there. Possible?

View Replies !
Redirection Check
Is their a function to check what webpage a user came from to get to your webpage?

View Replies !
Question About Redirection Using PHP On IIS
Win2k server, PHP 4.2.3, PHPNuke 6.0, IIS.

This code works great for redirecting the user:
$redirect = getenv("HTTP_HOST");

if ($redirect=="something.mydomain.com"){
header("Location:http://www.mydomain.com/modules.php?name=something");
}

However, if I try this:
if ($redirect==www.mydomain.com/something){
header("Location:http://www.mydomain.com/modules.php?name=something");
}

it generates 1) a 404 error, and 2) something about a TRANSLATE verb in my
URLScan log. Code:

View Replies !
Login Redirection
I am having a bit of trouble with getting my redirection to work..for some reason no matter what login I use, I keep getting sent to the user.php page...here is the code I am working with.. Code:

View Replies !
Redirection Question
Perhaps this is not the best design right now in my php script, but I've
just started with php after a long break.

The thing is that I enter a page called foo1.php, this script do some
calculations and should then send directly send the user to a page called
foo2.php together with the variables $bar and $bar2.

On the page foo1.php there will be no input or any clicking required by the
user. Just as soon as the values are calculated, it should continue.
How can I achieve this?

View Replies !
Redirection Dependant
I am trying to pass form variables that redirect to a new site but the differing sites have different name variables and I want to reconfigure depending upon location selected and then change the name varible before sending. Here is what I have so far but it is not working.

<?
$ID = $_POST['UserID'] ;
$password = $_POST['UserPswd'] ;
$location = $_POST['select'] ;

if ( isset ($_POST['select']) && $_POST['select'] == 'https://www.XXXXXXXX.com/webApp/TEScreener3/700credit/index.jsp' )
header( "Location: $location?client=infocredit&user=$ID&password=$password" );

elseif ( isset ($_POST['select']) && $_POST['select'] == 'https://www.XXXX.com' )
header( "Location: $location?ACCOUNT=$ID&PSSWD=$password" );

elseif ( isset ($_POST['select']) && $_POST['select'] == 'https://www.XX.com' )
header( "Location: $location?UserID=$ID&UserPswd=$password" ); ...........

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved