Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. In case using $ _SERVER ["REMOTE_ADDR"]; to get the name of the dns how can I remove all those characters and know only the final part? For example: With that function I get this: mob-3-91-125-82.net.vodafone.it host86-197-dynamic.3-87-r.retail.telecomitalia.it 93-32-55-29.ip32.fastwebnet.it mob-5-90-154-87.net.vodafone.it I would like this instead: net.vodafone.it retail.telecomitalia.it ip32.fastwebnet.it That should be the name of the internet provider I connect to. Thanks
  3. Today
  4. I personally find it easier to store the path and the filename in the database table, for example - assets/large/img-photos-1554932472.jpg. Then I simply do <img src="<?php echo $image ?>" width="478" height="1034" alt="">
  5. <img src="./images/<?php echo $product_image ?>" width="478" height="1034" alt=""> <?php echo $product_image ?> -make sure that name in db and acctual name of the image are the same do you keep images in db or just a path?
  6. Here you go https://developers.google.com/speed/pagespeed/insights/ Use this website to check your speed. You will get list of the things that needs to be done.
  7. If you have problem getting your code to work then a good first step would be to post said code.
  8. It's always these seemingly simple tasks that become challenges. I got a good handle on how to watermark some photos (thanks to respondents to my previous post) and developed a script that calls a function that uses imagettftext() Essentially, I can upload multiple images and watermark them before they reach their destination folder. Good stuff. Now, I got this crazy idea of watermarking them with a sequence number, so that if I grab 12 images, each will be labeled with it's sequence number (rather than a standard text watermark). I placed $count++ in my script, and then used $count as my $watermark both inside imagettftext and as a variable. It didn't work. The closest I got was after placing $count++ inside a watermark function, but. of course, that merely labeled each photo with a "1" (bc each call of the function was a new iteration. Can someone please offer some direction here. Thanks.
  9. I swear I tried that. At least I thought that I did. But guess what, I made the change that you suggested and it's working perfectly. I uploaded the updated include file in case anyone else wants to see it working now. I can't tell you how much I appreciate it. Thank you!
  10. Use root-relative links. <a href="/primary-directory/subsection-one/">Subsection One</a> The leading slash means the link is relative to the root of the domain name so it doesn't matter which directory you're in.
  11. How can I use an include file that has a list of links in any directory at my website without breaking those links? You can see it in action here... The links in this directory work... https://www.billelgin.com/primary-directory/ The links in this directory (being created from the same include file) do not work... https://www.billelgin.com/primary-directory/subsection-one/ Obviously the problem is the include file is being called from different directories, so it's breaking the relative path links in the include file, but what can I do to fix it? You can download the example directory structure here... https://www.billelgin.com/EXAMPLE.zip
  12. Yesterday
  13. Sounds like what you really need is to use the cookie when deciding what list of deals to show...
  14. What I was hoping to do was if you clicked the UK flag it would show the homepage with latest UK deals, if you click the US, the US deals etc. I am not sure if there’s an easy way to do this using. I am not massively familiar with using cookies in code in all honesty. If you think it’s the way to go I will do some research .
  15. It's a little more than just changing the code. Right now your site is basically the same for all countries. That's fine, but it doesn't really lend itself to there being multiple URLs for the variations. If you were to significantly change parts of the page, then new URLs would make sense. Honestly, I think what you have now is fine: use a cookie to track the localization being applied to the page. Why do you want to have different URLs?
  16. update: guess that all depends on the NS-Server entries: all seems that the Vhost creation process went well and the vhost looks "healthy" now i guess that i have to look for the entries regarding the NS-Server. what do you suggest - which tests to run - which measures to test!?
  17. update: runned a ping test sent 10 ICMP-Pakets to the server result: - invalid host.
  18. in other cases it looks like so - on all adresses!? this is different
  19. update: see the directives DocumentRoot "/sites/www.my_domain.org" /usr/local/apache/conf/vhost/vhost.conf (67) ServerName www.my_domain.org /usr/local/apache/conf/vhost/vhost.conf (68) <Directory "/sites/www.my_domain.org"> allow from all /usr/local/apache/conf/vhost/vhost.conf (70) Options None /usr/local/apache/conf/vhost/vhost.conf (71) Require all granted /usr/local/apache/conf/vhost/vhost.conf (72) </Directory> guess: *. seems to be correkt, * notes - all adresses, the point notes the end of the term in the handle.
  20. hello dear all - on webmin - i have on a freshly created vhost i have the following the phrase is like so: Handles the name-based server www.my-domain.org on address *. what makes me wonder is why do we have .... address *. look forward to hear from you
  21. Once again @Barand you come to me rescue thanks again
  22. echo $row->$a['currency']['available']['reserved']; I don't know where you're getting "$a" from but it doesn't belong there. If you print_r($row) you'll see what the value is. It's an object with "currency", "available", and "reserved" properties. Like any other object, you access them like ->currency.
  23. We won't slap your wrist, but we'd prefer you didn't post it and would remove it if you did. To help not spread those things around, you know? It does sound like malware, but it's possible it is merely obfuscated code (like if it came with a paid license and the author didn't want anyone to mess with it). Does the file say anything about eval or base64_decode or gunzip/deflate? Does it look the slightest bit readable? You can PM it to me if you'd like me to confirm. If it is malware then obviously you need to contact your client so they can begin damage control. Hopefully the file hasn't been there for long. It would help them if you could check webserver access logs for requests to that file so see if/how often it ran.
  24. So...is there an actual question here...is this just a blog post? If it's the latter, please refrain from posting things like this here. Unless someone specifically asks about how child-themes work in WordPress. Even if they ask, it would be better to point them to the WordPress manual.
  25. If your numbers are going to be 1-5 then you might try this: // assume that $i is the number 3 $idx = $i-1 echo "Name is: ".$name[$idx];
  26. If you define your array like this, to begin the indexing at 1 instead of 0, $names = array (1 => "Stan", "John", "Dean", "Sam", "Lee"); then your indexes will align with your $num values, 1 - 5; In other words $num = 5; echo $names[$num]; //--> Lee That will save you doing what ginerjm is about to tell you to do
  27. Also, can I ask what's going on here: $num1 = (5); Is there a reason for the parentheses? Apparently PHP doesn't care if they are there. PHP appears to ignore them. Unless there is a reason for using the parentheses, it would be clearer to use the following: $num1 = 5;
  1. Load more activity
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.