Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by mark107

  1. Thank you very much for this, but when I try this: if(strtotime($get_time) < strtotime("now")) { $autoresponder_date = strtotime($get_time. "+ 1 day"); } echo $autoresponder_date; I am getting this: 1575042480 Any idea how i can convert it to date with the time?
  2. Yes this is what I am trying to do. I want to see if the hour has gone past and increment the date. How I can do that? Do I have to use something like this? if (date('H') > $get_time) { //let do something }
  3. Hi all, I am working on my PHP script to set up the date with the time for the autoresponder so I can send out the emails at the specific time. I need some help with set up the correct day date with the time, because on my code when I have two different times `06:00` and `20:00`, as both of them will show the time with the current day date, e.g: 28-11-2019. I find that my code have set up the date as incorrect because the time I have `06:00` which it should have set up with the next day date, e.g 29-11-2019 instead of 28-11-2019 and the time `20:00` should set up with the current day date
  4. Yes. Can you also answer my questions regards to db that if it is a good idea to encode the HTML to store the hash in a db?
  5. Ok, I have come across to this post https://stackoverflow.com/questions/37338770/php-how-to-save-html-string-into-database It say that I can encode the HTML to store the hash in a database and when I get the hash I can decode them to go it back to where it was. Do you think if it is a good idea to do this to encode the HTML so I can store the hash in a database?
  6. No one have told me to do it. I have got emails that come with images in the HTML so I'm storing them in a db. I have got no idea how to store the DATA in a db when I'm fetching my emails using imap.
  7. Thank you for your advice. I have been modified on the code to add the attid, message-id and the filename so am I good to go? Here is what it look like: 1562453336 attid: 0.1 msessage-id: 455a7a38554a364e577233426974544a4c49397359513d3d filename: noname.gif 1562453336 attid: 0.2 msessage-id: 455a7a38554a364e577233426974544a4c49397359513d3d filename: what-is-bootstrap.png --------------------------Image body 1562023807 attid:0 msessage-id: 655337787a6b7957356e316468667431736d415944673d3d filename: chromegmailnew-vertical-allowed-1366.png 1562023807 attid:1 msessage-id: 655337787a6b795
  8. Oh I see, I can see I have make a mistake so I will need to change the code again. I am just learning what I must do and what I must do as I am doing this for the first time never done this before. So when I store the message-id, attach-id and filename in a database, how I can get the images to display in index.php when I click to open my emails?
  9. Yep, I am storing the attachments as HTML in a database. Why I don't do that? Do I have to remove the HTML tags and store the filenames, message-id, attach-id in a database just like this? How I can make the html tags? Do I have to make the html tags when I click on my emails to fetch the message-id, attach-id and filename from the database to make the html tags to put them on my page?
  10. What you mean by which part contains the image tag? i am only using the image tag like <img where you can see in the attached pics. No I dont have a column for filenames but I have a column called attachments that I have stored the html tags in a database with the filename like this: <a id='download_attachment' role='link' class='aQy e' href='http://example.com/project433q325/u/?id=71664b6a654a6176434c346c773348337054733779413d3d&attid=0&msgid=1630808059112201633&view=attachment&display=download' data-tooltip-align='t,c' data-tooltip-class='a1V' tabindex='0' >
  11. Ok, the IMAP software doesn't deleted my emails after I have stored them in a database. Here is the PHP that I use to fetch my emails and store them in a database. <?php ///error_reporting(E_ALL); //error_reporting(-1); //ini_set('error_reporting', E_ALL); require_once "Mail.php"; require_once('Mail/IMAPv2.php'); // Initialize the session session_start(); //Connect to the database include('config.php'); // Connect to the server: $username = 'USERNAME'; $password = 'PASSWORD'; $attached_files = array(); // Check if the user is logged in, if not then redirect him to login page
  12. Hi all, I am working on my PHP script to open my emails by fetching the data from mysql database. When I open my emails I want to fetch the filename data next to `alt` in the img tag, example: what-is-bootstrap.png so I can then send the filename data to `/project/u/index` to display the images. Here is what my image will show as for example: <img src="/project/u/?id=47394f41507856374130672f6d65534430734f7177513d3d&attid=0.2&msgid=1630808059112201633&view=attachment&display=view" alt="what-is-bootstrap.png" width="452" height="302" class="gmail-a6T" tabin
  13. I understand that where you are coming from, look there is no need for you to tell me as I know how it works. When someone send me an email, the imap software will pick up the emails that sent from the sender and the imap software will store the emails for me so I can pick up and read my emails. Yes I have the emails being stored in a database. The reason I have asked you about the delete emails is I have a small issue right here. When I stored the emails in a database and when I delete them, the script will delete the rows in a database and the script will call imap to check that if the
  14. Oh right, so I don't need to delete the emails after I stored them in a database? I do understand what I am talking about but you don't understand what I am trying to do.
  15. Thank you for your advice. I am going to use database to store my emails to make things easy and quicker, but I have got few problems here. When I store my emails in a database, do I need to delete the emails on the server? I have the attachments stored on my server but how I can store the attachments? do i need to store the files name in a database or what? And when I open my emails, do I need to use imap or database to fetch my emails?
  16. Hi all, I am working on PHP to create a email client using imap. I have got a problem with using imap because it will get very slow so I want to find a way to make it to go faster. I have been researching that I have seen alot of people are using mysql database to store their emails and get access to their emails pretty quick than using imap. And I have also seen that roundcube are using mysql database to store contacts, emails...etc. I am not really sure what to do but I need your advice and I need your opinion. I have got questions for you. Do you think if I am better off to use im
  17. Hi all, I need your help. I am working on a function to add the day value that start from 0 to 6. I want to count it up the value for each day so I can connect to each url for each day, but on my code it will only show the value as 0 for each day. Here is the code: <?php $channels = json_decode(file_get_contents('channels.json'), true); $day = 0; function get_shows($channel_id, DateTime $dt, $duration=1440, $skip_finished = true) { $url = 'http://example.comapi/GS?cid=' . $channel_id . '&offset=+00.00&day=' .$day++; echo $url; $day++; }
  18. 6 days and no one is reply. does anyone know???????????????
  19. Thank you very much for this, is that the correct one that I should use? $elements = $xpath->query("*/p[@id='yourTagIdHere']");
  20. I need some help with my code. I want to get the element from the tag called `<p id='categories'>`. Here is the php: <?php ini_set('max_execution_time', 300); //error_reporting(0); $errmsg_arr = array(); $errflag = false; function getState($string) { $ex = explode(" ",$string." "); return $ex[1]; } $xml = ""; $xml .= '<?xml version="1.0" encoding="UTF-8" ?>'; $xml .= ' <tv generator-info-name="www.mysite.com/xmltv">'; $baseUrl = file_get_contents('www.myscript.com/get-listing.php'); $domdoc
  21. You heard me. Yes of course I do, I want to fetch the elements from the ID "Streams" for each channel. I have got two different href value which there are <a id="link1" and <a id="streams". Each channel I have as it have got the same ID "Streams" but it come with each different link, example: rtmp://www.testserver.com/bbc1, rtmp://www.testserver.com/bbc2...etc. When I try this: $streams_url = $domdoc->getElementsByTagName('a'); foreach($streams_url as $a) { $url[0] = $a->getAttribute("href"); print_r($url); } I will get the full elements from the both html tags <
  22. Yes I have fixed the issues and I have forgot to add the xpath to definte it. I want to parse the element from one of these hyperlink. Here there are two different hyperlinks: <a id="link1" href="http://myserverip/getlisting.php?channel=skyatlantic">http://myserverip/getlisting.php?channel=Sky Atlantic&id=108</a> <a id="streams" href="rtmp://www.testserver.com/skyatlantic">Stream 1</a> I want to parse the element from the tag called "streams". When I try this: $xpath = new DOMXpath($domdoc); $el = $domdoc->getElementById('streams'); $url = $el-&
  23. Sorry I have make a mistake with my code. I can see there is no span tag as I am using the <a id tags so do you know how I could parse the <a id tag to get the element from the href?? Here is where you can see it: <a id="streams" href="rtmp://www.testserver.com/skyatlantic">Stream 1</a>
  24. Hi guys, I need some help with my code. I want to parse each element from the streams tags but I cant find out how I could do this. When I try this: $streams_url = $xpath->query("//span[@id='streams'"]); echo $streams_url; I will get something like this: serverip page isn’t working serverip is currently unable to handle this request. HTTP ERROR 500 Here is the php: <?php ini_set('max_execution_time', 300); $errmsg_arr = array(); $errflag = false; function getState($string) { $ex = explode(" ",$string); return $ex[1]
  • 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.