Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 01-25-2001 Last Update: Never Installs: 0
 
No support by the author.

I need code that will take an entry into a formbox, send a copy of that entry to one site using one name for the box, send it to another site using another name for the box, etc...

In other words, I'm trying to create one single registration page that will transparently register the user with liveuniverse.com, and Vbulletin at the same time, without renaming all the login fields on member.php.

For example the field for the username on Liveuniverse.com is named "dig.new.handle" while the field for the username on Vb is named "username".

If someone could help me with this it would be greatly appreciated. A friend suggested hidden frames, but I didn't understand his explanation.

Thanks!

-Eugene

Pertinent info:
My forum
http://techhappy.com/forums/member.p...ster&who=adult

Liveuniverse:
http://www.liveuniverse.com

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 01-29-2001, 08:58 PM
Guest
 
Posts: n/a
Default

Hey dood, check out http://www.addesigner.com/ to make some cool banner ads for your sci-fi sites.

You could have them generate it, and then save it to your hd, then edit it with a animated gif editing software to remove the branding, hehe!
Reply With Quote
  #53  
Old 01-29-2001, 09:01 PM
Guest
 
Posts: n/a
Default

We're so horrible, then again, everyone else is trying to milk us dry, so were just paying them back.
Reply With Quote
  #54  
Old 01-29-2001, 09:53 PM
chrispadfield2
Guest
 
Posts: n/a
Default

hehe, coincidence as it be, i came across that site yesterday
Reply With Quote
  #55  
Old 01-29-2001, 10:35 PM
Guest
 
Posts: n/a
Default

So let me see if I have this right, the following is a very crude version of what i think i'm supposed to do:

<TD><normalfont><B>User Name:</B></normalfont></TD>
<TD><INPUT TYPE="TEXT" NAME="$username" SIZE=25 MAXLENGTH=25>
</TD>
</TR>

<TD><normalfont><B>Password:</B></normalfont></TD>
<TD><INPUT TYPE="PASSWORD" NAME="$password" SIZE=25 MAXLENGTH=15> </TD></TR>

<TD><normalfont><B>Email:</B></normalfont><br>
<smallfont>Please enter a valid email address. You can choose to hide it below in the preferences section.</smallfont></TD>
<TD><INPUT TYPE="TEXT" NAME="$email" SIZE=25 MAXLENGTH=50>
</TD>
</TR>

PostToHost("www.everyone.net","/whatever/signup2.php","everyonename=".urlencode($username). "&everyoneemail=".urlencode($e mail)."&everyonepassword=".urlencode($password)."" );

function PostToHost($host, $path, $data_to_send) {
$fp = fsockopen($host,80);
fputs($fp, "POST $path HTTP/1.1\n");
fputs($fp, "Host: $host\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\n");
fputs($fp, "Content-length: ".strlen($data_to_send)."\n");
fputs($fp, "Connection: close\n\n");
fputs($fp, $data_to_send);
while(!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}

//end

So that's basically it? Everyoneemail is the imaginary name that everyone.net uses for the form (i havent checked to see the real one).
Based on that, is my code correct?
Reply With Quote
  #56  
Old 01-29-2001, 10:50 PM
chrispadfield10
Guest
 
Posts: n/a
Default

no. you can't mix the html and php just like that.

You need 3 sections:

1) a html file. This should contain your form that you want to get the details from.

Quote:
<TD><normalfont><B>User Name:</B></normalfont></TD>
<TD><INPUT TYPE="TEXT" NAME="$username" SIZE=25 MAXLENGTH=25>
</TD>
</TR>

<TD><normalfont><B>Password:</B></normalfont></TD>
<TD><INPUT TYPE="PASSWORD" NAME="$password" SIZE=25 MAXLENGTH=15> </TD></TR>

<TD><normalfont><B>Email:</B></normalfont><br>
<smallfont>Please enter a valid email address. You can choose to hide it below in the preferences section.</smallfont></TD>
<TD><INPUT TYPE="TEXT" NAME="$email" SIZE=25 MAXLENGTH=50>
</TD>
</TR>
is sort of right but you do not use $password in a form like this you just use name="password" that is all.

Then you need a submit button with the action pointing to your php script script.

2. Php Script.

call this process.php or whatever you want.

it gets the info from the above script (this is email and password). The values that email holds (ie what was typed in) is now held in $email.

You can do now what ever you want with these variables in the script, add them to a database etc whatver.

3. Sending a form off.

If you want to sign someone up for the everyone.net email account then what you have next appears ok

Quote:
PostToHost("www.everyone.net","/whatever/signup2.php","everyonename=".urlencode($username). "&everyoneemail=".urlencode($email)."&everyonepass word=".urlencode($password)."");





function PostToHost($host, $path, $data_to_send) {
$fp = fsockopen($host,80);
fputs($fp, "POST $path HTTP/1.1\n");
fputs($fp, "Host: $host\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\n");
fputs($fp, "Content-length: ".strlen($data_to_send)."\n");
fputs($fp, "Connection: close\n\n");
fputs($fp, $data_to_send);
while(!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
(this should be just a section of your process.php script or whatever you call it.

Of course, everyone.net will need more fields in their signup process, to find out view the source of their webpage. (p.s. i still don't think it will necessary work as they will have referer checking on it but you can try).

That is all there is to it.

p.s.

i think you need to do a bit of reading about how basic form processing in php works so you can understand how the advanced stuff does (which some of this is). There are loads of good tutorials on this sort of thing, www.hotscripts.com is a good place to find lots of them, it will almost certainly help.
Reply With Quote
  #57  
Old 01-29-2001, 11:25 PM
Guest
 
Posts: n/a
Default

It automatically puts whatever value was in email into $email?
Reply With Quote
  #58  
Old 01-29-2001, 11:26 PM
Guest
 
Posts: n/a
Default

or i just say "email='$email'," ?
Reply With Quote
  #59  
Old 01-30-2001, 12:44 PM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by chris
2. Php Script.

call this process.php or whatever you want.

it gets the info from the above script (this is email and password). The values that email holds (ie what was typed in) is now held in $email.

You can do now what ever you want with these variables in the script, add them to a database etc whatver.
In the first part of this script I would basically say: email="$email",
username="$username", password="$password".

Then in the second part, i would send the data, while saying everyonenetuser="$username", etc..?
Reply With Quote
  #60  
Old 01-30-2001, 01:15 PM
chrispadfield2
Guest
 
Posts: n/a
Default

um no.

you already have $username and $password in the script.

You really need to tell me what you are trying to actually do. Are you just trying to have a form on your site so people can sign up to everyone.net? is that it? if so, all you need is the 1st bit (html page for getting info) and the third bit (sending data of to another server).
Reply With Quote
  #61  
Old 01-30-2001, 01:27 PM
Guest
 
Posts: n/a
Default

Will the intermediate file automatically put the content recieved for the field "username" into $username? Could I see the code for the intermediate file?

What I want to do is have users fill out a form, then have it sent to 3 different sign up forms, each time chaning the form names sent to correspond with the unique form names on each of those forms.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:12 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04391 seconds
  • Memory Usage 2,284KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete