FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Program to Submit to forms
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Program to Submit to forms [message #173923 is a reply to message #173918] Thu, 12 May 2011 23:30 Go to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 5/12/2011 3:43 PM, Charlie wrote:
> On May 12, 9:26 am, Jerry Stuckle<jstuck...@attglobal.net> wrote:
>> On 5/12/2011 7:25 AM, Charlie wrote:
>>
>>
>>
>>
>>
>>> On May 12, 12:21 am, Denis McMahon<denis.m.f.mcma...@gmail.com>
>>> wrote:
>>>> On Wed, 11 May 2011 18:02:40 -0700, Charlie wrote:
>>>> > Every reference to form handler ... blah
>>
>>>> Charlie.
>>
>>>> You asked two questions. One question was "Can I do x using php?"
>>
>>>> The answer is yes, and that was the answer you were given.
>>
>>>> If you meant to ask "How do I ..." then ask "How do I ..."
>>
>>>> The other question you asked was "Can I do x using other languages?" and
>>>> again you were given the answer yes, because yes is again the correct
>>>> answer.
>>
>>>> If you're looking for a method to make a php script load a page from a
>>>> website, look at the curl module of php.
>>
>>>> Assuming you have an array of website urls and some formdata, you could,
>>>> for example, use a foreach loop to iterate over the array and curl to
>>>> submit the formdata to each website in turn.
>>
>>>> curl:http://www.php.net/manual/book.curl.php
>>>> foreach:http://www.php.net/manual/control-structures.foreach.php
>>>> arrays:http://www.php.net/manual/language.types.array.php
>>
>>>> Rgds
>>
>>>> Denis McMahon
>>
>>> Lessons on grammar and trivialities such as loops are not productive.
>>> Nor is the use of singular when referring to an aspect of PHP
>>> consisting of 15 different functions, and reference to a page that
>>> lists options such as "starting a session" and "getting information on
>>> transfers and handles" without explanation as to what they mean or if
>>> they relate to what I want to do.
>>
>>> If I want to load a page from a website, you ask? I thought I
>>> explained exactly what I want. (I referred to 10 arbitrary URLs to
>>> make it clear that the URLs are variable and arbitrary rather than
>>> being a single constant URL that might open up the possibility of a
>>> hard-coded solution not appropriate for my needs.)
>>
>>> But if nobody is willing to simply talk about PHP code that does what
>>> I want (without a barrage of undefined alternate functionality to wade
>>> through) I will just pay someone from India to explain it. His
>>> English might be even worse than mine, but his sarcasm and
>>> condescending level are nonexistant (which also counts.)
>>
>>> Thanks
>>
>>> Charlie
>>
>> With that attitude, you will need to pay someone to help you.
>>
>> Denis's answer was correct - and considering no one here knows your
>> level of expertise, I think his comments on loops were fine.
>>
>> As for his comments on curl - he's also correct in pointing you in the
>> right direction. Sure there are several functions available - but the
>> doc is pretty good on what they do.
>
> etc.
>
> Well, if he was sincere, then my apologies. :)
>
> But it seemed obvious to me what I was asking and it is frustrating
> when someone knows something and "points you in the right direction"
> instead of just saying which one it is (same number of keystrokes.) I
> like to think that if someone asks me a question, I give them a couple
> of specifics - like the actual function and a brief description of how
> to use it.
>
> I just don't see the point of saying "curl" instead of "curl_exec" or
> whichever one it is. I have to spend 30 minutes going through and
> trying to figure out 15 functions (and very special ones at that)
> because he couldn't type 5 more characters.
>

That's because it will take more than one function to do it. It's not a
simple one-liner; you also have to set the proper options, parse input
data (if you retrieve the page), set up output data, etc.

> Yeah, it's free. But really, whatever the price, if I do something I
> do it for real.
>
> Someone who had volunteered to help a standards group I also helped
> once said that he wasn't going to do a lot of the job because "I'm
> doing it for free." I felt like saying, "You knew the pay scale when
> you applied for the job. What if your secretary said "My salary's too
> low - I'm not going to do half the job."? If you're not going to do
> the job, let someone else who will do it." but I didn't.
>
> Not going to happen? To me writing code (using constructs that I
> know, of course) is like writing English. If someone asks how to do
> something that I know how to do, I just do it - write the code, here's
> the function. I don't give a link to 15 functions and say it's one of
> them, go figure it out. It will happen if someone asked me and I knew
> the answer. My posts tend to be pretty long and detailed.
>

Writing code is how I (in part) make a living. I can't eat if I give
everything away. Most here are in the same boat. We'll give advice to
help you get on the right track, but not write the code for you -
especially if it's more than a few lines.

You'd be surprised what some people have come in here asking be done for
free!

> So I guess I have to learn to ignore the ones that really don't help
> that much. I'm thinking it can't be that much to post to a form on
> another URL.
>
> Of course I could be wrong.
>

It takes some coding, but it's not all that difficult. But there are
problems such as your code breaking if they change the page you're
posting to - as well as keeping track of everything which needs to be
posted.

Of course, if you're making this generic, you don't have those problems
- but then you have to parse each page to determine what's required -
much more difficult.

> I AM a big perfectionist, actually.
>
> I voted for Ross Perot. (Look up his interviews. Multi-billionaire
> who talked about people becoming lazy after World War II and America
> losing its edge. He got 15% of the vote.)
>

I know all about Ross. He didn't get my vote. :)

> Charlie
>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: magic_quotes_gpc() on or off?
Next Topic: Re: A question about refresh
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 27 18:38:16 GMT 2024

Total time taken to generate the page: 0.04489 seconds