How To Call Within Another PHP Script

Apr 23, 2007

I wish to call another php script as follows cart.php?action=view from another php script named add_cart.php please write code how to accomplish it?

View 3 Replies


Call SOAP Method Via CURL In Call Require Client Authentication?

OVERVIEW: The code is about making call to the escreen web service using SOAP and Curl with client authentication required. Currently I am not getting any result only HTTP 403 and 500 errors. The call requires client authenticate cert to be on the callng site.

$content = "<TicketRequest>

If I comment out as above and also CURLOPT_SSLCERT and CURLOPT_SSLCERTPASSWD it gives 403 error with the message as content. So I would request you to help me out by pointing out whats wrong with the current code.

View 1 Replies

Classes : Call A Specific Function Everytime A Method Call Is Made?

I want to call a function everytime a method call is made in PHP.

Example :
$a = new a();

View 5 Replies

Call SOAP Method Via CURL In It - Call Require Client Authentication

The code is about making call to the escreen web service using SOAP and Curl with client authentication required. Currently I am not getting any result only HTTP 403 and 500 errors. The call requires client authenticate cert to be on the callng site.

$content = "<TicketRequest>


1. I need to call the RequestTicket method and pass the XML string to it. I don't know how to do it here(pass the method name to call).

2. For client authentication they gave us three certs, one root cert, one intermediate cert and a client authentication cert PROTPLUSSOL_SSOpem(it was a .pfx file). Since we are on linux we converted them to pem . In curl calls I could not find way to how to include both the root cert and the intermediate cert ,so I combined them by making a new pem file and copying the intermediate cert and them the root cert and naming it authority.pem. I am not sure whether it works or not and would like your opinion.

3. For the current code Iam getting the error Error no : 77 Curl error: error setting certificate verify locations: CAfile: /home/pps/authority.pem CApath: /home/pps/......

View 2 Replies

Oop - Call To A Member Function / Call A Method From A Singleton Class?

I'm receiving the following error message while trying to call a method from a Singleton class, inside another class. Any ideas?

Call to a member function query() on a non-object.

View 3 Replies

Direct Call Other Web Applications Without Going Through The Usual HTTP Call?

I have two PHP web applications. All of the apps are located on the same computer. Each application will run independently.Now, can I do a direct API call from one PHP app to another? I don't want to go through either the webservice, or the usual HTTP call that involves HTML response. I want to call app A from app B, using direct method call, as if those two apps are the same application.

View 2 Replies

Schedule API Call Due To Third Party API Call Hourly Limit?

I'm using a third-party API to send messages to users. But this third-party limits 30 calls per hour. I'm using PHP on linux. What's the best way to implement this?

View 2 Replies

Use Reflection And Call A Method, Add The Authentication Call Each Time?

How Zend_Rest and Tonic work.There is no authentification implemented so I would like to add my own.My only problem is that they use Reflection and the when you call a method, you have to add the authentication call each time.I was thinking to add the authentication check in the constructor but then you can't actually stop the method being called.

View 3 Replies

Wordpress: Call A Plugin Function With A Php Call?

I'm writing a Wordpress MU plugin, it includes a link with each post and I want to use ajax to call one of the plugin functions when the user clicks on this link, and then dynamically update the link-text with output from that function.

I'm stuck with the ajax query. I've got this complicated, clearly hack-ish, way to do it, but it is not quite working. What is the 'correct' or 'wordpress' way to include ajax functionality in a plugin?

