Page 1 of 1
It was done to simulate POST data?
Posted: Tue Jun 10, 2008 9:45 pm
by yanglei1979
It was done to simulate POST data?
To be a thinking?
For example: the use of function:fsockopen(),curl(), and so on.
Re: It was done to simulate POST data?
Posted: Wed Jun 11, 2008 12:51 am
by RobertGonzalez
Huh

Re: It was done to simulate POST data?
Posted: Wed Jun 11, 2008 3:07 am
by yanglei1979
Everah wrote:Huh

What's your mean?
I want to post date to this url:
http://contact.ebay.com/ws/eBayISAPI.dll
I use this function:fsockopen(), But not show content.
Re: It was done to simulate POST data?
Posted: Wed Jun 11, 2008 5:09 am
by superdezign
Still confused, but at least it now sounds as though you have a legitimate question.

You know, PHP is a language that transcends other languages. Just show us some code, and we'll be able to help you out.
Re: It was done to simulate POST data?
Posted: Wed Jun 11, 2008 10:14 am
by RobertGonzalez
Use cURL. Send post data with it. it is in the manual. In fact, I think I just posted an example a few days ago about how to use cURL to post. Try searching my posts from the last week or so.
Re: It was done to simulate POST data?
Posted: Thu Jun 12, 2008 8:49 pm
by yanglei1979
Everah wrote:Use cURL. Send post data with it. it is in the manual. In fact, I think I just posted an example a few days ago about how to use cURL to post. Try searching my posts from the last week or so.
Thank you very much ,my teacher.
This is the php CURL code that I write:
Code: Select all
<?PHP
$ch = curl_init ("http://contact.ebay.com/ws/eBayISAPI.dll") ;
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1) ;
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "");
$res = curl_exec ($ch) ;
curl_close ($ch) ;
echo $res;
?>
But It display nothing. why?
Re: It was done to simulate POST data?
Posted: Thu Jun 12, 2008 9:55 pm
by RobertGonzalez
Try
var_dump() some of the stuff that you expect to see. That will always help you.
Re: It was done to simulate POST data?
Posted: Thu Jun 12, 2008 9:56 pm
by Ollie Saunders
Also stick these below the <?php
Code: Select all
error_reporting(E_ALL);
ini_set('display_errors', 'on');
Re: It was done to simulate POST data?
Posted: Fri Jun 13, 2008 12:12 am
by yanglei1979
ole wrote:Also stick these below the <?php
Code: Select all
error_reporting(E_ALL);
ini_set('display_errors', 'on');
I added,but still display nothing.
Re: It was done to simulate POST data?
Posted: Fri Jun 13, 2008 1:26 am
by Ollie Saunders
Did you do what everah suggested?
Re: It was done to simulate POST data?
Posted: Fri Jun 13, 2008 2:42 am
by onion2k
Why are you trying to automate sending something to ebay's contact page? ebay have a developer API that you can use to do most things in their system... this sounds like you're trying to do something dodgy. Either explain what you need to do or this thread will be locked.
Re: It was done to simulate POST data?
Posted: Fri Jun 13, 2008 11:55 pm
by yanglei1979
onion2k wrote:Why are you trying to automate sending something to ebay's contact page? ebay have a developer API that you can use to do most things in their system... this sounds like you're trying to do something dodgy. Either explain what you need to do or this thread will be locked.
I want to study How to prevent the machine to submit data to my site.
I found that they have done better.