Archived discussions are read-only. Learn more about SAP Q&A

Running PHP-File in Background Task??

Hello!

I need some help. I have a php-filename ( http:
www.site.com\values.php?date=2009-10-21&value=1234
).

The data (date and value) I get from a SAP table. That means, I concatenate the script name in SAP.

Now I have to run this file (or script?) automatically in SAP (in background).

But I can't find a method to do this.

Kind Regards

Ramona

replied

Add host and proper path if you got error Message: Badly formed request - No path or hostname in request.

* replace site.com with your site (http:\\www.site.com -> site.com)
call method http_client->request->set_header_field 
 exporting name = 'HOST' 
           value = 'site.com:8080'.

* replace 'path' with a proper path or just /values.php
call method http_client->request->request->set_header_field
  exporting  name = '~request_uri'
	     value = '/path/values.php' .
 

Try to get the http trace from your php server to find out all the header fields the site expects.

example:

HEAD / HTTP/1.1

Host: google.com

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; InfoPath.2)

Referer: http://www.rexswain.com/httpview.html

Connection: close

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question