sdaniels Posted July 31, 2006 Share Posted July 31, 2006 Is it possible to send data to an external website?for instance: if i have a link on a site that I maintain. I wnat to click the link and have it open a different website that I do not maintain and fill out some form info on that site automaticly...can this be done? Quote Link to comment https://forums.phpfreaks.com/topic/16118-send-datakeystrokes-to-external-website/ Share on other sites More sharing options...
Vinze Posted July 31, 2006 Share Posted July 31, 2006 Yeah, I recently found out how to, it involves fsockopen() and more, however, now I tried this on normal hosts (not my local one) then it's always blocked. Anyway, I don't know what kind of data you want to send but POST and GET data are possible. If you want that, say so and I'll see if I can find the link. Quote Link to comment https://forums.phpfreaks.com/topic/16118-send-datakeystrokes-to-external-website/#findComment-66462 Share on other sites More sharing options...
sdaniels Posted July 31, 2006 Author Share Posted July 31, 2006 thats exactly what im looking for.an example of what I need would be something like a link on my site that says yahoo, and when clicked it openes yahoo.com and then submits a post in the search field.Im tryiing to make a page that will store all my usernames and passwords in a table, when i click the link to the site I want it to launch the page and fill out my info automaticly. and for those of you that are going to tell me: yes i am aware that most browsers have a feature that allready does this. but it only works from that pc under my profile, i want to be able to access it from anywhere. Quote Link to comment https://forums.phpfreaks.com/topic/16118-send-datakeystrokes-to-external-website/#findComment-66469 Share on other sites More sharing options...
r3gan Posted July 31, 2006 Share Posted July 31, 2006 You might be able to accomplish this by simply finding out the variable names of the target site's form, and then passing the variables to that page. For example, if the form's text field is named "userName", then you might be able just point to http://www.example.com/page?userName=myusername Quote Link to comment https://forums.phpfreaks.com/topic/16118-send-datakeystrokes-to-external-website/#findComment-66474 Share on other sites More sharing options...
sdaniels Posted July 31, 2006 Author Share Posted July 31, 2006 Will that work for pages that are not encoded with PHP as well? Quote Link to comment https://forums.phpfreaks.com/topic/16118-send-datakeystrokes-to-external-website/#findComment-66482 Share on other sites More sharing options...
r3gan Posted July 31, 2006 Share Posted July 31, 2006 It will work for any page that has the ability to set a default or initial value to the form field. Quote Link to comment https://forums.phpfreaks.com/topic/16118-send-datakeystrokes-to-external-website/#findComment-66490 Share on other sites More sharing options...
Vinze Posted July 31, 2006 Share Posted July 31, 2006 I was talking about [url=http://www.zend.com/zend/spotlight/mimocsumissions.php]this[/url]. I recommend using this default function as it saves you time and can handle POST and GET data. Get it [url=http://www.zend.com/codex.php?id=77&single=1]here[/url]. Quote Link to comment https://forums.phpfreaks.com/topic/16118-send-datakeystrokes-to-external-website/#findComment-66491 Share on other sites More sharing options...
xyph Posted July 31, 2006 Share Posted July 31, 2006 Most sites will distinguish between get and post variables when parsing forms. Just find their action page in the form tag, and replicate their form, jsut change the element types to hidden (except the submit button) and fill in your values. Then just name the submit button the site you're logging in to. Quote Link to comment https://forums.phpfreaks.com/topic/16118-send-datakeystrokes-to-external-website/#findComment-66493 Share on other sites More sharing options...
sdaniels Posted July 31, 2006 Author Share Posted July 31, 2006 Perfect, thats what I was lookin for. Thanks for the help on this one! Quote Link to comment https://forums.phpfreaks.com/topic/16118-send-datakeystrokes-to-external-website/#findComment-66496 Share on other sites More sharing options...
ryanlwh Posted July 31, 2006 Share Posted July 31, 2006 also check out CURL Quote Link to comment https://forums.phpfreaks.com/topic/16118-send-datakeystrokes-to-external-website/#findComment-66525 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.