RE: [PHP] curl and variable parameters in hyperlink

2010-11-24 Thread Bob Keightley
Thanks to all for your interest so far but as I said, new to PHP. Changed POST to GET and all now working fine! Tommy, the third party site is fully aware of what I am doing. We pay them to use the data, as do lots of other companies in our industry. Supplying data is what they do. We could not

RE: [PHP] curl and variable parameters in hyperlink

2010-11-24 Thread Tommy Pham
> -Original Message- > From: Bob Keightley [mailto:bob.keight...@virgin.net] > Sent: Wednesday, November 24, 2010 11:25 AM > To: php-general@lists.php.net > Subject: Re: [PHP] curl and variable parameters in hyperlink > > Guess I've not explained this very well

Re: [PHP] curl and variable parameters in hyperlink

2010-11-24 Thread Bob Keightley
Guess I've not explained this very well. The external page I am fetching using another curl script has asp query hyperlinks in it. I do not know the variable names in each query or the values they have. All I want to do is replace the external url referenced in those links with a url which is

Re: [PHP] curl and variable parameters in hyperlink

2010-11-24 Thread Daniel Molina Wegener
On Wednesday 24 November 2010, "Bob Keightley" wrote: > I already have a curl script that gets the web page, but it doesn't pass > the parameters Hello Bob, > > Being new to PHP I haven't the first idea how to modify it so that it > does. > > Script is as follows: > > $url = "http://www.xx

Re: [PHP] curl and variable parameters in hyperlink

2010-11-24 Thread Adam Richardson
> > foreach ($_POST as $key=>$post) { >$post=str_replace(" ", "+", $post); >$url.=$key."=".$post."&"; >} > Hi Bob, One thing I see is that you're appending values on to the end of a url that already has 2 values, so you should place the "&" at the beginning of your line in

RE: [PHP] curl and variable parameters in hyperlink

2010-11-23 Thread Bob Keightley
I already have a curl script that gets the web page, but it doesn't pass the parameters Being new to PHP I haven't the first idea how to modify it so that it does. Script is as follows: $url = "http://www.xx.com/query.asp?param1=val1¶m2=val2";; foreach ($_POST as $key=>$post) { $po

RE: [PHP] curl and variable parameters in hyperlink

2010-11-23 Thread admin
:12 PM To: php-general@lists.php.net Subject: [PHP] curl and variable parameters in hyperlink First use of Curl so probably a very simple problem - I have a script which loads a third party web page into my site. That page contains links which have variable parameters i.e. www.blahblah.asp

[PHP] curl and variable parameters in hyperlink

2010-11-23 Thread Bob Keightley
First use of Curl so probably a very simple problem - I have a script which loads a third party web page into my site. That page contains links which have variable parameters i.e. www.blahblah.asp?param1=xxx¶m2=yyy. Any clues as to what I need to do to pass these parameters in a curl script ap