![]() |
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 |
i started a post about just the same type of thing yesterday:
http://vbulletin.com/forum/showthread.php?threadid=7216 |
i dont understand what your trying to do on your site. If they sign up it puts them in the database. I want to have a form that signs them up to multiple sites, and i dont have explicit access to the database.
|
Also, I dont want to have multiple sign ups to Vb.
I want it to sign up to Vb, a chat service, and everyone.net, all from one page. The problem is, each of those services name the fields differently, one calls the username "username", another calls it "Dig.user", etc.. |
same here....
basically i want this for two things. 1 is exactly what you want, so that they sign up for say vbulletin and their email also goes to a mailing list script as well. Secondly, i want to be able to put some code into someone's elses of server script (that does NOT do mysql itself with username and password) that sends some info to say register2.php (to be made) on my server that adds the info to my database? ie. 1. user goes to http://www.friendsdomain.com 2. user fills in form to sign up for friendsdomain.com 3. form contains username and email etc. 4. presses submit 5. goes to http://www.friendsdomain.com/processform.php ---- 6. Now i want that info to also be sent to http://www.mydomain.com/register.php so it can deal with it. ---- 7. user sent to http://www.friendsdomain.com/thankyou.php |
Everything you want done can be done, I just don't know the way to code it.
It will fire off a Lynx browser on your system, that updates each of those other sites Like http://www.blah.com/register.cgi?use...&password=blah etc The sistes would have to all a post from outside their server on the script for it to work. |
cool... i suppose the hidden frame thing could work like that as well creating a frame with url
http://www.domain.com/register.php?u...assword=blah.. i may see if i can do that although doing it the way you suggest would be a lot better, i will search around and see if i can find anything. |
What I've done is simple, probably not incredibly efficient, but it works. :)
$blah = file("http://www.domain.com/script.php?arg=".urlencode($val)."&arg2=1"); Of course, this might not work if the program being used ignores variables sent through GET. :) You could do a more complex way and just emulate POST, but I'm not going to go into that. |
Quote:
|
cool ed, simplicity is best - clever
thanks eugenie $blah = file("http://www.domain.com/index.html") just tells the script to download the file (in the process of course it sends the data to that server.. about to come to that). the ?arg=blah arg is like username= and blah would be the actual username now the .urelencode($val) is just to turn $val (which may be say two words into url transmittalbe information). Make sense. ED: How would you do this in perl? |
You have to use LWP.
Don't even ask. :) |
Quote:
Quote:
Quote:
"arg" would be the name that everyone.net uses for the username form field? "blah" would be whatever name I used for my username form field; in my sign up script? And the script would transfer the data in the "blah" field to the "arg" field? ED: I think there is a " missing before 1" in arg2=1", not sure though I'm in this program at biztech.nfte.com and they are looking into BB systems. The only problem is biztech mainly for entrepreneurs under 18 (some under 14), so they aren't sure about the legalities. What do you know about this? If they use the COPPA form will they be free of legalities? If you get a chance could you email, or ask someone within Jelsoft to contact them? They are a possible source of a large number of licenses. Doloresh@nfte.com, nhupert@edc.org -Eugene (no, not Eugenie, lol) |
you might have more problem getting this to work with something like everyone.net who might not work with this type of system. It would not be the sginup.htlm page you call anyway but the CGI or PHP or ASP whatever it is program that processes the form when someone clicks submit. I have to say i doubt it will work. This type of thing is really only going to work if you control the scripts which for everyone.net you don't. I wanted to do it for http://www.communityarchitect.com as well but i don't think i can (especially as they appear to have something preventing that as well).
|
Can't you just have it send the data to the resulting html page that is created. The sign up page?
|
Essentially fill out the fields on the everyone.net page, and the fields on the vb sign up page, and submit it, without the user knowing?
|
no :) i don't think you understand how it works.
HTML page containing form. Visitor types in info Submits form Goes to script on server for processing. that is what happens. to get it to go to two different scripts for processing (what we want) is impossible directly (it appears). So what we do is get one of the scripts, to call the other script not as a form but using a URL. This is what ed suggests. The url will have to be done in a special way as shown to make it work. Everyone net probably won't allow their scripts to sign people up in this way (GET as opposed to POST) but you can try. |
So if it uses GET i can have the script call http://www.site.com/signup.asp?usern...sword="qwerty"
and that will fill out and submit the username and password fields? |
you cannot explicitly tell a script that:
form field one = form field alpha alpha being on your page. For example, you can't have the script take all the user's data, send it to a central file. Then have the script take the username entry, and enter it into each field, the username entry on everyone.net, the dig.user entry on livuniverse.com, etc... and submit it? |
what about having the other pages loaded in a hidden frame, each time the data is entered its passed along to the other frames, with the name changed appropriately for each hidden frame?
Then when the user hits submit that submits the other frames at the same time? |
Quote:
yes, if it works with GET that is what I think Ed is suggesting but i havn't tried it yet. If they make you use the POST protocol then this won't work. |
but I thought using ? just passes it to another form and doesnt allow it to be submitted. That's the impression I got from http://tech.irt.org/articles/js063/index.htm
|
How old are you? Just wondering..
|
Create a form and put some fake fields in it.
Make it's method POST. Submit it and look at the URL. Change it's mehtod to GET. Submit it and look at the URL. That's their difference. |
I see, GET passes the values in the URL. How does POST pass the values?
|
I looked at some GET vs POST answered questions at ASKasp.com and found some answers. With GET data is unsecure and limited to 250 chars, but visible in the address bar, POST sends the data to the server which processes it?
|
yup makes sense, like replying to this thread uses post. Ed is basically saying we can use his trick only if the resulting script will allow data input by the GET method. then it will work. If it dosen't (and i am betting everyone.net dosen't) and they use only POST then, we are i think, stuck.
|
If you want to use POST (you can go get this way too), you have to use sockets: http://www.php.net/manual/en/function.fsockopen.php
|
On the side, just saw anti-trust (only plays late at nite for some reason).
I find it interesting that the head of NURV (the MS like company) looks very much like Mr. Gates. The movie kind of creeped me out. I keep taking looks over my shoulder now and then. You should see it. I give it a B+. Thank god there is a way. I guess this is sort of like my crusade to find the holy grail. -Eugene |
$fp = fsockopen ("www.php.net", 80, $errno, $errstr, 30);
if (!$fp) { echo "$errstr ($errno)<br>\n"; } else { fputs ($fp, "GET / HTTP/1.0\r\n\r\n"); while (!feof($fp)) { echo fgets ($fp,128); } fclose ($fp); } is that what I use? Where do I insert fopen("http://some.site.com/html/page.html","r") ? |
Quote:
the get method worked fine with: Quote:
|
Maybe these threads will help?
http://www.phpbuilder.com/mail/php3-...99806/0902.php |
<a href="http://marc.theaimsgroup.com/?l=php-general&m=90222503032679&w=2" target="_blank">http://marc.theaimsgroup.com/?l=php-...2503032679&w=2</a>
|
<a href="http://marc.theaimsgroup.com/?l=php-general&m=90222503032679&w=2" target="_blank">http://marc.theaimsgroup.com/?l=php-...2503032679&w=2</a>
is very useful, thanks. Will try that out very soon. |
Here is the original, with other items about it
http://www.phpbuilder.com/mail/php3-...99806/0856.php |
Quote:
have you got it working now? i have with the links you gave me, if you need help i can but i imagine you have it working now?? |
Nope, I'm not sure which script to use to accomplish what I need.
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); } You would call this function with something like: PostToHost("www.whatever.com","/cgi-bin/whatever.cgi","abc=123&def=456"); or $fp = fsockopen ("www.php.net", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br>\n"; } else { fputs ($fp, "GET / HTTP/1.0\r\n\r\n"); while (!feof($fp)) { echo fgets ($fp,128); } fclose ($fp); } Perhaps you can email me what you did if you don't want to display it. |
ok.
i have two scripts. one is called signup.php and the other is called signup2.php the idea is that signup.php is like the register script for vbulletin. It does whatever it does and then you add in a bit more to make it send the data to your other script. The other script is signup2.php - this would perhaps be your everyone.net script etc (it is the one that you do NOT need to edit). Anyway, this is what i added to signup.php Quote:
1) connects to the domain name http://www.ascifi.net 2) and finds the script url at /post/signup2.php 3) it then sends the data name=$name url=$url description=$description 4) prints if it works or not. So basically, signup.php is sending a form containing a name, email and a description field to your external script as if a webuser was doing it. This should work for everyone.net i would think. |
So basically I would substitute in the address of the everyone.net sign up page instead of index2.php?
Does it matter that everyone.net might use something other than php? |
Your a scifier? Cool.
Im a trekkie, although I like andromeda more nowadays. Beltran (Q) was on andromeda, and is going to be in the next episode on monday nite. I missed the first version on Saturday. How old are you? Anyway, this will open a socket to the site, and they will be unable to avoid this emulation, no? Your version will send whatever $email is equal to, put it in the form field named "email", send whatever $username is equal to, and put it in the form field named "username"; since "email"=$email, and "username"=$username It will submit it to whatever script is running (whether it be Perl/CGI, PHP, ASP, etc... since the script will get the HTML end result of the PHP, Perl, or ASP script)? |
yeah that is all correct, it will not matter if asp etc.
couple of things: 1) check out the everyone.net signup page, they may have hidden variables and stuff like that you need to incclude 2) it is NOT guaranteed to work by any stretch of the imagination. Everyone.net can prevent signups coming from outisde their domain, so that it would have to be from their page, if they did this at a server level you might not get round it, i recon you probably could though as communityarchitect.com went to quite strong measures to stop this sort of thing, see www.signup.ascifi.net to see (at the bottom you have to type in the numbers and graphics they have). I am 19. Sci-Fi yeah, love it. stargate/farscape are my favourite. ST i like in moderation, andromeda.. um.. ok but Kevin Sorbo is just, i am afraid to say, corny. Suffice to say my opinions arn't hugely popular on my www.talkandromeda.com board but lots there like it. Do come and join in :) |
All times are GMT. The time now is 03:22 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|