Apache Configuration:
<VirtualHost *:80>
ServerName blah.com
DirectoryIndex index.html index.php
ProxyRequests On
ProxyPreserveHost On
ProxyVia full
Apache Configuration:
<VirtualHost *:80>
ServerName blah.com
DirectoryIndex index.html index.php
ProxyRequests On
ProxyPreserveHost On
ProxyVia full
I managed to make Codeiniter work with HHVM, using | |
nginx as a proxy. My problem was that hhvm has problems | |
with path_info, so I was not able to run /index.php/controller/action or | |
/controller/action/params -> /index.php/controller/action.params. | |
I used nginx as a proxy to hhvm. I changed the way codeigniter process | |
the url. Steps bellow: | |
Cleaned my HHVM .hdf file: | |
Server { |
<?php | |
// Server file | |
class PushNotifications { | |
// (Android)API access key from Google API's Console. | |
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI'; | |
// (iOS) Private key's passphrase. | |
private static $passphrase = 'joashp'; | |
// (Windows Phone 8) The name of our push channel. | |
private static $channelName = "joashp"; |
<?php | |
/************************************************************************************************************************************************ | |
* | |
* Class: Cryptor | |
* | |
* PHP Encryption and decryption class with open_ssl | |
* | |
* Works also with larger text (because text is split in smaller parts). | |
* Generates a random IV with openssl_random_pseudo_bytes for each message and is prefixed to the encrypted_text. |
You can directly use URLs like this: http://lorempixel.com/400/300/nature/1/
but they will be downloaded every time from the Lorempixum server (they are not cached). For better performance or cache control you may want to save them locally. You can use cURL with its little known syntax for its input and -o
arguments to do it easily.
Save filenames like nature-400x300-5.jpg
:
curl 'http://{lorempixel}.com/{400}/{300}/{nature}/[1-10]/' -o '#4-#2x#3-#5.jpg'
/** | |
* BetaBeers React Native App with WP REST API v 1.0 | |
*/ | |
'use strict'; | |
var React = require('react-native'); | |
var { | |
AppRegistry, | |
StyleSheet, | |
Text, |
<?php | |
ini_set("display_errors", "1"); | |
error_reporting(E_ALL); | |
require("connection.php"); | |
// Opens a connection to a MySQL server | |
$connection=mysql_connect ($dbhost, $dbuser, $dbpass); | |
if (!$connection) { |
Instructions | |
1. Add MY_url_helper.php to CI_directory/application/helpers | |
2. If the CI app is already built, convert any references to *site_url* in your CI application (aside from the system directory) to the new namespaced function, ci_site_url. | |
This step prevents Wordpress' site_url function from overwriting CIs. Because both functions are global and CI checks to make sure that site_url has not been set. Once we load the WP bootstrap file, it will have been defined, so CI's function wll never load. | |
3. Add Wordpress' bootstrap file into CI_directory/index.php right above CI's bootstrap file. | |
4. Update wp-includes/load.php *(this is necessary if you are using CI's sessions - Wordpress mangles CI's cookies using with magic quotes. (There may be an upgrade-proof way to do this.) |
<head> | |
<title>Your Trail</title> | |
</head> | |
<body> | |
<h1>Your Trail</h1> | |
<?php | |
echo "<br />"; | |
echo '<h1>Directions:</h1>'; | |
echo '<h2>Start: '.$origin.'</h2>'; | |
foreach ($directions->route as $route) |
<?php | |
$url = "http://{site_url}/service/v4/rest.php"; | |
$username = "admin"; | |
$password = "password"; | |
//function to make cURL request | |
function call($method, $parameters, $url) | |
{ | |
ob_start(); |