Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing parameters 1

Status
Not open for further replies.

alimatt

Programmer
Nov 4, 2008
4
GB
I run two linked websites, one contains scanned images, the other runs the main php code.

The structure is a JobNo in the first and the second could contain a picture of the POD (Proof of Delivery).

I know how to construct a URL which contains the jobno which will run some code to detect the picture.
I know how to open it with fOpen


What I don't know is how to pass the result back to the calling program.


I have tried using a temporary file with fopen but it gets in a knot over permissions, and if its going to do that on my machine then sure as eggs it will do it to the customers machine

TIA for any help


Richard
 
can you explain what the result might be and why it needs to be passed back?

are the websites on the same subnet/physical machine? do you have access to a database server perhaps?
 
The original spec was to provide a website that could be accessed by the customers. They would be presented with a list of there own jobs (after login) click on the job see the paperwork that had been uploaded. This part is for my customers customer

I have a joblist page on the main program that can be used to add/edit jobs. They wish to add a column called PODS, if I can find out if the POD exists TRUE/FALSE I can provide a link to view the POD for my customer

The naming convention for the PODS is consistant Jobno + 'a' or 'b' etc. I have done some code that detects the POD and will return a value.

Is it possible ?



Hope this lot makes sense


Richard
 
Sorry

I didn't answer the question completly
they are both on the same subnet and I have access to a mysql server


Richard
 
are the domains different (no common root)?
otherwise you could use sessions to hold the data.
if they are not then you could set cookies from each domain and store a session-type ID within them, and use that ID as a data lookup in a common mysql table.
 
so why not change your session handling to deliver a cookie to allmatt.co.uk, which will then be valid for the subdomains too?

try adding this before your session_start() command to make the sessions work cross domain. that should effectively open a route to a resolution for you.

Code:
ini_set('session.cookie_domain', '.allmatt.co.uk'); //NOTE THE DOT BEFORE THE DOMAIN
session_start();
 
I should add that you can make this change 'sticky' by changing the php.ini file and restarting the webserver.
 
Or you could construct a web service and call it from the first site.
This would give you a highly flexibel solution which you could use across other projects without worrying about cookie scope.
Or have I missed something ? (highly likely !!)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top