473,408 Members | 2,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

HTTP request.

Hi all, I'm trying to submit the google sitemap after it has been created on
my server with PHP.

Here is the code:
<?php $address= urlencode('www.mysite.com/sitemap.gz');?>

<form name="submitsitemap" method="POST"
action="http://www.google.com/webmasters/sitemaps/ping?sitemap=<?php echo
$address;?>"></form>
<script>submitsitemap.submit();</script>

The problem is that in the URL i've this:
http://www.mysite.com/www.google.com...sitemaps/ping?.........

The strange thing is that the result of the page is not a missing page but a
ok in a blank page, like everything worked fine....

Can somebody help ? Thanks

Bob

Oct 4 '06 #1
4 2793
Bob Bedford wrote on 04 okt 2006 in comp.lang.javascript:
Hi all, I'm trying to submit the google sitemap after it has been
created on my server with PHP.

Here is the code:
<?php $address= urlencode('www.mysite.com/sitemap.gz');?>

<form name="submitsitemap" method="POST"
action="http://www.google.com/webmasters/sitemaps/ping?sitemap=<?php
echo $address;?>"></form>
<script>submitsitemap.submit();</script>
submitsitemap this way is IE only.
The problem is that in the URL i've this:
http://www.mysite.com/www.google.com...sitemaps/ping?.........
I doubt that, but please get rid of the php crap,
and ask a javascript question.
The strange thing is that the result of the page is not a missing page
but a ok in a blank page, like everything worked fine....


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 4 '06 #2
HI Evertjan, thanks for replying.
><form name="submitsitemap" method="POST"
action="http://www.google.com/webmasters/sitemaps/ping?sitemap=<?php
echo $address;?>"></form>
<script>submitsitemap.submit();</script>

submitsitemap this way is IE only.
It's ok. I'll run it with a scheduler and I know it will be done with IE
>The problem is that in the URL i've this:
http://www.mysite.com/www.google.com...sitemaps/ping?.........

I doubt that, but please get rid of the php crap,
and ask a javascript question.
Doubt or not, it the result I've in the IE URL, and it's a javascript
question.
maybe:
<form name="submitsitemap" method="POST"
action="http://www.google.com/webmasters/sitemaps/ping?sitemap=www.mysite.com/sitemap.gz">
will be easier to read.

Anyway, why I've the www.mysite.com/www.google result ?

Bob

Oct 4 '06 #3
Bob Bedford wrote on 04 okt 2006 in comp.lang.javascript:
HI Evertjan, thanks for replying.
>><form name="submitsitemap" method="POST"
action="http://www.google.com/webmasters/sitemaps/ping?sitemap=<?php
echo $address;?>"></form>
<script>submitsitemap.submit();</script>

submitsitemap this way is IE only.
It's ok. I'll run it with a scheduler and I know it will be done with
IE
>>The problem is that in the URL i've this:
http://www.mysite.com/www.google.com...sitemaps/ping?.......
..

I doubt that, but please get rid of the php crap,
and ask a javascript question.
Doubt or not, it the result I've in the IE URL, and it's a javascript
question.
maybe:
<form name="submitsitemap" method="POST"
action="http://www.google.com/webmasters/sitemaps/ping?sitemap=www.mysi
te.com/sitemap.gz"will be easier to read.

Anyway, why I've the www.mysite.com/www.google result ?
I do not know, can you show a url that has this habit?

This:
=========
<form name="submitsitemap" method="POST"
action="http://www.google.com/webmasters/sitemaps/ping?
sitemap=www.mysite.com/sitemap.gz">
</form>
<script>submitsitemap.submit();</script>
=========
works fine overhere!!!

Why do you use a form submit? You do not sent post info.
Try this:

<script type='text/javascript'>
location.href = "http://www.google.com/webmasters/sitemaps/ping?
sitemap=www.mysite.com/sitemap.gz"
// in one line!!
</script>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Oct 4 '06 #4
<script type='text/javascript'>
location.href = "http://www.google.com/webmasters/sitemaps/ping?
sitemap=www.mysite.com/sitemap.gz"
// in one line!!
</script>
Hey Evertjan, works fine, thanks a lot !!!!

Have a nice day.

Oct 5 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
0
by: jacob c. | last post by:
When I request a URL using urllib2, it appears that urllib2 always makes the request using HTTP 1.0, and not HTTP 1.1. I'm trying to use the "If-None-Match"/"ETag" HTTP headers to conserve...
8
by: turnit \(removethis\) | last post by:
I have a login form that uses the post method to carry the information to the next page. The form works just fine in ie6.0, but fails in mozilla and fails in ie5.2 on a mac. "HTTP/1.1 400 Bad...
4
by: Justin Malloy | last post by:
I am using the System.Net.Webclient to try and download an XML file from a website but am receiving a HTTP protocol error when running the DownloadFile() sub routine. I did a HTTP trace using...
6
by: Microsoft News | last post by:
Hi, I have been using several http server code examples from the web, include one from msdn, and I can't seem to get a simple http server thread working. I can connect the server successful...
0
by: WIWA | last post by:
Hi, I want to login to a password protected website and fetch the content of the page behind. I have based my code on http://weblogs.asp.net/jdennany/archive/2005/04/23/403971.aspx. When I use...
3
by: Patrick Fogarty | last post by:
I am programming what is to be a web service client that will use an HTTP-POST to request and retrieve data. The remote server (written in java for what it's worth) requires basic authentication...
1
by: omantawy | last post by:
Hi, I have some legacy ASP web applications that use an unmanaged COM component to connect to a third party application. The third part application has moved to the managed code in the current...
2
by: MDANH2002 | last post by:
Hi From VB.NET I want to simulate the POST request of the following HTML form <html> <title>HTTP Post Testing</title> <body> <form action=http://www.example.com/postdata ...
3
by: =?Utf-8?B?U3ViYQ==?= | last post by:
Hi I having a similar issue. my website url has https://blahblahblah but when i do Response.Write(Request.Url); it writes the url with http..........its really strange........i dont have a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.