Current location: Hot Scripts Forums » Programming Languages » PHP » Under same domain but different server


Under same domain but different server

Reply
  #1 (permalink)  
Old 07-12-06, 09:33 PM
poyor7 poyor7 is offline
Newbie Coder
 
Join Date: May 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Under same domain but different server

Hi,

I would like to know:

Scenario :
I've two server different OS A:linux and B:NT under same external domain.I've something that from A to be retrieve by B.
Example:
I've a form let say i name it writeppt.php and in the form something like this
Snippet:
File from Server B,
PHP Code:

<?

session_start
();
if(   (!isset(
$_SESSION['userid'])) || (!isset($_SESSION['pass'])) ) {
    include_once(
"log.php");
    exit;
}
//<!-- start declare variables -->
include ("csv_crampler.inc.php");
[
b]$csv = new csv_handler("../apply.csv")[/b]
So, my question is the file in include syntax apply.csv is in Server A so how do i map the path so it can be
retrieve?

Regards
poyor7
Reply With Quote
  #2 (permalink)  
Old 07-14-06, 04:45 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
I don't think it's possible like you're trying to do. You will probably have to edit your csv_handler class and use file_get_contents() to get the data from a different server.
Reply With Quote
  #3 (permalink)  
Old 07-14-06, 10:58 PM
santana santana is offline
Newbie Coder
 
Join Date: Jul 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by poyor7
Hi,

I would like to know:

Scenario :
I've two server different OS A:linux and B:NT under same external domain.I've something that from A to be retrieve by B.
Example:
I've a form let say i name it writeppt.php and in the form something like this
Snippet:
File from Server B,
PHP Code:

<?

session_start
();
if(   (!isset(
$_SESSION['userid'])) || (!isset($_SESSION['pass'])) ) {
    include_once(
"log.php");
    exit;
}
//<!-- start declare variables -->
include ("csv_crampler.inc.php");
[
b]$csv = new csv_handler("../apply.csv")[/b]
So, my question is the file in include syntax apply.csv is in Server A so how do i map the path so it can be
retrieve?

Regards
poyor7


Try
PHP Code:

<?php


/* This example assumes that www.example.com is configured to parse .php
 * files and not .txt files. Also, 'Works' here means that the variables
 * $foo and $bar are available within the included file. */

// Won't work; file.txt wasn't handled by www.example.com as PHP
include 'http://www.example.com/file.txt?foo=1&bar=2';

// Won't work; looks for a file named 'file.php?foo=1&bar=2' on the
// local filesystem.
include 'file.php?foo=1&bar=2';

// Works.
include 'http://www.example.com/file.php?foo=1&bar=2';

$foo 1;
$bar 2;
include 
'file.txt';  // Works.
include 'file.php';  // Works.

?>
You might also want to check: http://us2.php.net/manual/en/wrappers.php
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free web site, control panel, and dedicated IP with game server purchase for only $25 twastudios General Advertisements 3 10-20-05 06:13 AM
Free Server Security Audit by Touch Support TSGradyR General Advertisements 0 03-30-05 11:35 PM
Secure Managed Dedicated Server @ $149/month - NO SETUP FEES! Newbie2000 General Advertisements 1 12-16-04 02:27 PM
2 Months + Free Domain Name with Windows Reseller Hosting Special Offer contactsonia General Advertisements 1 11-23-04 10:13 AM
FREE Team Speak server w/ every purchase of a Call of Duty Server twastudios General Advertisements 0 10-31-03 01:14 AM


All times are GMT -5. The time now is 07:21 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.