Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Anton

Members
  • Joined

  • Last visited

Everything posted by Anton

  1. Is there a way to split XML file by parameter using PHP?
  2. Uploaded a file smaller one about 150 mb, contains 99.000 records, run my script page was loading for about 10 mins than it said done, but only 15000 records were inserted, it would be nice to install MySQL XML parser but i am on shared hosting unfortunatelly so no chance, plus XML file and MySQL databse have differen names for tables
  3. Hi, i got an XML about 420 mb in size , i need to import it into my database, ive done a little script that does that, but here is the problem, there are about 500.000 records in it! How can i stick all that into Database? is it possible to split XML somehow or any other method?
  4. Anton replied to Anton's topic in Frontend
    Here is the whole thing <?php //<div style="font-size: 16px;">If you see this, your server does not support PHP. Ask your web-hosting provider where you can add the PHP code on your website.</div> /*ERROR<!--*/ class TNX_l { var $_login = 'login'; // your TNX login var $_timeout_connect = 60; // timeout - maximum time for the links to load (in seconds) var $_connect_using = 'fsock'; // curl or fsock - you may choose the way to connect var $_html_delimiter = '<p>'; // link devider - symbol between links (you may choose any symbol) var $_encoding = ''; // your website encoding. You may also use: KOI8-U, UTF-8, iso-8859-1 (iconv module must be installed on your server) var $_exceptions = 'PHPSESSID'; // here you can list URL's that you don't want to be indexed by TNX. Basically, those are URLs that are not indexed by search engines, or links to pages that don't exist. Don't change this value after it has been indexed by TNX system. /*******************************/ var $_return_point = 0; var $_content = ''; function TNX_l() { if($this->_connect_using == 'fsock' AND !function_exists('fsockopen')){echo 'fsock function is disabled on your server, contact your provider or try to use the CURL version of the TNX code.'; return false;} if($this->_connect_using == 'curl' AND !function_exists('curl_init')){echo 'Error, CURL is not supported, try using fsock.'; return false;} if(!empty($this->_encoding) AND !function_exists("iconv")){echo 'CURL function is disabled on your server, contact your provider or try to use the fsock version of the TNX code.'; return false;} if ($_SERVER['REQUEST_URI'] == '') $_SERVER['REQUEST_URI'] = '/'; if (strlen($_SERVER['REQUEST_URI']) > 180) return false; if(!empty($this->_exceptions)) { $exceptions = explode(' ', $this->_exceptions); for ($i=0; $i<sizeof($exceptions); $i++) { if($_SERVER['REQUEST_URI'] == $exceptions[$i]) return false; if($exceptions[$i] == '/' AND preg_match("#^\/index\.\w{1,5}$#", $_SERVER['REQUEST_URI'])) return false; if(strpos($_SERVER['REQUEST_URI'], $exceptions[$i]) !== false) return false; } } $this->_login = strtolower($this->_login); $this->_host = $this->_login . '.tnx.net'; $file = base64_encode($_SERVER['REQUEST_URI']); $user_pref = substr($this->_login, 0, 2); $md5 = md5($file); $index = substr($md5, 0, 2); $site = str_replace('www.', '', $_SERVER['HTTP_HOST']); $this->_path = '/users/' . $user_pref . '/' . $this->_login . '/' . $site. '/' . substr($md5, 0, 1) . '/' . substr($md5, 1, 2) . '/' . $file . '.txt'; $this->_url = 'http://' . $this->_host . $this->_path; $this->_content = $this->get_content(); if($this->_content !== false) { $this->_content_array = explode('<br>', $this->_content); for ($i=0; $i<sizeof($this->_content_array); $i++) { $this->_content_array[$i] = trim($this->_content_array[$i]); } } } /*!!!*/ function show_link($num = false) { if(!isset($this->_content_array)) return false; $links = ''; if(!isset($this->_content_array_count)){$this->_content_array_count = sizeof($this->_content_array);} if($this->_return_point >= $this->_content_array_count) return false; if($num === false OR $num >= $this->_content_array_count) { for ($i = $this->_return_point; $i < $this->_content_array_count; $i++) { $links .= $this->_content_array[$i] . $this->_html_delimiter; } $this->_return_point += $this->_content_array_count; } else { if($this->_return_point + $num > $this->_content_array_count) return false; for ($i = $this->_return_point; $i < $num + $this->_return_point; $i++) { $links .= $this->_content_array[$i] . $this->_html_delimiter; } $this->_return_point += $num; } return (!empty($this->_encoding)) ? iconv("windows-1251", $this->_encoding, $links) : $links; } function get_content() { $user_agent = 'TNX_l ip: ' . $_SERVER['REMOTE_ADDR']; $page = ''; if ($this->_connect_using == 'curl' OR ($this->_connect_using == '' AND function_exists('curl_init'))) { $c = curl_init($this->_url); curl_setopt($c, CURLOPT_CONNECTTIMEOUT, $this->_timeout_connect); curl_setopt($c, CURLOPT_HEADER, false); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); curl_setopt($c, CURLOPT_TIMEOUT, $this->_timeout_connect); curl_setopt($c, CURLOPT_USERAGENT, $user_agent); $page = curl_exec($c); if(curl_error($c) OR (curl_getinfo($c, CURLINFO_HTTP_CODE) != '200' AND curl_getinfo($c, CURLINFO_HTTP_CODE) != '404') OR strpos($page, 'fsockopen') !== false) { curl_close($c); return false; } curl_close($c); } elseif($this->_connect_using == 'fsock') { $buff = ''; $fp = @fsockopen($this->_host, 80, $errno, $errstr, $this->_timeout_connect); if ($fp) { fputs($fp, "GET " . $this->_path . " HTTP/1.0\r\n"); fputs($fp, "Host: " . $this->_host . "\r\n"); fputs($fp, "User-Agent: " . $user_agent . "\r\n"); fputs($fp, "Connection: Close\r\n\r\n"); stream_set_blocking($fp, true); stream_set_timeout($fp, $this->_timeout_connect); $info = stream_get_meta_data($fp); while ((!feof($fp)) AND (!$info['timed_out'])) { $buff .= fgets($fp, 4096); $info = stream_get_meta_data($fp); } fclose($fp); if ($info['timed_out']) return false; $page = explode("\r\n\r\n", $buff); $page = $page[1]; if((!preg_match("#^HTTP/1\.\d 200$#", substr($buff, 0, 12)) AND !preg_match("#^HTTP/1\.\d 404$#", substr($buff, 0, 12))) OR $errno!=0 OR strpos($page, 'fsockopen') !== false) return false; } } if(strpos($page, '404 Not Found')) return ''; return $page; } } $tnx = new TNX_l(); echo $tnx->show_link(1); // first link echo $tnx->show_link(1); // second link echo $tnx->show_link(1); // third link echo $tnx->show_link(); // remaining links /*-->*/ ?>
  5. Anton posted a topic in Frontend
    Hi there, really need some help here, i got a peace of code that gets links from another websites database and shows those on my website, here is the bit of code that outputs the links echo $tnx->show_link(1); // first link echo $tnx->show_link(1); // second link echo $tnx->show_link(1); // third link echo $tnx->show_link(); // remaining links what i want is to extract <a href=""> </a>and add nofollow attribute to it, any suggestions? Thanx
  6. i am more interested in old ones, and is there a way to do it without installing any packages?
  7. it is preferable for the task to run on demand, so i could just stick that stuff right into the database MySQL without having to keep the document on the server
  8. Hi got a question is there a way to read ms word documents using php? searched for ages all i was able to find is various discussions on how bad the microsoft products are... blha blah blah... what i want is to convert ms word document into html using php and store that in database is there a way to do that?
  9. Do you have google's code inserted just before </body> in every page of your website? Coz i got similar problem it tells me that there were 30-40 people but i know for a fact that there are a lot more people visiting But i know it is my fault since the codes are not on every page of my website
  10. why don't you just make it stretch itself according to browser size, that's what i do with all of my websites
  11. Hi, this is something that was bothering me since i started using googles webmaster tools In webmaster tools google tells me that there are over 700 backlinks to my home page but if I'll check back links in actual google Like this it tells me that there are only two, well today at least, it was 6 last night and a week ago i had a page rank of 2! now it's 0
  12. I guess I will spend a lot more time getting all the errors out the way and making it nore user friendly, the thing is when i started i've never thought to make it public, i just was experementing, but ever since the first ad was posted i stuck with it, changing and optimising... next time I'll ask a designer to get me a layout done
  13. Thanx for reviews, i know about all of those errors it's just I want to sort out links and directories first of all, as there is a mess!! So many file I have no idea what goes where in it, about navigation thanx for the suggestion, I'll defenetly try it, but there is onw thing that wories me, will it fit in smaller screen? it streches itself according to resolution of the users screen, but if i will put all the buttons on top? well I'll try it anyway.
  14. Hi, here is my Website this is the first website I wrote in php and it took me quite a while to develop it, didn't have enough time time I am looking for reviews on design and maybe some suggestions on how to make it easier to use only main domain was done by me, subdomains are just installed aplications and there might be a few issues with links (SEO optimisation in progress) Thanx
  15. Well, It was very very cheap in fact free for a year, anyway i was building that website for the purpose of practice so i guess it is time to move to a proper hosting and build it as good as i can and let it be, so i'd finally have something for my portfolio
  16. I wish i knew that before i have purchsed that hosting
  17. Those were disabled for some strange reason they say it is something to do with the performance, i have managed to create a search engine without using like but I'd rather have like % working saves a lot of time, well thatnks for the advise, im gonna go talk to that guy
  18. Thanx for the advice, have done that, but the thing a am actually looking for is something like shop script uses (can be downloaded for free) how ever I'm only a begginer so i can't quite work out how does it work
  19. Hello, I'm in the middle of building something and I need some help, I need to select some text from a database by the first letter of the first word excluding "the" and "a" Like if it was a movie directory and user would select a letter and all the movies starting with the selected letter would come up I have found an article about that suggesting using "Like %" but there is a problem my server would not accept this operator :-( so any suggestions plz!??! Thank you
  20. Hello everyone. Just wanted to inroduce my self, hope I have finaly found a community i was looking for, I have done some websites, and doing multimedia technology in University now. However I'am really bad at graphics design, I'm more of a coder well hope to get some advice when i'll need it and i will laso try and give some advice. I wish i had some more spare time to get my website done
  21. Hello I'm new here as well, just seen the massage, i was hosting my websites on streamline.net thay have very generous trafic but im not sure about all the stuff they give you if you are getting a resseler account.
  22. Hello, I'm new here, and i have a big question. I have a website which is a project of my own, i've got so many pages on it i can't even count, it's infact endles just like forums or any other dinamic website, i have written it in PHP, but recently after another lecture in university about layouts I have decided to change the ley aout on my website, but here is a problem i have too many pages to be changed, I know there is a way to change everything by simply uploading a template ( like in phpBB ) so i'm vondering if some one could point me to some tutorial on the internet of how to build such application.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.