posting data from php to php
- Started
- Last post
- 10 Responses
- kinetic
hello all!
happy new year to all of you!
i need to call a php script from a php script. is there a function in php that enables me to do this?
in cold fusion you have .. im looking for an equivalent function in php.
thanks :)
- mike0
are you sure that's the best way to do what you are trying to do? what exactly are you trying to do?
you can do this, using the shell_exec function
http://www.php.net/manual/en/fun…
but that is usually disabled on shared hosts when running in safe mode.
again, is this the best way to do what you are wanting to do?
- mike0
this looks nice too... you can escape any input too so that passed vars cannot be set to funk with your apps...
- unfittoprint0
include()?
- kinetic0
this script runs automatically everyday.
i was wrong eariler...its a Cold Fusion script that I need to pass variables to..so that the CF script can pass the information to Verisign.
my script gets info from a db..then it needs to call the cf script that passes that info to verisign.
- mike0
sounds like a kinda nasty batching hack if you ask me... but you didn't... regardless, I will throw in my 2 cents.
you should really consider writing an acutal application that manages the batch routines... especially if there is money involved.
- kinetic0
i just need to post data from PHP to a Cold Fusion script
- mike0
okay, if the CF script is on a web server you can nastily call it from PHP you can call a remote URL from within a PHP script using passthru
http://www.php.net/manual/en/fun…
again though, for what it sounds like you are doing and passing I would say this is doable but not advisable.
- kinetic0
thanks a lot mike...really appreciate it
- enobrev0
if you're looking into an automated process.. like something that happens daily, you may want to look into cron jobs if your host provides it.
As far as calling scripts in other languages or servers, you can use form posts (or links with params) to activate the script, or what you may want to consider as a more permenant option is setting your CF script as a web service.
I ahven't worked with CF in quite a while, but from what I recall thier Web Services options are pretty easy to implement.
- kinetic0
the php script is already set up as a cron task.
it needs to collect db info and then post to a cf script on another site
were thinking of just transforming the script into cf since another developer here has aleady done posts from cf to cf with cfhttp
too bad .. it was such a lovely php script .. now it's going to get all mucked up with cf tags ;)