Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Help/Advice needed. How best to send data to a .inc file on a remote server?
Old 06-14-2012, 06:50 AM Help/Advice needed. How best to send data to a .inc file on a remote server?
Extreme Talker

Posts: 193
Name: James
Location: Australia
Trades: 0
What I am doing

I have two webhostings, each with their own domain name.

I want to send data from one, to place content in the SQL database of the other website.

The amount of data I would want to send, most likely would be too large for the GET method, therefore I need to find some way to POST it over.

Help I seek includes...

Should a .inc file be ok on the other server, AND will it execute there on the remote server?

Also, how is the best way for me to send data to it?

Would I need to get the remote server to call another file in the local server, so I can use the header statement?

Already know

I have been to the php.net site, as well as w3schools.com.

Looks like the only means I have of sending the database data to the other file is via the GET method.
__________________
** Directory of my other websites ***

Please login or register to view this content. Registration is FREE
- for screen devices

Please login or register to view this content. Registration is FREE
- for mobile devices
TRANZIT JIM is offline
Reply With Quote
View Public Profile Visit TRANZIT JIM's homepage!
 
 
Register now for full access!
Old 06-14-2012, 12:48 PM Re: Help/Advice needed. How best to send data to a .inc file on a remote server?
lizciz's Avatar
Super Spam Talker

Posts: 845
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Maybe I don't understand the question, but couldn't you just connect to the database on the other server?

Often you have your database on the same server as your script is running on, and hence you connect to the host "localhost", but you could just as well connect to your other domains' database, as in
PHP Code:
mysql_connect("yourotherdomain.com:3307""user""password"); 
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 06-14-2012, 07:15 PM Re: Help/Advice needed. How best to send data to a .inc file on a remote server?
miki86's Avatar
Extreme Talker

Posts: 239
Location: print_r($serbia);
Trades: 0
I dont think your webserver can read .inc files as .php files by default.
You can set that manually though.

I think lizciz suggested better way, why sending data with GET and POST when you can connect to another database.
miki86 is offline
Reply With Quote
View Public Profile
 
Old 06-14-2012, 09:40 PM Re: Help/Advice needed. How best to send data to a .inc file on a remote server?
Extreme Talker

Posts: 193
Name: James
Location: Australia
Trades: 0
Ok, I shall try that method with thanks.

Shall let you know how it went next week.
__________________
** Directory of my other websites ***

Please login or register to view this content. Registration is FREE
- for screen devices

Please login or register to view this content. Registration is FREE
- for mobile devices
TRANZIT JIM is offline
Reply With Quote
View Public Profile Visit TRANZIT JIM's homepage!
 
Old 06-14-2012, 09:54 PM Re: Help/Advice needed. How best to send data to a .inc file on a remote server?
Extreme Talker

Posts: 193
Name: James
Location: Australia
Trades: 0
One last question, do I need to use the .php extention? or could I use .php4 or .sphp and still have it execute in the same way?
__________________
** Directory of my other websites ***

Please login or register to view this content. Registration is FREE
- for screen devices

Please login or register to view this content. Registration is FREE
- for mobile devices
TRANZIT JIM is offline
Reply With Quote
View Public Profile Visit TRANZIT JIM's homepage!
 
Old 06-14-2012, 10:32 PM Re: Help/Advice needed. How best to send data to a .inc file on a remote server?
King Spam Talker

Posts: 1,091
Name: Paul W
Trades: 0
Quote:
Originally Posted by TRANZIT JIM View Post
One last question, do I need to use the .php extention? or could I use .php4 or .sphp and still have it execute in the same way?
Only if the server is configured to recognise those extensions and handle appropriately.
__________________
Great music:
Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
PaulW is offline
Reply With Quote
View Public Profile
 
Old 06-15-2012, 01:05 AM Re: Help/Advice needed. How best to send data to a .inc file on a remote server?
lizciz's Avatar
Super Spam Talker

Posts: 845
Name: Mattias Nordahl
Location: Sweden
Trades: 0
The server can be configuered to run any type of file you want through the php parser. I *think* the default usually includes .php .php4 and .phtml. I believe you should be able to configure this in a .htaccess file.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 06-15-2012, 04:17 AM Re: Help/Advice needed. How best to send data to a .inc file on a remote server?
miki86's Avatar
Extreme Talker

Posts: 239
Location: print_r($serbia);
Trades: 0
If you have root access to your server and if you are on apache i think you can edit httpd.conf and add a line under <IfModule mime_module>
Code:
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .inc
miki86 is offline
Reply With Quote
View Public Profile
 
Old 06-15-2012, 09:27 PM Re: Help/Advice needed. How best to send data to a .inc file on a remote server?
Physicsguy's Avatar
404 - Title not found

Posts: 1,061
Name: Scott Kaye
Location: Ontario
Trades: 0
Quote:
Originally Posted by miki86 View Post
If you have root access to your server and if you are on apache i think you can edit httpd.conf and add a line under <IfModule mime_module>
Code:
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .inc
However, as far as I know, you can always make .htaccess files to run a MIME(?) type as PHP. .htaccess files are just that - files, the same as anything else you can upload. Although most free hosts have .htaccess disabled, if you have at least paid hosting you should be ok.
__________________

Please login or register to view this content. Registration is FREE
Physicsguy is online now
Reply With Quote
View Public Profile Visit Physicsguy's homepage!
 
Reply     « Reply to Help/Advice needed. How best to send data to a .inc file on a remote server?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.39251 seconds with 11 queries