This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
Hello world | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('display_errors', 'On'); | |
error_reporting(E_ALL); | |
function get($url,$cookieFile, $referer, $params=array()) { | |
$url = $url.'?'.http_build_query($params, '', '&'); | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once("simple_html_dom.php"); | |
ini_set('display_errors', 'On'); | |
error_reporting(E_ALL); | |
function get($url,$cookieFile, $referer, $params=array()) { | |
$url = $url.'?'.http_build_query($params, '', '&'); | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Route::get('/jsonArray', function () { | |
$message = App\Message::all(); | |
return $message; | |
}); | |
Route::get('/jsonObject',function() { | |
$cars = [ | |
"id1" => ["brand" => "Volvo", "color" => "red", "number" => 123], | |
"id2" => ["brand" => "BWM", "color" => "blue", "number" => 453], | |
"id3" => ["brand" => "Toyota", "color" => "green", "number" => 985] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ClientFacade { | |
private static final String BASE_URL = "http://Server-IP/laravel/www/public/"; | |
private static AsyncHttpClient client = new AsyncHttpClient(); | |
public static void get(String url, RequestParams params, AsyncHttpResponseHandler responseHandler) { | |
client.get(getAbsoluteUrl(url), params, responseHandler); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.warodom.httpexample; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.TextView; | |
import com.loopj.android.http.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void postMessage(String path) { | |
RequestParams params = new RequestParams(); | |
params.put("id", "1"); | |
params.put("message","Hello my message final"); | |
params.put("_token","AZzS6jPpsdlWv9nNTByaE3OIj4I1FQg8hrhHXkH8"); | |
ClientFacade.post(path, params, new TextHttpResponseHandler() { | |
@Override | |
public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) { | |
Log.d("----", "failure: "+ statusCode); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat conf.d/default.conf | |
server { | |
listen 80; | |
index index.html index.php; | |
sendfile off; | |
root /usr/share/nginx/html; | |
server_name localhost; | |
location / { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
sendfile off; | |
index index.php index.html; | |
root /usr/share/nginx/html; | |
server_name localhost; | |
location / { | |
try_files $uri $uri/ /blog/public/index.php$is_args$args; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
### MySQL Container ######################################### | |
mysql: | |
image: mysql:5.7.4 | |
environment: | |
- MYSQL_DATABASE=dev | |
- MYSQL_USER=root | |
- MYSQL_PASSWORD=password |
OlderNewer