Page 2 of 2

Re: http request

Posted: Fri May 02, 2008 2:35 pm
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).

Re: http request

Posted: Fri May 02, 2008 2:42 pm
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 :(

Re: http request

Posted: Fri May 02, 2008 3:21 pm
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?

Re: http request

Posted: Fri May 02, 2008 3:25 pm
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

Re: http request

Posted: Fri May 02, 2008 3:36 pm
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.

Re: http request

Posted: Fri May 02, 2008 5:14 pm
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

Re: http request

Posted: Fri May 02, 2008 5:24 pm
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.

Re: http request

Posted: Fri May 02, 2008 6:43 pm
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)

Re: http request

Posted: Fri May 02, 2008 11:31 pm
by RobertGonzalez
Ok.

Re: http request

Posted: Sat May 03, 2008 12:02 am
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);
?>