/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] PHP Client Proxy?

You know how JavaScript has the XMLHttpRequest object for performing HTTP Client Proxy functions under-the-covers? Other than SOAP, is there a rough equivalent for performing HTTP Client Proxy functions from PHP? …particularly, POST functions?

I ask, because my regular client offers a service to his customers and his customers place surveys on sites other than the site where my client’s service resides. Yet, his customers wish to capture opt-in email addresses, e.g., from the surveys and send that information to my client’s server for storage in a mailing list database for use in specific campaigns. However, the catch is that this information capture must take place without interrupting the normal flow of survey processing. Thus, I basically need to perform an AJAX-like function between two PHP pages — one on the customer’s server and the other on my client’s server.

How would I accomplish this?

to post a comment
PHP

12 Comments(s)

Copy linkTweet thisAlerts:
@temp_user123authorJun 27.2007 — If not, I guess what I'll have to do is write a PHP page on my client's server to serve up an image and have the customer's PHP page code an IMG tag with a querystring containing the data to be passed to my client's server. What do you think?
Copy linkTweet thisAlerts:
@temp_user123authorJun 28.2007 — I'm truly surprised (disappointed?) that no-one pitched in on this one. I would have at least expected some of the truly opinionated (though not necessarily correct) persons whom I know frequent this site to jump in. Ah well.
Copy linkTweet thisAlerts:
@temp_user123authorJul 01.2007 — In particular... If I am forced to use the query string on an image request as my solution (which is already coded and working, by the way), how do I prevent any possible indexing services from trying to following the link in the IMG tag's SRC attribute?
Copy linkTweet thisAlerts:
@MrCoderJul 01.2007 — is there a rough equivalent for performing HTTP Client Proxy functions from PHP?[/QUOTE]

I know how javascript RPC works, but what is a client proxy php function?
Copy linkTweet thisAlerts:
@temp_user123authorJul 02.2007 — I know how javascript RPC works, but what is a client proxy php function?[/QUOTE]
hehehe, well, I'm guessing that due to the lack of response hereunto, PHP doesn't have an RPC function. ? But, if it did, it would allow you to perform an HTTP POST (just as the XMLHTTPRequest object does for JavaScript) from one server to another -- or even from one page to another on the same server (though, unlike with JavaScript, I don't see as much use for that last part in PHP, what with having $_SESSION variables available).

I do see (Google) 3rd-party suppliers of RPC for PHP, though.
Copy linkTweet thisAlerts:
@MrCoderJul 02.2007 — XMLHTTPRequest is client side thou?
Copy linkTweet thisAlerts:
@temp_user123authorJul 02.2007 — XMLHTTPRequest is client side thou?[/QUOTE]
Correct, but in the case of an RPC there is no restriction as to client-side vs. server-side. That is what the "proxy" part is all about. It allows PHP to function in the role (on behalf) of the client in a client/server relationship.
Copy linkTweet thisAlerts:
@temp_user123authorJul 02.2007 — Well, I've done some more reading and it turns out RPC is NOT what I want. I hadn't heard that acronym used in this context before (only in relation to a DBMS) so went with it when you used it (and when I got so many hits on it in Google). As a result, I can tell you that the term RPC does NOT apply to JavaScript either. The JavaScript XMLHTTPRequest object is NOT an RPC. It is what I started out calling it -- an HTTP Client Proxy. So, I'm still looking for my ideal solution -- a PHP HTTP Client Proxy. ?
Copy linkTweet thisAlerts:
@temp_user123authorJul 02.2007 — So, I've downloaded this one to try:

PHP HTTP Protocol Client
Copy linkTweet thisAlerts:
@MrCoderJul 03.2007 — Well, I've done some more reading and it turns out RPC is NOT what I want. I hadn't heard that acronym used in this context before (only in relation to a DBMS) so went with it when you used it (and when I got so many hits on it in Google). As a result, I can tell you that the term RPC does NOT apply to JavaScript either. The JavaScript XMLHTTPRequest object is NOT an RPC. It is what I started out calling it -- an HTTP Client Proxy. So, I'm still looking for my ideal solution -- a PHP HTTP Client Proxy. ?[/QUOTE]

RPC is a remote proc call, its a way of calling a function remotely for the want of a better description. It does not matter how it is done, javascript, flash, etc only that it is done remotely.

XMLHTTPRequest is nothing to do with RPC, but you "can" use it to perform RPC's.

That class you are using is just like cURL, I was guessing you were after something more complex based around AJAX with the things you were posting about.
Copy linkTweet thisAlerts:
@temp_user123authorJul 03.2007 — XMLHTTPRequest is nothing to do with RPC, but you "can" use it to perform RPC's.[/QUOTE]
Not so. You can use XMLHTTPRequest to invoke a CGI process on a server, as intermediate code, which executes a function locally. RPC is executing a function remotely -- without any internediate code.
Copy linkTweet thisAlerts:
@temp_user123authorJul 03.2007 — That class you are using is just like cURL, I was guessing you were after something more complex based around AJAX with the things you were posting about.[/QUOTE]
Don't really know anything about CURL. So I read what was in the PHP manual on it. Yes, it looks like CURL is very similar to what I was talking about -- and more. However, that is a separate installation of another library and possibly a recompile of PHP -- which I don't want to get into. Thanks.
×

Success!

Help @temp_user123 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...