http request

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: http request

Post by RobertGonzalez »

What kind of hash is it? Unless it is the PASSWORD() function what PHP can do MySQL can do (and vice versa, for the most part).
cybernet
Forum Newbie
Posts: 12
Joined: Tue Apr 29, 2008 1:29 am
Contact:

Re: http request

Post by cybernet »

Everah wrote:What kind of hash is it? Unless it is the PASSWORD() function what PHP can do MySQL can do (and vice versa, for the most part).
the script is in java (.jsp extension )
so i don't how what kind :(
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: http request

Post by RobertGonzalez »

Now that I read over the post, this sounds an awful lot like a REST or SOAP type call. Are you hitting a web service?
cybernet
Forum Newbie
Posts: 12
Joined: Tue Apr 29, 2008 1:29 am
Contact:

Re: http request

Post by cybernet »

Everah wrote:Now that I read over the post, this sounds an awful lot like a REST or SOAP type call. Are you hitting a web service?
I'm hitting my own web service which is OpenFire 3.5.1
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: http request

Post by RobertGonzalez »

OpenFire is a server, not a web service. What I mean by a web service is a site that allows you to hook into their data back-end through HTTP. They have a series of protocols, method, etc that accept an HTTP request and provide an HTTP response. It looks like that is what you are trying to communicate with in your code.
cybernet
Forum Newbie
Posts: 12
Joined: Tue Apr 29, 2008 1:29 am
Contact:

Re: http request

Post by cybernet »

Everah wrote:OpenFire is a server, not a web service. What I mean by a web service is a site that allows you to hook into their data back-end through HTTP. They have a series of protocols, method, etc that accept an HTTP request and provide an HTTP response. It looks like that is what you are trying to communicate with in your code.
that's wright :D this is what i mean :!:
now you understand :?:
now can you tell me how to make this :?: :|

thank you for your response
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: http request

Post by RobertGonzalez »

What is the site you are passing this information to? I ask this because they may have documentation that can be read to help with what you are trying to do.
cybernet
Forum Newbie
Posts: 12
Joined: Tue Apr 29, 2008 1:29 am
Contact:

Re: http request

Post by cybernet »

Everah wrote:What is the site you are passing this information to? I ask this because they may have documentation that can be read to help with what you are trying to do.
dude it's my own site
i'm trying to make a unique registration

i'm sending you a pm with more details 8)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: http request

Post by RobertGonzalez »

Ok.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: http request

Post by RobertGonzalez »

Ok, so if I am seeing this right you have a form, like you showed in the sample you PMed me. That form posts to a sign-up.jsp page. But somehow you are trying to redirect to the sign-up.jsp page.

Since these are your apps, might I suggest making the sign-up.jsp page use POST vars instead of GET vars then have the signup form post back to itself. Use the $_POST array from the form to assemble the data that is going to be submitted to sign-up.jsp then use curl to instantiate a POST to that page.

Curl options to take note of:

Code: Select all

<?php
// This sets up CURL to post data to the page it is calling
curl_setopt($ch, CURLOPT_POST, TRUE);
 
// This sets up the post fields to pass in the CURL execution
curl_setopt($ch, CURLOPT_POSTFIELDS, array('postarraykey' => 'postarrayvalue'));
 
// This tells the CURL execution to capture the CURL response as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
?>
Post Reply