dahlia84 Posted January 5, 2010 Share Posted January 5, 2010 Hi Guys, I was searching Google for Php Forum and found this Community. I want a guidance and hence I registered here to ask my question. I want to login on to a site and post (I mean submit) some data to that site. I want to achive this using a Php Script. Say, I have the script hosted on mydoamin.com/myscript.php When I go to mydoamin.com/myscript.php I will manually input the data which needs to be submitted to that particular website. Once after I click on the Submit button on my script page, I want the script to login to that particular website and also post the data there. How I can achieve this? I am new to Php however I am not a noob. I use wordpress and that is how I started learning bits and pieces of php. I am a C programmer so I am not new to programming either. Can someone show me some pointers? I mean I searched Google and found that cURL is what I need to use to achieve this kind of task. I have started learning... Meanwhile, Can someone show some examples which will smoothen my learning process and make it easier a bit? Please guide me and point me in the correct direction. Thanks for your time! Link to comment https://forums.phpfreaks.com/topic/187227-website-manipulation-in-php/ Share on other sites More sharing options...
Catfish Posted January 5, 2010 Share Posted January 5, 2010 familiarize yourself with the predefined variables $_GET $_POST and $_SESSION. That is how a lot of form and session data is passed around. http://au.php.net/manual/en/reserved.variables.php Link to comment https://forums.phpfreaks.com/topic/187227-website-manipulation-in-php/#findComment-988720 Share on other sites More sharing options...
dahlia84 Posted January 5, 2010 Author Share Posted January 5, 2010 Thanks CatFish for your reply. I will go through the link you provided. Can you point me to some of the example where logging onto a website via PHP Script is illustrated, please? I tried Googling and found Sample PHP Login Pages and not How to login onto a site using PHP. May be I am just a bad Googler. Link to comment https://forums.phpfreaks.com/topic/187227-website-manipulation-in-php/#findComment-988731 Share on other sites More sharing options...
oni-kun Posted January 5, 2010 Share Posted January 5, 2010 Thanks CatFish for your reply. I will go through the link you provided. Can you point me to some of the example where logging onto a website via PHP Script is illustrated, please? I tried Googling and found Sample PHP Login Pages and not How to login onto a site using PHP. May be I am just a bad Googler. You'll need to use something such as CURL, Here are some examples. More about it here. CURL is a wrapper that is able to send POST data easily, it's a much more efficient method over sending headers yourself and all that. Link to comment https://forums.phpfreaks.com/topic/187227-website-manipulation-in-php/#findComment-988752 Share on other sites More sharing options...
dahlia84 Posted January 5, 2010 Author Share Posted January 5, 2010 Thanks very much. A lot for me to practice now! Link to comment https://forums.phpfreaks.com/topic/187227-website-manipulation-in-php/#findComment-988776 Share on other sites More sharing options...
crabfinger Posted January 5, 2010 Share Posted January 5, 2010 Though I would watch out in doing this script, some websites may think of this as phishing. I tried something similar once and I got a phone call from the server administrators at the site saying I had 15 minutes to take down the script or the authorities would be notified. Link to comment https://forums.phpfreaks.com/topic/187227-website-manipulation-in-php/#findComment-988781 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.