Calling Drupal URL from another server using php [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I am trying to call drupal 6 URL from my local system, that URL will generate a xml file.
My system does not have drupal intallation. I tried file_get_content("www.abc.com") but it does not write my xml file but when I try to run the url normally it runs and xml file gets generated.
Thanks in advance

You can use sockets or just file_get_contents, like
$homepage = file_get_contents('http://www.example.com/');
echo $homepage; // $homepage contains server response without headers

Related

Can I find what files are using when a website page is ran? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I just received a source from my customer (it's written by PHP Generally), I try to read it and glance at database. I realize that it's very mess, some webpage's content is also saved in database. So, I want to find files are using by browser and I mean that php files, I want to edit them. Can I do that?
P/S: I'm sorry if this article bother you
Hi At any point you need to know what functions, what includes and what arguments are being passed just use debug_print_backtrace() function in your code.
for further reading follow http://www.php.net/manual/en/function.debug-print-backtrace.php

Sitemap generator script for photos [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I'm working on a sitemap script but now I need to know how I can scan all my photo's since they are in different folders (I'm working with albums)
All my images that I want to get into the sitemap are in this directory: public_html/Albums/{Albumname}/{photo name}
How can I do this?
If the location in not remote then you can try the following:
<?php
$path = realpath('public_html/Albums');
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)) as $filename)
{
echo "$filename\n";
}
?>
You can generate the URL accordingly in the loop.

GPS Location Coordinaties in PHP [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
How can I write a code that gets the current location coordinates (LLA) in my web browser using PHP .
Is it possible by using GPS via HTTP or something like that ?
please help
Thanks
You will need to use the brower's geolocation API, for example as shown here.
Then, you simply pass the parameters to a PHP script using whatever method you like, a form, or a jQuery post.

Grab part of an URL in PHP [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have this link viewdocument.php?a=http%3A%2F%2Fwww.iesalfonsox.com%2Fimages%2FLIBROS_ESO_13-14.pdf in (for example) index.php and I want to put only the URL of the document of the link.
Example:
Link: http://www.myweb.com/viewdocument.php?a=some.pdf
On the HTML: You're viewing "Some.pdf".
Do you understand? Convert "viewdocument.php?a=some.pdf" to "some.pdf".
If this is the current URL being accessed on your site, Php provide globals and you can access it using the $_GET variable:
so for your example you will use this:
$file = $_GET['a']; // will return some.pdf
The other case will be for parsing a url from a string, for which php provides a function:
parse_url();
Follow the link to see examples

PHP new IMAP email notification + getting its contents (cron) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I need a PHP script that will check if I have new email and then it will throw it in my My SQL table with its date, from email and its content. I can use CRON for it. But I don't know how to get the emails. Thank you.
Reading emails can be done using PHP's IMAP functions. More info at PHP.net:
http://www.php.net/manual/en/function.imap-open.php

Categories