Jump to content

ShivaGupta

Members
  • Content Count

    146
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ShivaGupta

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    india
  • Age
    21
  1. $m=json_decode($html); print_r($m); stdClass Object ( [requestGuid] => [orderId] => [statusCode] => SUCCESS [statusMessage] => SUCCESS [response] => stdClass Object ( [amount] => 100 [currencyCode] => INR [status] => 1 [message] => ACTIVE [ownerGuid] => 7898980 [walletType] => USER [ssoId] => 9op09 [txnPinRequired] => [otpPinRequired] => ) [metadata] => ) this is json decoded object and want to get property of amount .plz help me
  2. ShivaGupta

    how to post this array post data in curl using php .

    Im trying to send a json array to a php post request. {"cart_items":[{"configuration":{"price":100,"recharge_number":"9999999999"},"product_id":"999","qty":1}]} but here i dont know how to send in php plz help me with $fields .its argent url_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); //curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie); curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Content-Type: application/json; charset=utf-8")); curl_setopt($ch, CURLOPT_USERAGENT, $agent ); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_REFERER, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS,$fields); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $oone=curl_exec($ch);
  3. $post='{"cart_items":[{"configuration":{"price":100,"recharge_number":"9999999999"},"product_id":"999","qty":1}]}'; i try this n reslut was :There are no valid items in cart: help me plz
  4. i dont understand what is wrong plz help me. here is code $name = "img/".rand(1,9999999).".png"; $myFile = $name; $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = $html; fwrite($fh, $stringData); fclose($fh); $file=$name; $fst=file_get_contents($file); $im=imagecreatefromstring($fst); imagefilter($im, IMG_FILTER_GRAYSCALE); imagefilter($im, IMG_FILTER_NEGATE); //Convert to Grey Scale for($i=0;$i<123;$i++){ for($j=0;$j<50;$j++){ $px=imagecolorat($im,$i,$j); if($px<0x303030){ imagesetpixel($im,$i,$j,0); }else{ imagesetpixel($im,$i,$j,0xffffff); } } } $database = unserialize(@file_get_contents("db.txt")); if($database === false) $database = array(); // modify the database if needed if($_SERVER['REQUEST_METHOD'] == 'POST'){ if($_POST['submit'] == 'Add') $database[$_POST['ident']] = substr($_POST['letter'], 0, 1); if($_POST['submit'] == 'Del') unset($database[$_POST['ident']]); if($fh = @fopen('db111.txt', 'w+')){ fwrite($fh, serialize($database)); fclose($fh); } }else{ $newimage = true; } $width = 130; $height = 40; $captcha_gridstart =1; $captcha_gridspace =2; $letters = findletters($im, $width, $height, $captcha_gridstart, $captcha_gridspace); $count = count($letters); $cellw = ($count > 0) ? intval(100 / $count) : 0; //dispeckle the image and GET co-ordinates of the characters of captcha image and return them. function findletters($image, $width, $height, $gridstart, $gridspace){ $offsets = array(); $o = 0; $atstartx = true; for($x = 0; $x < $width; $x++){ $blankx = true; for($y = 0; $y < $height; $y++){ if(imagecolorat($image, $x, $y) == 0){ $blankx = false; break; } } if(!$blankx && $atstartx){ $offsets[$o]['startx'] = $x; $atstartx = !$atstartx; }else if($blankx && !$atstartx){ $offsets[$o]['endx'] = $x; $atstartx = !$atstartx; $o++; } } $count = $o; for($o = 0; $o < $count; $o++){ for($y = 0; $y < $height; $y++){ $blanky = true; for($x = $offsets[$o]['startx']; $x < $offsets[$o]['endx']; $x++){ if(imagecolorat($image, $x, $y) == 0){ $blanky = false; break; } } if(!$blanky){ $offsets[$o]['starty'] = $y; break; } } for($y = $height-1; $y > $offsets[$o]['starty']; $y--){ $blanky = true; for($x = $offsets[$o]['startx']; $x < $offsets[$o]['endx']; $x++){ if(imagecolorat($image, $x, $y) == 0){ $blanky = false; break; } } if(!$blanky){ $offsets[$o]['endy'] = $y; break; } } } for($o = 0; $o < $count; $o++){ $offsets[$o]['ident'] = ""; for($x = $offsets[$o]['startx'] + $gridstart; $x < $offsets[$o]['endx']; $x += $gridspace){ for($y = $offsets[$o]['starty'] + $gridstart; $y < $offsets[$o]['endy']; $y += $gridspace){ $offsets[$o]['ident'] .= ((imagecolorat($image, $x, $y) == 0) ? "0" : "1"); #echo $offsets[$o]['ident'].'<br>'; } } } return $offsets; } $a=""; foreach($letters as $letter){ $asciiletter = $database[$letter['ident']]; if(!empty($asciiletter)) { $a.=$asciiletter; } }
  5. Winners.. Are Not Those Who Never Fail But Those Who Never Quit !

  6. I dont have personality,i am mere statistics.I used to be "downtoearth". Now this is my present name, do i possess a name, a face ,an individuality ?

  7. ShivaGupta

    PHP coder available for hire

    do you acsept payment throw indian net banking or indian debit card?
  8. Saying "SORRY" doesn’t mean that U r Wrong& other person is Right..It means that U Respect your Relation !!!!!!!!!!!!!!!!!!!!!!!

    1. davidannis

      davidannis

      That explains so much about my marriage. Wish I'd seen this 20 years ago.

  9. we have to challange our life.

    1. ricmetal

      ricmetal

      i see it as we have to challenge ourselves. for instance, i spend a whole lot of time indoors when there's people that i clearly have good connections with on the outside - yet i continue to negate them the pleasure of my company, so to speak. i find hard to just put myself out there and take that social pressure. maybe it's because i feel like i am to blame for whatever actions i think i'm blameable. what's interesting is that sometimes, some people come along and completely...

×

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.