
MarPlo
Members-
Posts
80 -
Joined
-
Last visited
Everything posted by MarPlo
-
Hi, Is there any method to know which pages, links from sitemap are not indexed by google. For example, in webmaster tools it says 3200 links submited and 3125 indexed. I'm interesed to know which of sitemap links are not indexed, or which are indexed, if there is such method.
-
Hi You can use $_GET['name'] to get the value associated to 'name' from Url. Example: $post_data = '... <Message>'. $_GET['Name'] .'-'. $_GET[Age'] .'</Message> ...';
-
Best way to have unique links depending on variable?
MarPlo replied to iamLearning's topic in PHP Coding Help
Hi, To get the ID from URL ("file.php?page=video?id=1") use $_GET in file.php. Then make Select in mysql with that id. if(isset($_GET['id'])) { $id = (int) $_GET['id']; $sql = "SELECT * FROM table WHERE id=$id LIMIT 1"; // rest of code ... } -
HI Try use the mysql rand() function: SELECT * FROM `table` ORDER BY RAND() LIMIT 0,1;Or look on the net for "mysql random", you'll find some good solutions.
- 1 reply
-
- random image
- database
-
(and 2 more)
Tagged with:
-
Hi, Try this verion of ShowSymbols() function in your code: function ShowSymbols() { CreateSymbolPopup (); if(symbolPopup.style.display == 'block') symbolPopup.style.display = 'none'; else symbolPopup.style.display = 'block'; }
-
Hi, Try replace this line: $selected = ( date("n", $time)==(date("n")))? 'selected="selected"' : ""; With this: $selected = ( (date("n", $time)+1)==(date("n")))? 'selected="selected"' : "";
-
Hi, My opinion is that if "about-us" is a folder, it is better to add slash at the end. <a href="/about-us/"></a>
-
Hi, Welcome to this forum. It is a good place where to get answers about php issues, or to help others.
-
Hi, Add the <script> after the HTML that is accessed in the script. Because the code of the script is executed in the same moment when is loaded, and not see the html element wich is after it. <input type="text" id="text_input"> <script type="text/javascript"> document.getElementById( 'text_input' ).onkeyup = function() { // do stuff } </script> It is indicated to have the <script> before the closing </body>, where all the other html elements are loaded.
-
Hi You can save the info you want into a $_SESSION , then check if that session exists, and get its data. For the other info, select from database.
-
Hi, In the Facebook documentation about Login the user with Facebook APP they say: "Because it requires you to include your App Secret you should not attempt to make this call client-side as that would expose this secret to all your app users. It is important that your App Secret is never shared with anyone". I understend it is about APP Secret, but what about the Developer ID? The developer ID is added in the URL address of the window for login the user with Facebook: https://www.facebook.com/dialog/oauth?client_id=APP_ID&redirect_uri=...&state=...&scope=... The APP_ID can be copied and used by anyone. I tryed with Javascript SDK, and with PHP SDK, but in both cases the developer ID appears in the address bar. I tryed also the get and display the page from that URL address using cURL, but of course not works. Is there any way to login the users in my web site using Facebook, without revealing the developer ID? Or, it doesn't matter if someone uses your Facebook APP ID?
-
Hi, I changed the website URL from http://www to URL without "www", using also 301 redirect in htaccess. Now, all the +1 Google which was for the name with www disaperred. It is not such a big deal, but anyway; is there a solution to get the +1s votes from the old address with www to the address without "www"?
-
Hi, I found that Google introduced a new tool for Webmasters, "Disavow Links", that enables you to disavow links to your site. If you've been notified of a manual spam action based on "unnatural links" pointing to your site, this tool can help you address the issue. If you haven't gotten this notification, this tool generally isn't something you need to worry about." Google says its engineers have been beta testing the new feature for weeks now, although there have been rumors of the impending new addition for months. The tool is now live, and you can find it by logging into your Webmaster Tools account and navigating to https://www.google.com/webmasters/tools/disavow-links-main
-
Hi, Does changing the host too frequently affect the ranking of the web site in search engines. For example, if i change the hosting company 3 times in 2 months, does it affect the Page Rank? Because it is changing the server location, and also, each time the website cannot be accessed a few hours.
-
Hi, Does it matter the location of the hosting server? For example, if I have a wensite in english, but the hosting server is in Spain, and I want target users from UK, USA, Canada; is it better in search engines to use a server from these countries? Also, the search engines check the server location, or it matters in Page Rank?
-
Run different PHP versions on virtual hosts in apache 2.2
MarPlo replied to MarPlo's topic in Apache HTTP Server
If it is useful for someone, I found this example on the net: # Port-based virtual hosting: every php install uses a vhost on a different port Listen 8447 Listen 8423 ### BASE virtualhost ### set up the main php version we're using <VirtualHost *:80> LoadModule php5_module "E:/php5/php5apache2_2.dll" PHPIniDir "E:/php5" php_value extension_dir "E:/php5/ext/" AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps </VirtualHost> <VirtualHost *:8447> # it would be handy to use php_value directives, but CGI versions of php will not grok them, # so we rely on different php.ini SetEnv PHPRC "E:/php4/" ScriptAlias /php447/ "E:/php4/" Action application/x-httpd-php447 "/php447/php.exe" AddType application/x-httpd-php447 .php .inc # apache 2.2 denies access to the php cgi executable, unless it is explicitly granted <Directory "E:/php4/"> <Files "php.exe"> Allow from all </Files> </Directory> </VirtualHost> <VirtualHost *:8423> SetEnv PHPRC "E:/php423/" ScriptAlias /php423/ "E:/php423/" Action application/x-httpd-php423 "/php423/php.exe" AddType application/x-httpd-php423 .php .inc <Directory "E:/php423/"> <Files "php.exe"> Allow from all </Files> </Directory> </VirtualHost> -
Hi, You need Ajax to change the content into a page, without opening all page. Suggestion, look on the net for Ajax Course or tutorials.
-
Hi, I think it is about something like this: $tst = array(0=>array('val1','val2'), 1=>array('val3','val4')); $v1 = $tst[1][1]; $v2 = $tst[0][1];
-
How to Begin Coding Missing db.php database code
MarPlo replied to yshua's topic in Third Party Scripts
Hi Try replace the line: include("admin/includes/db.php"); With this code (edit with your connecton data): $conn = mysql_connect( "server_address", "username", "password") or die("Unable to connect to MySQL"); mysql_select_db("database_name"); if (mysql_error()) { echo "<br />". mysql_errno(). " : ". mysql_error(); } - Or, add it in "db.php". -
Hi, That DIIV should have position:absolute; and z-index:9990; set in CSS style.
-
Hy, Try add text-align:center; in "nav li", and "nav li a" in css.
-
Getting an error when going to the next line! HELP!
MarPlo replied to MrXortex's topic in PHP Coding Help
Hi Try use nl2br() to description before adding it in mysql: $description = mysql_real_escape_string(nl2br($_POST['info'])); -
Hi, Try this code: $url = 'www.youtube.com/watch?v=aHjpOzsQ9YI'; preg_match('/v=([a-z0-9]+)$/i', $url, $mc); echo $mc[1]; // aHjpOzsQ9YI
-
MySql query returns wrong result if run in a php code
MarPlo replied to ablazso's topic in MySQL Help
Hi, The problem can be because you pass "gu_id" as string in php (it is ... '$gu_id'...). Try without simple quotes, to be passed as number: WHERE gelt_users.gu_id =$gu_id