Jump to content

Shiftoii

New Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Shiftoii

  1. Been working awhile on getting this completed with no luck I have this script that is suppose to purchase items through cookies <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_NOBODY, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_URL, ""); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_USERAGENT, "MozillaXYZ/1.0"); $data = array( 'creator' => '1', 'storeId' => '123', 'items' => '{id:123,species:stud,at:keepsake}', 'pType' => '0' ); $cookies = array( //Purchase cookie Goes here 'anx' => '', 'anxs' => '', 'JSESSIONID' => '', 'dcDirtyCookie' => '', 'user_num' => '', 'user_nme' => '', 'user_info' => '', 'qinfo' => '' ); curl_setopt($ch, CURLOPT_COOKIE, $cookies); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $output = curl_exec($ch); curl_close($ch); die($output); $xml = simplexml_load_string($output); print_r($xml,1); echo("done\n"); echo($output); ?> But.. Instead of it purchasing items with the script provided above and me having my cookies in there it just echo's them back out and onto the page, I would like for it to send the request to the requested url and purchase the item within the $data function.
  2. Are you making sure that what you're doing for the first link is being done for all of the other links?
  3. Personally I think that using css is probably going to be your best bet in this situation.. until I can see your java script at least. #69{ display:block; width:69; height:69; background:url('#'); } You can then link simply by doing something as easy as. <a href="#" id="69"></a> If you're unaware of what this is doing it's basically doing the same thing that including a straight image would do. <a href="#"><img src="#"/></a> Going to keep an eye on this thread in hopes of the Java being posted because this method will get annoying very quickly.
  4. I second this.
  5. Not completely sure what you're talking about here but I will do my best to help you out. .UNIQUE { box-sizing: content-box;} You could always just create a div and title it something completely "Unique" that won't be used anywhere else and then work it into your css as intended. <div class="unqiue"> <form id="contactForm" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES); ?>" method='post'> <!-- HTML HERE --> </form> </div>
  6. I don't even want to try and know what this guy is saying...
  7. I don't fully understand what you're trying to do here.. Are you trying to create a dynamic page for your latest post through tag/category... Are you trying to include the tag/category on the homepage after you have posted something? Are you trying to include tag/category within the post it's self? Maybe as a widget? The possibilities are endless please clear this up and I may be able to help you out.
  8. Alright so as my title says I am working on trying to use curl to store the cookies of an item at the moment and fill out everything as listed. <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.example.com/purchased"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_USERAGENT, "MozillaXYZ/1.0"); //objekt array $TStringError = array( 'storeId' => 'ID', 'items' => 'ID', 'pType' => 'PType' ); $cookies = array( //detta ar dina inkops cookies 'anx' => 'UniqueCookie' ); curl_setopt ($ch, CURLOPT_COOKIE, //begagnade cookies ga hit "Användar Cookies Go Here" curl_setopt($ch, CURLOPT_POSTFIELDS, $TStringError); $output = curl_exec($ch); curl_close($ch); $xml = simplexml_load_string($output); print_r($xml,1); echo("done\n"); echo($output); ?> I started messing with my code because of an XML error it was not sending properly and I still am not sure why I just randomly saved it again and I was getting a T String Error but if I was to remove any thing from the line that it's on it would just error out another error.. curl_setopt($ch, CURLOPT_POSTFIELDS, $TStringError); This is what's giving me the error.. and if anyone could help me to know why it's not process the cookies properly.. that would be amazing. Sorry for bad english.
×
×
  • 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.