(My current hack code is below. When I click the generate link I don't get the same output I get in the wp page as when I go directly to sample-ajax.php in my browser.)

I've got my code[1] set up as follows:

Plugin Name: Sample Plugin
if (!class_exists("SamplePlugin")) {...........

View 2 Replies

Get The Call Duration Of Any Call In A Web Application Using Asterisk?

I have done a Web site using php and which asterisk is used as a Voip system.Now the problem is I want to get the call duration of each call after 'HANG UP'.I googled alot and got an asterisk variable named ${ANSWEREDTIME},but don't know how I can get the value from it and how I can initiate it.

View 2 Replies

Call A Defined Value Inside Of A Function Call?

when I run it, the defined part is nottranslated in the header function call, is there a special way to do the syntax or is this exact method not possible?

define('SITE_URL', '');
$_SESSION['user_role'] = 0;

View 2 Replies

Difference Between Call By Value And Call By Reference And Also $$ Means?

(1) I want to know what is the difference between call by value and call by reference in php. PHP works on call by value or call by reference?

(2) And also i want to know that do you mean by $$ sign in php

For example:-

$a = 'name';
$$a = "Paul";
echo $name;

output is Paul

As above example what do u mean by $$ on PHP.

View 3 Replies

Call A Variable That Has Been Assigned After The Call?

The title is in the question (EDIT: :P I mean the question is in the title), basically can I call variable $x before defining it further down the page?

View 4 Replies

Auto Call Function For Every Other Function Call / Call Another Function Before Any Called Function Execution?

Class test{
function test1()
echo 'inside test1';
function test2()
echo 'test2';
function test3()
echo 'test3';
$obj = new test;
$obj->test2();//prints test2
$obj->test3();//prints test3

Now my question is,

How can i call another function before any called function execution? In above case, how can i auto call 'test1' function for every another function call, so that i can get the output as,


currently i am getting output as


I cannot call 'test1' function in every function definition as there may be many functions. I need a way to auto call a function before calling any function of a class.

View 6 Replies

JavaScript Call A Function Directly - Separate Php File To Call The Function?

I am doing some basic Ajax stuff (not jquery.. just learning the basics), and I have a general structure set up where html calls a javascript function which sends data to and runs a specific php page.

But what if I just need to run a php function that's already defined in functions.php. Is that possible at all? I'm getting tired of making new php files for every task ;)

View 3 Replies

Call FileA First, Then Call FileB Through Ajax, The Code In FileB Does Not Execute?

I am running to an issue that I have never delt with before and am not sure if there is even a possible solution:I have two files:fileA and fileB.fileA contains a loop that loops 30 times each time its the loop there is a 2second delay

$i = 1;
do {
$i++; sleep(2);


I call both files via ajax, and that is where i run into my problem.if I call fileA first, then call fileB through ajax, the code in FileB does not execute until fileA has run its course.Is it possible to get around this?Like set the priority of one over the other?

View 10 Replies

Extending Class But Base Call Needs To Call Extended Class

I have a base class and a new class which extends the base class. My problem is, Can I call the extended class from the base class? This just doesn't seem right.

// a.php
class A {
// set all the properties and runs some validation and functionality in the process
// b.php

To start the process I can only call class A, Example: $process = new A(); in the class A I need to decide if class B functionality is needed


I could add the doMoreStuff() (well a ton more functionality) but this defeats the purpose of having the smaller class file sizes. I know the right way would be to create a wrapper script and put the logic in there, if to use class A or B. But is there any other reason why I couldn't do as I've requested?

UPDATE: So let me clarify what class A is: Class A sets up all the database connections, validation of the INI properties, and sets the initial logging values. Class A also has a workflow/process for handling a specific request.......

View 3 Replies

Class Call External Class - Call Error() Method?

I have a php page that calls and runs a method called pagestart() in a class called construct. Later in that same page I call a different method in a different class. If that different method errors for any reason I would like to have it call the error() function in the construct class. My question is is there a way to call the error() method without doing:

$construct = new construct;

And just tell the function to look in the class included by the main php file?

View 1 Replies

Placing A Call To The Object Inside A Function - Call To A Member Function On A Non - Object

I've searched high and low for the solution, and have found many that don't fit the bill. The general consensus is that this happens when you've not defined your object before calling upon it's functions. That isn't the case here (I think). Placing a call to the object inside a function seems to cause this error as shown below. Anyone have a solution for this? This works!

$dbConn = new dbFunctions;
$checkID = "SELECT COUNT(id) FROM table WHERE id='j5k38'";
$dups = $dbConn->FetchRow($dbConn->Query($checkID));
if($dups[0]>0){echo "false";}else{echo "true";}

View 5 Replies

Call A Url (like Bio.php?id=1).

I want to call a url (like bio.php?id=1). Then on the next page I want to display data that matches hte id variable from the URL as the ID field on my data source. Code:

View 14 Replies

Use A Call To An API?

how to use this API? The base URL for all calls to the Recommended Sites API is [URL] The API is RESTful and output formats are available in XML and JSON. I've never written any code that uses an API so if you could just tell me how involved this is or point me to a tutorial

View 1 Replies

PhP Call On Conditions

Iam wondering if there is any method to do the following:
1) When a file is created in a directory in local computer.
2) When the mysql date stored in the DB approaches the current date and
For the above two conditions I would like to call a php file.

Its not good to have the php code running in the background and waiting
for the above 2 events.

View 1 Replies

Call An Asp Script From Php

I have a 3rd party real-estate website written in php. I would like to
call an asp script on a separate webserver each time a new real-estate
item is added to the database on the php site.

The asp script updates a sql server database for another site and once
the page has been called, I do not need any return information from it.
I have searched the groups but cannot find a definitive way of making
the call to the asp script ...

View 4 Replies

How To Call Perl From Php.

I want to call a perl script which takes input from the previous php page.will u provide me the code? i wrote perl script in Solaris & PHP script in windows & then uploadig to a server. so i have to give the perl script path as "/users/xyz/abc/".

View 1 Replies

Recursive Call

I'm having some problems with a recursive call. Basically I have a standard tree of nodes, and a function _calcSize() which takes a node as a parameter and returns the size of the node: PHP Code:

View 8 Replies

System() To Call A Cgi (C)

Have the following code to call a cgi (in C) :

system ('/opt/Netlife/eLink/samples/universal/cgi-bin/elpay.cgi $ip_tx_id $ip_car
d_type $ip_card_number $ip_exp_date $ip_amount',$ret_val);

In the cgi, only the /opt/Netlife/eLink/samples/universal/cgi-bin/elpay.cgi is pass over but not the rest of the parameters. Use argv and argc.

View 1 Replies

Call Another Page

What function can I use to call another page with php?

View 7 Replies

Copyrights 2005-15, All rights reserved