Jump to content

cgchris99

Members
  • Posts

    37
  • Joined

  • Last visited

    Never

Everything posted by cgchris99

  1. Ok, I need to make a PHP Curl request sending some XML Code. According do the API docs it must be in a field called data. When I make the request it says no data. So I thought I would test this on my own server. I have a a file called testpostxml.php <pre> <?php print_r($_POST);?> </pre> The response is Array ( ) So it appears that no data is getting sent to the server except the URL. The XML data must not be going thru or the post variable is not getting set properly. public function sendHttpRequest($requestBody) { //build eBay headers using variables passed via constructor $headers = $this->buildHeaders($requestBody); //initialise a CURL session $connection = curl_init(); //set the server we are using (could be Sandbox or Production server) curl_setopt($connection, CURLOPT_URL, $this->serverUrl); //stop CURL from verifying the peer's certificate curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"); //set the headers using the array of headers curl_setopt($connection, CURLOPT_HTTPHEADER, $headers); //set method as POST curl_setopt($connection, CURLOPT_POST, 1); //set the XML body of the request // curl_setopt($connection, CURLOPT_POSTFIELDS, $requestBody); curl_setopt($connection, CURLOPT_POSTFIELDS, 'data='.urlencode($requestBody)); //set it to return the transfer as a string from curl_exec curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1); //Send the Request $response = curl_exec($connection); //close the connection curl_close($connection); //return the response return $response; } Is this the best way to test out what gets sent to the URL including the post variables? If anyone has advice, it would really help me out.
  2. It's not bots that are the problem. It is vendors trying to sell their products to the clubs or other websites promoting their own website. So one person gets on the site and contacts 50 clubs sending the same message to each one club. We have a notice that the page that it is not to be used for commercial purposes but you can see how well that works. I would like to allow them to send two messages in a 24 hour period.
  3. I have a site that deals with Clubs and there is contact info on there so the members are allowed to contact the club and it gets email through our system. I want to be able to keep the clubs from getting spammed. For example, the same person contacts ClubA, ClubB, ClubC, ClubD etc. What is the best way to handle this? Do I create session to block this? Thanks for any advice.
  4. Any recommendations on another api to test?
  5. I have been using phoogle to display maps on my site. Today I noticed that a map wasn't displaying. After doing some research, it is not on problem on all locations. So I went to maps.google.com and put in the address and the map displayed perfectly. So some maps display correctly and some do not. The only thing that makes this one any different is it doesn't have a street number but maps.google.com shows up perfectly. Anyone have any advice or thoughts? Thanks
  6. I just didn't want the message to get bounced by some anti spam detection software. This was my fear that the reply to email address domain didn't match the sender.
  7. Can I insert the users email address in the from record using the Mail() or will it get flagged as spam because it's not from my domain? Right now, I have a contact page so the members can contact other member but they do not see the email addresses. It all happens through my site. The problem is right now, when the contact person gets the message a lot of times they click reply which comes back to me. Thanks for any advice.
  8. Ended up downloading the recaptcha library and it seems to be working
  9. I have this working but now realize, I need a captcha. Any ideas on how to add a captcha to it? Thanks
  10. I have an Event schedule website. We have the Club contact information on the website so browsers of the site can contact the Clubs. I now have a mcafee notice "site advisor" that says we (our site) provides the users email address so spammers can harvest them. Well no sh**. This is so the people can contact the Clubs. I want to remove the display of the Clubs email address and provide a form so the user can contact the Club from within our site. What is the best email script out there that is pretty secure so I don't have to deal with the spammers trying to use it?
  11. I have two entry fields for dates. The values are stored as mm/dd/yyyy The mysql fields are setup as DATE. So right now, nothing gets stored in these fields in the DB. I know I need to convert the input field to mysql format but this is where I get lost. I've been looking all over the net trying to figure this out. Even found a couple of functions like input2date() but these don't work or don't do what I want. Thanks for any advice and sorry for the newbie question.
  12. OK, maybe I'm stupid but I have a database of addresses. I want to be able to display the map with these addresses with icon on it. But I can't figure it out. It seems that Google maps want the lat & longitude. I don't have this info. There must be a way to do this.
  13. I have an event database. Some of the club names have an apostrophe in them. When I have them search for events based on club name, or even logging in can be a problem. The apostrophe causes me problems. The insert is creating an error because of this. What can I do to allow them to have these apostrophe's in the name and still have search routines work properly? Thanks for any advice
  14. Based on the amount of bogus data they are adding, I am assuming it's bots.
  15. I have a website that allows users to add records for their events. Recently I've had a bunch of spammers coming in. Do you have any tips on how to keep them from entering bogus information. I have started checking for any "http" in some of the fields but I want to make it even harder for them. Is there a way to check what the referring page is and if it is not the right one to produce an error? Any ideas would be great.
  16. I need to verify some children records to a parent record I need to do a select in my detail file will call DetA to see if there is NOT a match if HeaderA I only want the detail records that do not have a Header. Does this make sense? How can I do this? I am trying to get this info so I can delete the child records that don't have a matching parent. Thanks
  17. I am writing a script and have most things working well. However, I need to be able to tell if the CURL request timed out. How do I do this? Sorry if it's a dumb question. Thanks for any advice
  18. I have looked through about 40 different scripts on hotscripts and can't find what I need. I have a very simple page that I want to add a gallery display to. I need to be able to upload to a directory and have it automatically generate the thumbnails. I don't want mysql because it will be a chore just to get them to use ftp to upload the images. I need it integrated with my existing site, using the same navigation, header, etc. It seems most of them want to use their own templates, etc. I just want to be able to drop this in, specifiy how many columns and rows and upload the pics to the proper directory. Any ideas on which script can handle this without being overly complicated?
  19. I need to be able to test for a duplicate key during a record insert and display an error if this is the case. Can anyone help with this? Thanks
  20. I changed to code to email me the agent information anytime this is selection is run.
  21. I need to be able to launch a curl session, record some data and then come back to it.  Is this possible? Can I execute or INIT curl multiple times and then come back and fill in data for each one? If yes, do I only need to keep track of the channel numbers? Thanks for any advice?
  22. I have a form for fogotten password.  It seems one of the bots keeps selecting this page even though I have it in my robots.txt deny area. Any tips on code I can add to the form so it gets kicked out if not a real user? I have thought about a captcha but have never included one before. If you think this is the way to go, please give some guidance on how to code it. Thanks for any advice
  23. I have an app that use curl to automate website navigation and updating. While debuging I display the page and some debug text. There are times that the browser page will not update for quite a while and then I get a burst of information all at once. Usually when the script is complete. Is there a way to have it display the information as it updates or speed up the curl operation totally? Thanks for any advice
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.