Jump to content

Website Manipulation in PHP


dahlia84

Recommended Posts

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

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.

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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.