Skip to content

Instantly share code, notes, and snippets.

$fp = fsockopen ('ssl://www.sandbox.paypal.com', "443", $errno, $errstr, 30);
//$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30);
if (!$fp) {
// HTTP ERROR
//sending a mail with error
}
else
{
fputs ($fp, $header . $req);
<div class="row">
<div class="span9">
Level 1 column
<div class="row">
<div class="span6">Level 2</div>
<div class="span3">Level 2</div>
</div>
</div>
</div>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="IE=Edge,chrome=1" http-equiv="X-UA-Compatible">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>SMSADS</title>
</head>
<body>
<div class="navbar navbar-fluid-top">
<div class="row-fluid">
<div class="well">
<form method="get" class="form-horizontal" action="/ads/search" accept-charset="UTF-8"><div style="margin:0;padding:0;display:inline"><input type="hidden" value="✓" name="utf8"></div>
<input type="text" placeholder="What are you looking for?" name="q" id="q" class="input-xlarge" autocomplete="off">
<select name="category" id="category"><option value="">in all Categories</option><optgroup label="Cars &amp; Vehicles"><option value="7">Cars</option>
<option value="9">Bikes</option>
<option value="10">Lorry</option></optgroup><optgroup label="Property"><option value="8">Land for sale</option></optgroup><optgroup label="Electronics"></optgroup><optgroup label="Home Appliances"></optgroup><optgroup label="Foods"></optgroup><optgroup label="Other"></optgroup></select>
<select name="location" id="location"><option value="">in all Locations</option><option value="1">Colombo</option>
<option value="2">Kandy</option>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>SMSADS.lk - SMS service for classified advertisements in Sri Lanka</title>
<meta content="authenticity_token" name="csrf-param" />
<meta content="D5+8wHTRQq0rKQmShkrme0ZBTBhzkvj7qYxD6XNIioM=" name="csrf-token" />
<link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" />
def vote_links(votes)
votes.map do |vote|
content_tag :span, :class => 'voted-user' do
link_to vote.user.username, vote.user
end
end.to_sentence.html_safe
end
[
{
"order": {
"id": 241,
"status": "confirmed",
"restaurant": {
"id": 1,
"name": "SOME NAME"
}
}
[
{
"order": {
"id": 241,
"status": "confirmed",
"restaurant": {
"id": 1,
"name": "SOME NAME"
}
}
[
{
"order": {
"id": 241,
"status": "confirmed",
"restaurant": {
"id": 1,
"name": "SOME NAME"
}
}
curl -d '{"order":{"restaurants":[{"restaurant":{"id":1,"products":[{"product":{"id":1}},{"product":{"id":2}},{"product":{"id":3,"variation":{"id":1},"combo_items":[{"combo_item":{"id":1}},{"combo_item":{"id":1}}],"extra_items":[{"extra_item":{"id":1}},{"extra_item":{"id":1}}],"preperation":{"id":1}}}]}},{"restaurant":{"id":2,"products":[{"product":{"id":1}},{"product":{"id":2}},{"product":{"id":3,"variation":{"id":1},"combo_items":[{"combo_item":{"id":1}},{"combo_item":{"id":1}}],"extra_items":[{"extra_item":{"id":1}},{"extra_item":{"id":1}}],"preperation":{"id":1}}}]}}]}}' http://localhost:3000/api/www/orders -H "X-AUTH-TOKEN: vnzo2qvq77zZqJrU6y5B" -H "Accept: application/json" -H "Content-Type: application/json" -H "Accept: application/vnd.wassel.v1" -X POST