It was done to simulate POST data?
Moderator: General Moderators
-
yanglei1979
- Forum Commoner
- Posts: 38
- Joined: Sat Aug 25, 2007 10:21 pm
It was done to simulate POST data?
It was done to simulate POST data?
To be a thinking?
For example: the use of function:fsockopen(),curl(), and so on.
To be a thinking?
For example: the use of function:fsockopen(),curl(), and so on.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
-
yanglei1979
- Forum Commoner
- Posts: 38
- Joined: Sat Aug 25, 2007 10:21 pm
Re: It was done to simulate POST data?
What's your mean?Everah wrote:Huh
I want to post date to this url:http://contact.ebay.com/ws/eBayISAPI.dll
I use this function:fsockopen(), But not show content.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: It was done to simulate POST data?
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.
You know, PHP is a language that transcends other languages. Just show us some code, and we'll be able to help you out.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: It was done to simulate POST data?
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.
-
yanglei1979
- Forum Commoner
- Posts: 38
- Joined: Sat Aug 25, 2007 10:21 pm
Re: It was done to simulate POST data?
Thank you very much ,my teacher.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.
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;
?>- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: It was done to simulate POST data?
Try var_dump() some of the stuff that you expect to see. That will always help you.
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: It was done to simulate POST data?
Also stick these below the <?php
Code: Select all
error_reporting(E_ALL);
ini_set('display_errors', 'on');-
yanglei1979
- Forum Commoner
- Posts: 38
- Joined: Sat Aug 25, 2007 10:21 pm
Re: It was done to simulate POST data?
I added,but still display nothing.ole wrote:Also stick these below the <?phpCode: Select all
error_reporting(E_ALL); ini_set('display_errors', 'on');
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: It was done to simulate POST data?
Did you do what everah suggested?
Re: It was done to simulate POST data?
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.
-
yanglei1979
- Forum Commoner
- Posts: 38
- Joined: Sat Aug 25, 2007 10:21 pm
Re: It was done to simulate POST data?
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.