Solved

WEB POSTING QUESTION?

Posted on 1998-09-07
13
136 Views
Last Modified: 2011-04-14

I am not sure if this is possible but I am trying construct an application that I would like to in part allow the enduser to post classified ads to free sites automatically from a pre-defined lists.  Is this possible to do in delphi using a thrid party component?  If so please give a demo with source.  I am offering 250pts for this if it can be done.  If you need more information just ask.
0
Comment
Question by:aj85
  • 7
  • 6
13 Comments
 
LVL 4

Expert Comment

by:itamar
ID: 1338860
Hi aj85,

if I understood your question, you have some sites that accept ads, probably trough a CGI.

Yes, you can do it with  FPiette's HTTP component. It's freeware with source code and working examples included.

Take a look at:

http://www.rtfm.be/fpiette/httpcliuk.htm

If you have any doubts, place comments before grading the question. I'm sure we can help you somehow. Give me more details about the sites you intend to work with.

regards,
Itamar
0
 

Author Comment

by:aj85
ID: 1338861

I have looked at these components but maybe I have an older version.  The version that I have doesn't give you an example of posting to sites.  To answer question some of the classifieds sites I plan to include are:

http://www.sundaypaper.com
http://www.mlm.com
http://www.bizopp.com

I plan only to use free sites.  I will  download the HTTP components again for the URL you gave me and see if I have missed something.  Also I will increase my points by 50 if you can answer another question for me dealing with posting to multiple newsgroups at one time.  The question is basically if I have a listbox of newsgroups and I want to be able to post a message to all the groups in that lists, how do I do that?  Please answer as soon as you can.

Thanks,
Tony


0
 
LVL 4

Expert Comment

by:itamar
ID: 1338862
Hi Tony,

I suggest you to post another question about the multiple newsgroup subject.

Now, about the WEB posting:

What you need to do is to send a form to the CGI just like in a submit web button, right ?

Well, the \internet\HttpPg.dpr example show how to do that.
That's the description of the sample:
"Description:  Sample program to demonstrate some of the THttpCli features.
              (POST a message to a CGI)
              (requested by Walter Daniel Leon Salas" <wdaniel@hotmail.com>)
              You can see what HttpPg does automatically using your browser
              and surfing to http://www.unired.net.pe/mensatel.html HttpPg
              does programmatically what you can do manually at this page using
              your browser."

As you have rejected the answer, tell me If I can place this comment as an answer.

Bye,
Itamar
0
 

Author Comment

by:aj85
ID: 1338863
I will post a separate question about the Newsgroups.  However until I try this I can not accept this answer.
0
 
LVL 4

Expert Comment

by:itamar
ID: 1338864
No problem,

but if you need some help on trying HttpCli, let me know.

bye,
Itamar
0
 

Author Comment

by:aj85
ID: 1338865


Itamar,

I downloaded the component but I am not sure how to use it or how it works.  The site that you gave me and that I think it post to is in another language than english.  Therefore I am not sure if it post to it or not.  At any rate any information or assistance you can give me will be appreciated.  Sorry to drag this out some but I just want to get a good understanding on how to accomplish my goal.  Then I will be happy to give the points.

Thanks,
Tony
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 4

Expert Comment

by:itamar
ID: 1338866
All right,

1st - Very strange, the link http://www.rtfm.be/fpiette/httpcliuk.htm is in English. Double-check it.

2nd - Can you find the HttpPg.dpr project in the Internet folder, after unzipping the downloaded file.
0
 

Author Comment

by:aj85
ID: 1338867

Itamar,

Sorry for the miscommunication.  I meant that this url: http://www.unired.net.pe/mensatel.html was not an english site. I should have been clearer...

Tony
0
 
LVL 4

Expert Comment

by:itamar
ID: 1338868
I see,

now to acomplish your task you must open the HTML source of the home-page that contains the form you want to submit.

Take note of the complete address of the CGI that handle the form. It must be in the <FORM ACTION="..."> tag.

Copy the name of the <INPUT TYPE> tags.

See the example project that I mentioned and make the necessary changes.
It´s easier than it looks.

Good luck,
Itamar
0
 

Author Comment

by:aj85
ID: 1338869

Itamar,


Are you saying that for every page that I post to I will need the Form Action page and all the Input Types that make up the page?  Give me more information on this if you can, I think I am clear on this but I am not sure.  Also is this something I will have to hard code as in the example or is there another way to do this?

Thanks,
Tony
0
 
LVL 4

Expert Comment

by:itamar
ID: 1338870
Hi Tony,

Yes, there is not an universal code for that. The forms will vary from site to site. I made an application like that and what I've done to avoid hard-coding was creating a INI file with one section for each service. In each section I have the CGI URL and name of the input types of each form to be submited with some kind of link with your Delphi variables, for example an index for an array, that is 1 - Name, 2 - Address, 3 - ads text and so on.

Be aware to provide an easy way to update this file because if the services change the addresses or the order form you'll have to change the parameters.

I had another idea but I don't know if you have the resources for that, but that's it:
If you can have your own site, your app could be hard-coded, sending all the requests to YOUR site then you would have to write a cgi to redirect to the service CGI. The advantage is that it's easier to follow the changes of the sites you work with.

I hope I can help you somehow,

Regards,
Itamar

0
 
LVL 4

Accepted Solution

by:
itamar earned 250 total points
ID: 1338871
See question history.
0
 

Author Comment

by:aj85
ID: 1338872

Itamar,

Thanks, here are your points.

Tony
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now