[Solved] Request a Steam marketprice item lowest value

Looks like json to me, so you could extract it by using this here: $value = file_get_contents(‘http://steamcommunity.com/market/priceoverview/?country=US&currency=3&appid=730&market_hash_name=StatTrak%E2%84%A2%20P250%20%7C%20 Steel%20Disruption%20%28Factory%20New%29’); $json = json_decode($value); $variable = $json->lowest_price; echo $variable; So you might look also at this: http://www.w3schools.com/json/ 2 solved Request a Steam marketprice item lowest value

[Solved] How to parse url in php to get numbers and strings [closed]

Give this a shot: $url = “http://example.com/list4”; preg_match(“#\/(\w+)(\d+)$#”, $url, $matches); echo “String: ” . $matches[1] . “<br>”; echo “Number: ” . $matches[2] . “<br>”; // print out the URL you wanted above echo “http://example.com/” . $matches[1] . $matches[2]; EDIT To fit the needs of the question, you’re going to need to account for .php at … Read more

[Solved] HTTP POST REQUEST USING PHP [closed]

First, you’re going to want to look into the cURL library for PHP. http://php.net/manual/en/book.curl.php It’s basically a library to help you connect and communicate over various protocols, including HTTP using the POST method. There’s a very simple example on using the library on this page: http://php.net/manual/en/function.curl-init.php Second, you’re going to want to note the difference … Read more

[Solved] PHP + MySQL Interval query last 1 month with sum problem

You don’t have $row[“mbsent”] in your SELECT clause of your query. Perhaps you meant: $sql = “SELECT SUM(mbsent) AS summ, mbsent FROM data WHERE datum < DATE_ADD(NOW(), INTERVAL -1 MONTH) AND user=”csib” GROUP BY mbsent”; But that doesn’t make any sense either… so not sure what you are going for here. Also, I think you … Read more

[Solved] Set default query by var1 & var2

Your three lines of code will always put $var2 in $var3, as far as your $var1 is just declared as empty before. In your html script, where do you want to show the result ? If its in the input, you have to echo $var3 instead of $var1. solved Set default query by var1 & … Read more

[Solved] User/Admin login in PHP

Could you try this out? $conn = mysql_connect (“localhost”, “root”,””); mysql_select_db(“a_blub”,$conn); $result = mysql_query(“SELECT password FROM user WHERE username=””.mysql_real_escape_string($_POST[“theusername’]).”‘ LIMIT 1”, $conn); $row = mysql_fetch_assoc($result); if ($_POST[‘thepassword’] == $row[‘password’]) { if ($row[‘admin’] == 1) { header(“Location: hit-counter.php”); exit; } else { header(“Location: index_loginsuccesful.php”); exit; } } else { header(“Location: index_loginfailed.php”); exit; } 2 solved User/Admin … Read more

[Solved] Find an easy web server framework for mobile game [closed]

You should try out Firebase (https://www.firebase.com/) if you’re looking for something relatively easy to store game data with. If you’re looking for something to manage logins and storing simple data, either Twitter’s Fabric (https://get.fabric.io/) and AWS Cognito (https://aws.amazon.com/cognito/) can also be used as well 2 solved Find an easy web server framework for mobile game … Read more

[Solved] create an array based on the values in 2 existing arrays

<?php $rightSide = array(15, 15, 15, 15, 18, 18, 19, 21, 21, 21, 25, 25); $leftSide = array(13, 14, 12, 11, 16, 17, 20, 22, 23, 24, 30, 31); $rightFlip = array_flip($rightSide); for($k=0; $k<count($rightFlip); $k++) { $arr25[$k] = $k; } $array25 = array_combine($arr25, $rightFlip); $k = 0; while($k<count($array25)) { if($k==0) { $finArr[0] = $rightSide[0]; $repeat_0 … Read more

[Solved] Inserting months and updating it with Amount

Here’s an example script on how to do it as I explained in the comments before. All you have to do is adept your database and output to it: <?php $costs = 180; //Total costs $month_costs = 30; //Costs per month $paid = 80; //Paid first & second month + 10 dollar / euro extra … Read more