How do I cache a page with file_get_contents?

I’m pretty new among you.

How do I cache a page with file_get_contents?

$site = file_get_contents('https://price.mysite.com/gold.php');

echo $site;

How can I print the output of this page to the cache file?

I want to show prices found here on another web page. Prices are updated every 30 minutes. On the page I will create, I want to use cache instead of constantly querying here. How can I do that?

Develop Webapplications for SAP S4 HANA without UI5 Framework [closed]

I’m looking for a smooth way to develop simple webapplications for SAP HANA without using UI5 Framework.

I know the common way to develop Fiori Apps is using either the Business Application Studio or Visual studio. Both require the SAPUI5 Framework, both consume OData Services and both are most likely based on CDS Views.

I want to avoid this “common” way because it requires a deeper knowledge of above mentioned technologies, which i currently don’t have.

My solution so far is using an external webserver, communicating via SOAP webservices and just point to that webserver when clicking the Tile in the Fiori Launchpad.

enter image description here

Is there an alternative to SAPUI5 for Fiori App Development, that does not require an external webserver?

php7.4 unable to read memcached data saved by pylibmc

I keep getting these errors trying to read memcached variables stored by python3 scripts runnnig pylibmc.

PHP Warning: Memcached::get(): could not decompress value: unrecognised compression type in xxx

I’m saving some test data using this python3 script:

#!/usr/bin/env python3
import json
import pylibmc

mc = pylibmc.Client(["127.0.0.1"], binary=True, 
     behaviors={"cas": True, "tcp_nodelay": True,"ketama": True})

mc.set('testvar', json.dumps('{"greeting": "Hello", "title": "Mr"}'), 3600)

Using telnet to fetch the variable from memcached shows the data is NOT compressed, but saved in clear text:

ubuntu@server:~/bin$ telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
get testvar
VALUE testvar 16 81
"{"greeting": "Hello", "title": "Mr"}"
END
^]
telnet> quit
Connection closed.

I have set the compression limit in the php-memcached settings to a huge number:

/etc/php/7.4/cli/conf.d/25-memcached.ini contains:

extension=memcached.so
; You need to install php-igbinary package to use igbinary serializer
; and php-msgpack to use msgpack serializer
memcached.serializer=php
memcached.compression_threshold=9999999999

The PHP script trying to read the data:

<?php
    echo ini_get("memcached.compression_threshold") . "n";
    $mc = new Memcached();
    $mc->addServer('localhost', 11211);

    $data = json_decode($mc->get('testvar'));
    echo $data;
    echo "n";

?>

and the output:

9999999999
PHP Warning:  Memcached::get(): could not decompress value: unrecognised compression type in /home/ubuntu/bin/memcache_get.php on line 6

This is on a freshly installed Ubuntu 20 LTS system with python 3.8.10 and pylibmc Version: 1.6.1

Any hints anyone?

Issues with Posting System PHP

Now, I have a posting system. There’s an input field and a submit button. After entering something in the field and clicking the button, it gets displayed as a post.

