Jump to content
sasori

how to cross post when target site has no open API endpoint?

Recommended Posts

Hi,

 

Is it possible to cross post some data to a target site even if the target has not open API end point? let's say for example 

the ebay.com website. They have an API for developers to use 

and I think it's easy to post some data/ads to their site because of this maybe by just using CURL of php..

but what if my real target website doesn't have open API?, is it possible to do that in PHP?. can someone give me a short snippet

how to do that if possible?, 

Share this post


Link to post
Share on other sites

So the target website has a form, and instead of manually filling out that form, you want to send the data automatically? Yes, this can theoretically be done with cURL.

 

If this form is only accessible to authenticated users, you'll have a hard time automating the process, because you need to maintain a session and probably even scrape the anti-CSRF token from the form before you're allowed to do anything. If the form is public, it's a bit easier. Either way, your program may break at any time, because the website owner might change the input parameters.

 

What exactly are you trying to achieve?

Edited by Jacques1

Share this post


Link to post
Share on other sites

So the target website has a form, and instead of manually filling out that form, you want to send the data automatically? Yes, this can theoretically be done with cURL.

 

If this form is only accessible to authenticated users, you'll have a hard time automating the process, because you need to maintain a session and probably even scrape the anti-CSRF token from the form before you're allowed to do anything. If the form is public, it's a bit easier. Either way, your program may break at any time, because the website owner might change the input parameters.

 

What exactly are you trying to achieve?

That's the exact thing I want to achieve from my first post, I only used ebay as an example. Because my real target website that is similar to ebay, has no open API end point at all. And yes, the target website has a form, but, one needs to login before being able to post anything, can you give me a sample snippet on how to do it via cURL ?..I know how to use curl, but I just wanna see how others will do it

Share this post


Link to post
Share on other sites

What's the overall goal here? Because honestly, it kinda sounds shady.

Share this post


Link to post
Share on other sites

I suspect the real question is "How can I bombard sites with spam?"

Share this post


Link to post
Share on other sites

That's my question. I'm not judging, and the intent may be completely benign, but it sounds like "Help me create a CSRF script, please".

Share this post


Link to post
Share on other sites

There are perfectly legitimate use cases for automated form submission. Sometimes a website simply doesn't have an official API.

 

But, yeah, the problem description needs to be a lot more specific.

 

sasori, why don't you give it a shot? The Internet is already full of code snippets, so that shouldn't be the problem. If you run into an issue, post your code and tell us what exactly you don't understand.

Share this post


Link to post
Share on other sites

ok I'll tell the real score why I came up with this question..it's because one of my colleague asked me to experiment and create a platform that can do cross posting to other shopping sites, so that sellers can use it and ease the pain of opening tabs of different sites and posting again and again...

Share this post


Link to post
Share on other sites

Yeah, well, that's not really a good idea.

 

Web scraping is OK for one-off tasks. But you wouldn't build an entire platform around a very fragile and very unofficial hack. You may actually get in trouble with the shop owners, because not everybody is OK with bots posting data. And even if you're allowed to do it, you get zero stability. The forms will probably change all the time, and that means your tools will break all the time and require manual updates. Sounds like a nightmare.

 

So before you jump to the technical implementation, you should clarify some conceptual questions. Are you even allowed to do this? Is everybody willing to accept the problems of this approach? Is there really no better way like a basic API? etc.

 

In any case, this is way beyond the capabilities of a help forum. You'll need a lot more than a beginner's tutorial for cURL.

Share this post


Link to post
Share on other sites

Yeah, well, that's not really a good idea.

 

Web scraping is OK for one-off tasks. But you wouldn't build an entire platform around a very fragile and very unofficial hack. You may actually get in trouble with the shop owners, because not everybody is OK with bots posting data. And even if you're allowed to do it, you get zero stability. The forms will probably change all the time, and that means your tools will break all the time and require manual updates. Sounds like a nightmare.

 

So before you jump to the technical implementation, you should clarify some conceptual questions. Are you even allowed to do this? Is everybody willing to accept the problems of this approach? Is there really no better way like a basic API? etc.

 

In any case, this is way beyond the capabilities of a help forum. You'll need a lot more than a beginner's tutorial for cURL.

 

But it's not actually a bot..the concept of the proposed experiment, was , enable the user to login in within that platform, and choose the shops that he/she like to have his/her ad posted by just filling up a form and one click of a submit button. But still I find it hard. I've already tried cURLing in one of the target sites and since it has no api available I failed already. :)))

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

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.