UNPKG

phpjs

Version:

php.js offers community built php functions in javascript

95 lines (82 loc) 4.08 kB
<!-- Generated by Rakefile:build --> <strong> <a href="http://www.google-igoogle.com/" rel="nofollow">qqq</a> </strong> on 2011-05-04 06:27:40 <br /> &lt;?php // MobGold Publisher Install Code // Language: PHP (curl) // Version: MG-20110322 // Copyright MobGold Ltd, All rights reserved // Parameters to make MobGold request $site_id = '02f800ffRZNkRa'; // site_id is required to request ads from MobGold $version = 'MG-20110322'; $test_mode = 0; // Set 1 for test mode, set 0 for live mode // Optional parameter $ad_type = &quot;&quot;; // 0 = both, 1 = text, 2 = banner $ad_lang = &quot;&quot;; // EN, AR, ZZ, EN, FR, DE, ID, IT, JA, PT, RU, ES, TH, OT ///////////////////////////////// // Do not edit below this line // ///////////////////////////////// // This section defines MobGold functions and should be used AS IS. $protocol = 'http'; if (!empty($_SERVER['HTTPS']) &amp;&amp; strtolower($_SERVER['HTTPS']) != 'off') $protocol = 'https'; $tps = isset( $_SERVER[&quot;HTTPS&quot;] ) ? $_SERVER[&quot;HTTPS&quot;] : ''; $ua = isset( $_SERVER[&quot;HTTP_USER_AGENT&quot;] ) ? $_SERVER[&quot;HTTP_USER_AGENT&quot;] : ''; $ua = isset( $_SERVER[&quot;HTTP_X_OPERAMINI_PHONE_UA&quot;] ) ? $_SERVER[&quot;HTTP_X_OPERAMINI_PHONE_UA&quot;] : $ua; $ua = isset( $_SERVER[&quot;HTTP_X_ORIGINAL_USER_AGENT&quot;] ) ? $_SERVER[&quot;HTTP_X_ORIGINAL_USER_AGENT&quot;] : $ua; $ua = isset( $_SERVER[&quot;HTTP_X_DEVICE_USER_AGENT&quot;] ) ? $_SERVER[&quot;HTTP_X_DEVICE_USER_AGENT&quot;] : $ua; $xwp = isset( $_SERVER[&quot;HTTP_X_WAP_PROFILE&quot;] ) ? $_SERVER[&quot;HTTP_X_WAP_PROFILE&quot;] : ''; $pro = isset( $_SERVER[&quot;HTTP_PROFILE&quot;] ) ? $_SERVER[&quot;HTTP_PROFILE&quot;] : ''; $xwc = isset( $_SERVER[&quot;HTTP_X_WAP_CLIENTID&quot;] ) ? $_SERVER[&quot;HTTP_X_WAP_CLIENTID&quot;] : ''; $ipr = isset( $_SERVER[&quot;REMOTE_ADDR&quot;] ) ? $_SERVER[&quot;REMOTE_ADDR&quot;] : ''; $ipx = isset( $_SERVER[&quot;HTTP_X_FORWARDED_FOR&quot;] ) ? $_SERVER[&quot;HTTP_X_FORWARDED_FOR&quot;] : ''; $ipc = isset( $_SERVER[&quot;HTTP_CLIENT_IP&quot;] ) ? $_SERVER[&quot;HTTP_CLIENT_IP&quot;] : ''; $ref = isset( $_SERVER[&quot;HTTP_REFERER&quot;] ) ? $_SERVER[&quot;HTTP_REFERER&quot;] : ''; $hos = isset( $_SERVER[&quot;HTTP_HOST&quot;] ) ? $_SERVER[&quot;HTTP_HOST&quot;] : ''; $uri = isset( $_SERVER[&quot;REQUEST_URI&quot;] ) ? $_SERVER[&quot;REQUEST_URI&quot;] : ''; $acp = isset( $_SERVER[&quot;HTTP_ACCEPT&quot;] ) ? $_SERVER[&quot;HTTP_ACCEPT&quot;] : ''; $cha = isset( $_SERVER[&quot;HTTP_ACCEPT_CHARSET&quot;] ) ? $_SERVER[&quot;HTTP_ACCEPT_CHARSET&quot;] : ''; $lan = isset( $_SERVER[&quot;HTTP_ACCEPT_LANGUAGE&quot;] ) ? $_SERVER[&quot;HTTP_ACCEPT_LANGUAGE&quot;] : ''; $mg_params = array( 'ua=' . urlencode($ua), 'xwp=' . urlencode($xwp), 'pro=' . urlencode($pro), 'xwc=' . urlencode($xwc), 'ipr=' . urlencode($ipr), 'ipx=' . urlencode($ipx), 'ipc=' . urlencode($ipc), 'ref=' . urlencode($ref), 'hos=' . urlencode($hos), 'uri=' . urlencode($uri), 'acp=' . urlencode($acp), 'cha=' . urlencode($cha), 'lan=' . urlencode($lan), 'pt=' . urlencode(&quot;$protocol://&quot; . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']), 'sm=' . $site_id, 'ver=' . urlencode($version), 'test=' . $test_mode, 'type=' . $ad_type, 'lang=' . $ad_lang, ); $post = implode('&amp;', $mg_params); $request = curl_init(); $request_timeout = 5; // 5 seconds timeout curl_setopt($request, CURLOPT_URL, 'http://ads.mobgold.com/request.php'); curl_setopt($request, CURLOPT_RETURNTRANSFER, 1); curl_setopt($request, CURLOPT_TIMEOUT, $request_timeout); curl_setopt($request, CURLOPT_CONNECTTIMEOUT, $request_timeout); curl_setopt($request, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded', 'Connection: Close')); curl_setopt($request, CURLOPT_POSTFIELDS, $post); $mg_contents = curl_exec($request); curl_close($request); if( null !== $mg_contents ) echo $mg_contents; ?&gt; <hr /> <strong> <a href="lala.lala" rel="nofollow">lala</a> </strong> on 2011-04-01 23:04:37 <br /> lala lala lala lala lala <hr />