Now, let’s say you make multiple posts (two or three), all of them should be the same (except for the body of the post). However, the issue I’m encountering is that the first post has a background-color of Silver (#C0C0C0), but the second or third posts don’t. However, the body, and other content in the post such as the like and comment buttons are there.

To fix this, I inspected the first post and it highlighted only the first post, not the second or third posts, when I hovered over the post div in the console. The posts should have a background color of silver, and if you have multiple posts, there should be some white space in between the posts. But if I increase the height of the background-color, it covers both the first and second post, without any white space. And when I did this (increased the height of the background-color) of the post and inspected the second post, it highlighted both the first and second post as <div class="textPost">, without any white space in between the two posts. I want there to be if, someone enters more than one post, the posts should have white space between them, and it should be like there’s multiple separate posts, and all the posts have a background-color of #C0C0C0 (Silver). How can I accomplish this? Please help.

Code:

<div class="textPost">
  <?php

  $sql = "SELECT * FROM posts";
  $result = mysqli_query($connection, $sql);
  if (mysqli_num_rows($result) > 0) {
    while ($row = mysqli_fetch_assoc($result)) {

  ?>
  <div class="textpostFormat">
    <-- All the post content (body, like button, comment button, etc.) -->
  </div>
  <?php

  }
}

  ?>
</div>

<style media="screen">
   
.textPost {
  margin-top: 170px;
  width: 650px;
  height: 400px;
  background-color: #C0C0C0;
  position: fixed;
  margin-left: 685px;
  border-radius: 15px;
}

.textpostFormat {
  margin-left: -640px;
  position: fixed;
}

accepts form even if 1 input is invalid php

I’m trying to make a simple registration form but, when I input a first name as a “123” or leave it blank and the last name having a normal string w/o nums, the form still accepts it as a valid data. but if I enter the “123” at the last name but a real name on the first_name. I get the appropriate response for this. any idea?

$_SESSION['errors'] = array();
    if (empty($_POST['first_name']) || is_numeric($_POST['first_name'])) {
        $_SESSION['errors'][] = "Invalid First Name";
        header("Location: index.php");
    }
    if (empty($_POST['last_name']) || is_numeric($_POST['last_name'])) {
        $_SESSION['errors'][] = "Invalid Last Name";
        header("Location: index.php");
    }
    else {
        header("Location: process.php");
    }

I want create a single php product page for all products

I’m trying to create an ordering website and I want to link all products to be ordered to one page where the customer will need to fill in some form for delivery, displays the particular product details which the customer clicked on to order.

 <?php session_start();
 include("menucon.php");

  $result = mysqli_query($conn,'SELECT * FROM appetizers WHERE id = 
  "'.$_GET['appetizers'].'"');

   foreach ($rows as $row) ;

  ?>

this the product details page view

   <section class="sec1">

  <div class="p-img">
  <h2 class=""><?php echo $result['food_name'];?></h2> 
   <img src="../images/<?php echo $result['newImageName'];?>" alt="">
  </div>
  <div class="p-desc">
      <h5>WHAT TO EXPERT</h5>
    <p><?php echo $result['description'];?></p></div>
   </section>

This is for the page for all products to be ordered

             <div class="col">
             <div class="bx">
                <img src="images/<?php echo $row1["newImageName"]; ?>" alt=""> 
                <div>
                    <h3><?php echo $row1["food_name"]; ?></h3>
                    <h3> <s>GHC<?php echo $row1["discount"]; ?></s> GHC<?php echo 
                 $row2["price"]; ?></h3>
                    <p class="desc" >
                        
                For Each
                </p></div>
                <a class="btn1" href="ord.html">ORDER</a>
                
              </div>
            </div>
           <div class="col">
            <div class="bx">
                <img src="images/<?php echo $row2["newImageName"]; ?>" alt=""> 
                <div>
                    <h3><?php echo $row2["food_name"]; ?></h3>
                    <h3> <s>GHC<?php echo $row2["discount"]; ?></s> GHC<?php echo 
                $row2["price"]; ?></h3>
                    <p class="desc" >
                        
                Full Set, Extra Cost For More
                </p></div>
                <a class="btn1" href="ord.html">ORDER</a>
                
            </div>
          </div>

Can’t call public method inside the action of the hook of the cron schedule wordpress

i added the cron job as the following and the action method called from the class which class is a custom payment gateway..

function cronJobSchedule() {
     
            return array(
                'in_per_minute' => array(
                    'interval' =>60,
                    'display' => 'In every custom Mintues'
                )
            );
        }
    
    
    /* Add Cron Job Event */
    register_activation_hook(__FILE__,'registerCronJob');
        
    //Schedule Cron Job Event-in_per_minute-every_minute
    function registerCronJob() {
            
        if ( ! wp_next_scheduled( 'cronPerMinutes' ) ) {
            wp_schedule_event( time(), 'in_per_minute', 'cronPerMinutes' );
        }
    }

    //trigger action based on period in minutes
    add_action( 'cronPerMinutes',array('plugin_name','action')  );

    //remove schedule event on deactivate
    register_deactivation_hook(__FILE__, 'unRegisterCronJob');

    add_filter( 'cron_schedules','cronJobSchedule');
    
    function unRegisterCronJob() {
        wp_clear_scheduled_hook('cronPerMinutes');
    }

and the action method in the class:
public function action()
{
  $orderObj = new WC_Order(50);
  $authenticationToken=$this->getAuthenticationToken();
  $orderObj->add_order_note($authenticationToken);
}

the problem that i can’t call any method ($this->getAuthenticationToken()) in this action hook … it doesn’t work!! when i call any method.

How can we insert multiple texts and paragraphs in google docs using google docs api with php?

I want to insert more the one texts in google docs with multiple paragraph contents and also want to style them. I also followed this link https://developers.google.com/docs/api/reference/rest/v1/documents/request but I am unable to achieve this.

$requests [] = new Google_Service_Docs_Request(
[
    'insertText' => [
        'text' => 'Sample1n',
        'location' => [
            'index' => 1
        ]
    ]
],
  [
    'insertText' => [
      'text' => 'sample2n',
      'location' => [
        'index' => 9
      ]
    ]
  ],
  [
    'updateParagraphStyle' => [
      'range' => [
        'startIndex' => 1,
        'endIndex' => 8
      ],
      'paragraphStyle' => [
        'namedStyleType' => 'HEADING_1'
      ],
      'fields' => 'namedStyleType'
    ]
  ],
  [
    'updateParagraphStyle' => [
      'range' => [
        'startIndex' => 9,
        'endIndex' => 17
      ],
      'paragraphStyle' => [
        'namedStyleType' => 'NORMAL_TEXT'
      ],
      'fields' => 'namedStyleType'
  ]
  ],
  [
    'updateTextStyle' => [
      'range' => [
        'startIndex' => 9,
        'endIndex' => 16
      ],
      'textStyle' => [
        'link' => [
          'url' => 'https://www.google.com'
        ]
      ],
      'fields' => 'link'
    ]
  ]
);
$batchUpdateRequest = new Google_Service_Docs_BatchUpdateDocumentRequest(array(
    'requests' => $requests
));

$response = $service->documents->batchUpdate($documentId, $batchUpdateRequest);

I am doing in this way and getting this error

PHP Fatal error:  Uncaught GoogleServiceException: {
  "error": {
    "code": 400,
    "message": "Invalid requests[0]: No request set.",
    "errors": [
      {
        "message": "Invalid requests[0]: No request set.",
        "domain": "global",
        "reason": "badRequest"
      }
    ],
    "status": "INVALID_ARGUMENT"
  }
}

Can anyone help me out with this. It would be a great help and i need it in PHP code.

dunglas/symfony-docker : Internal call to same project

I’ve just tried https://github.com/dunglas/symfony-docker/
It seems very cool and work on the road !

But i can’t ping my server sf from sf… i’m trying to call my own api in the same project but the ping localhost from sf does not seem to work.

I’ve put a call.php and a receipt.php in public/, but i don’t know what to do so that call.php ping receipt.php
I can access to https://localhost/call.php but call.php can’t access https://localhost/receipt.php from my php script. i can access https://localhost/receipt.php from my navigator.

if somebody have a clue ?
ty.

Printer raw socket choose cassette

I wrote a php script which sends pdf files over raw socket to a printer.

$fp = pfsockopen("192.168.10.61",9100);     # Drucker IP
fwrite($fp, file_get_contents(__DIR__ . '/test.pdf'));      # Ausdruck 1
fclose($fp);

The printer does it’s job very well and without problems.

Now I’ve got a new printer with two cassettes, both are A4 but one with our letterhead and one without.

I want to print with cassette two, how is that possible?

I already changed the socket ports up to 9103 but that doesn’t help.

Printer-Model: kyocera P-4035i MFP KX

How to translate this grpc call to a native PHP call using grpc pecl extension?

I am using PHP 7.0.10 on Windows Server and I recently installed the PECL grpc extension because I would like to migrate a call like this one:

$output = shell_exec('grpcurl.exe -insecure -proto extranet.proto -d {"Usuario":"user","Senha":"pass"} www.jucerja.rj.gov.br:9443 extranet.v0.BuscaEmpresa/Login 2>&1');
print_r(($output));

to a native one using the grpc extension.

How can I achieve this?

convert svg text to image using imagettftext function

I’m trying to convert svg text to image using imagettftext function but it prints the text itself instead of the signature

$signed = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm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9Im5vbmUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCI+PC9wYXRoPjxwYXRoIGQ9Ik0gOTguMTM4LDkxLjA1MCBDIDExNy45MDMsODQuOTIzIDExNy45OTYsODYuMDg1IDEzOC4xMzgsODIuMjUwIiBzdHJva2Utd2lkdGg9IjEuNzQ1IiBzdHJva2U9ImJsYWNrIiBmaWxsPSJub25lIiBzdHJva2UtbGluZWNhcD0icm91bmQiPjwvcGF0aD48L3N2Zz4=";

$text5 = $signed; 
    $origin_y5 = 1325;
    $origin_x5 = 250;
    imagettftext($image, $font_size, 0, $origin_x5, $origin_y5, $white, $font, $text5);

Is there a way to convert this into image?