
andy1212
Members-
Posts
71 -
Joined
-
Last visited
Everything posted by andy1212
-
oh ok
-
Ok **** it's still there under sitelinks. When I search on google while i'm logged in to my gmail account, 404.php doesn't show up in sitelinks under the snippet, but when I log out and do the same search 404.php shows up under site links. How do I get it to not show up in site links under the snippet?
-
Thanks kicken and requinix for all your help!
-
Oh ok, then ya I tried searching the website on google and 404.php didn't show up under site links! so I guess it's working now.
-
This is what I have for the headers, Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection Keep-Alive Content-Type text/html Date Wed, 07 Aug 2013 01:40:02 GMT Expires Thu, 19 Nov 1981 08:52:00 GMT Host-Header 192fc2e7e50945beb8231a492d6a8024 Keep-Alive timeout=5, max=100 Pragma no-cache Server Apache Transfer-Encoding chunked
-
I checked safari and firefox for the networking area under the develop tools menu (safari) and web developer tools (firefox) and couldn't find it. What is the option I need to choose under Develop in Safari to view the header response. Thanks for your time!
-
Ok now I'm getting 3 soft 404 error in Google web masters. I added the line, header("HTTP/1.1 404 Not Found"); to the very top of the page too and change all <? tags to <?php so not sure what's going wrong there now.
-
Also how do I check to see if the right header is being outputed?
-
Ok thanks for the reply and advice!
-
Hey I marked as solved too soon, I'm still getting 0 soft 404 error when Google crawls my website. I have the following code for the 404.php page, <? include 'log.php'; include 'info/404.info.php'; include 'header2.php'; header("HTTP/1.1 404 Not Found"); ?> <div id="legal"> <div id="middle2"> <div id="leftcolumn"> <div id="contactus"> <div id="news" style="width: 550px; height: auto; float: left; text-align: left;"> <div style="margin-top: 30px; width: auto; height: auto; float: left;"> <span class="font3">Woops...</span><br /><br /> <span class="font15"> That page doesn't exist. Returning to the home page... </span> </div> </div> </div> </div> <div id="rightcolumn" style="text-align: left;"> <div style="float: left; text-align: left; width: 400px; height: auto;"> <span style="font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: bold; text-decoration: none; color: black;">Contact Us</span> <br /><br /> <? $id = '1'; $data = data7($id, 'street', 'city', 'phone', 'fax', 'email', 'url'); ?> <span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; text-decoration: none; color: black;"> <? echo stripslashes($data['street']);?><br /> <? echo stripslashes($data['city']); ?><br /><br /> <b>Telephone:</b> <a href="#" class="font15"><? echo stripslashes($data['phone']); ?></a><br /> <b>Fax:</b> <a href="#" class="font15"><? echo stripslashes($data['fax']); ?></a><br /> <b>Email:</b> <? echo stripslashes($data['email']); ?> </span> </div> <div style="float: left; text-align: left; width: 400px; height: auto; margin-top: 30px;"> <span style="font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: bold; text-decoration: none; color: black;">Hours of Operation</span> <br /><br /> <span style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; text-decoration: none; color: black;"> <? $id = '1'; $data2 = data6($id, 'monday1', 'sat1', 'sun1', 'monday2', 'sat2', 'sun2'); ?> <u>Spring & Summer Hours</u><br /><br /> Monday - Friday: <? echo stripslashes($data2['monday1']); ?><br /> Saturday: <? echo stripslashes($data2['sat1']); ?><br /> Sunday: <? echo stripslashes($data2['sun1']); ?> <br /><br /> <u>Fall & Winter Hours</u><br /><br /> Monday - Friday: <? echo stripslashes($data2['monday2']); ?><br /> Saturday: <? echo stripslashes($data2['sat2']); ?><br /> Sunday: <? echo stripslashes($data2['sun2']); ?> </span> </div> </div> </div> </div> <? include 'supplierlinks.php'; include 'footer.php'; header('refresh: 4; url=http://www.website.com'); exit(); ?> Thanks for your time and help
-
It's ok I figured it out, how do I delete this thread now
-
Hey, I'm using the Google structured data markup helper right now and trying to give structured data to the hours of operations listed on the home page. However, it shows this error, <meta id="_opens16" itemprop="opens" content="Please insert valid ISO 8601 date/time here. Examples: 2015-07-27 or 2015-07-27T15:30"> All I have is this, Monday - Friday: 9:00am - 5:00pm Saturday: 10:00am - 2:00pm Sunday: Closed and when I go to add an open and closed time, it say I need to provide the day, month and year, Opening hours Day of week: Monday - Friday Opening time: Day: required Month: required Year: required Time: 9:00am Closing time: Day: required Month: required Year: required Time: 5:00pm Day of week: Saturday Opening time: Day: required Month: required Year: required Time: 10:00am Closing time: Day: required Month: required Year: required Time: 2:00pm Day of week: Sunday Opening time: Closing time: Time: Closed Is there a way to just add the day and time since the hours of operation aren't based on the month or year at all. Thanks for your time!
-
Ok I added this line to the top of the page, header("HTTP/1.1 404 Not Found"); So would this solve the problem?
-
No I don't have that line on the page, should I have something like that there? It's just a page exactly like the other pages of the website with a message saying woops... wrong page and then I have a header which redirects the page to index.php
-
Hey, I created a custom 404.php page and have the following code in the .htaccess to direct any non-existent pages to the custom 4040 page, ErrorDocument 404 http://www.website.com/404.php So it works great but when I search the website on google, 404.php is listed under the sitelinks. So I searched Google and came across their advice for what to do with a custom 404 page showing up in search and how to make it not show up. So then I searched Google for "actual 404 https status code" where there is lots of information about how it should work, but couldn't find any information about how to implement it. I have the 404.php page demoted under the sitelinks section of Google Webmaster Tools and there is a 0 soft 404 error under crawl errors. But do I need to put a line of code in the .htaccess file to show that an actual 404 error is there when on 404.php page. Also, under Blocked URLs in webmaster tools there is this code, User-agent: * Crawl-delay: 10 on the robots.txt page and I'm not sure what that is. Thanks for your time and help in advance!
-
ok thanks!
-
so in the url bar of the browser window it shows, http://www.whatever.com/page.php?code=2 but I thought it would show something like, page.php?code=%&2&%
-
I'm trying to encode a url like this, $code = '2'; header('Location: http://www.whatever.com/page.php?='.urlencode($code).''); exit(); and then decoding it on the page.php page like this, $url = $_SERVER['REQUEST_URI']; $decodedurl = urldecode($url); $code = $_GET[$decodedurl]; echo $code; But when the header redirects to page.php, "2" doesn't get encoded, it just says "page.php?code=2" How can I get this to work? Thanks for your time.
-
I'm trying to parse xml I loaded onto the page by simplexml_load_file and I'm using the following code to try to do this, $resp = simplexml_load_file($request_url); $shipping = $resp->rate[15]['total_charge']; var_dump($shipping); However I get NULL. Here is what the xml looks like when var dumped from $resp. object(SimpleXMLElement)#1 (1) { ["rate"]=> object(SimpleXMLElement)#2 (1) { ["@attributes"]=> array(15) { ["weight"]=> string(3) "5.0" ["weight_unit"]=> string(2) "lb" ["zone"]=> string(1) "3" ["transit_time"]=> string(1) "1" ["transit_time_guaranteed"]=> string(5) "false" ["estimated_delivery_date"]=> string(10) "2013-07-31" ["base_charge"]=> string(5) "11.05" ["freight_charge"]=> string(5) "11.05" ["residential_address_charge"]=> string(4) "2.75" ["net_charge"]=> string(5) "13.80" ["fuel_surcharge_rate"]=> string(4) "17.3" ["fuel_surcharge"]=> string(4) "1.91" ["subtotal_charge"]=> string(5) "15.71" ["on_hst_charge"]=> string(4) "2.04" ["total_charge"]=> string(5) "17.75" } } } and I'm trying to put this guy, ["total_charge"]=>string(5) "17.75" into it's own variable in php called $shipping so I can echo it out as $17.75. Thanks for your time.
-
Nvm you were right, simplexml_load_file($request_url); worked! When echoing out it echoed out the xml!!! Finally I can move on to figure out how to parse it lol thanks so much!
-
I tried file_get_contents($request_url) and I don't know if it works or not because when I try echoing out $result, nothing is echoed. When I try var_dump($result) I get bool(false) so how do I know it's working... Shouldn't xml data be echoed?
-
would I use all three lines or just one or two of them. curl_setopt($curl, CURLOPT_CAINFO, '/home/ssl/certs/website.com.crt'); curl_setopt($curl, CURLOPT_SSLCERT, '/home/ssl/certs/website.com.crt'); curl_setopt($curl, CURLOPT_SSLKEY, '/home/ssl/certs/mykey.pem'); like do I have to give a path to the RSA key, CA bundle and SSL cert or just the SSL or just the CA bundle. There are a number of files I found on in the home/ssl/certs/ directory I found on the server and I'm not sure which ones to give paths to and where to put them in the code above. Some of the files have a .old.(a long number here) and I don't know if I should link to those because it says old, maybe those are the SSL files I had before I purchased this new SSL. I did Google the error message but couldn't find anyone that had a similar problem to what I'm trying to do.
-
ok ill try that and post back here with my results. thanks for the help
-
is this code setup right? // Get cURL resource $curl = curl_init(); // Set some options - we are passing in a useragent too here curl_setopt($curl, CURLOPT_URL, $request_url); curl_setopt($curl, CURLOPT_RETURNTRANSFER,1); curl_setopt($curl, CURLOPT_VERBOSE, 1); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($curl, CURLOPT_CAINFO, '/public_html/cert/ca.crt'); //(<--- path to CA bundle) curl_setopt($curl, CURLOPT_SSLCERT, '/public_html/cert/mycert.pem'); //(<--- path to SSL certificate) curl_setopt($curl, CURLOPT_SSLKEY, '/public_html/cert/mykey.pem'); //(<--- path to RSA key) curl_setopt($curl, CURLOPT_SSLCERTPASSWD, 'password'); // Send the request & save response to $resp $result = curl_exec($curl); echo curl_error($curl); // Close request to clear up some resources curl_close($curl); I keep getting this error when executing this code, unable to use client certificate (no key found or wrong pass phrase?)