/    Sign up×
Community /Pin to ProfileBookmark

Working with CGI referer

Hi all, Merry Christmas.

I am using PHP on my domain. Now I need to get some data from another domain which is using CGI. Unluckly, the CGI domain have some referer check. So the people there do some code to allow my domain as a referer to go inside.

Now the problem is I am using SSI to include the cgi file. And the page always say I am invalid referer. So I do a test on html link by clicking the link to the cgi page and it WORKS!. Then I try to do a html refresh to that cgi page and FAILED.

Now I really crazy about this problem.. Can anyone tell me by cgi referer check only base on browser and link clicking? HTTP refresh, SSI include and Header redirect all does no work. My page do not request a click if not i will use html link.

Thanks to all.

kmf165

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@so_is_thisDec 25.2006 — The SSI [B]#include[/B] directive *only* works for files in the current web site.

There is absolutely *no* provision for cross-domain SSI inclusions of any sort --

at least, not in the Windows/IIS world. Can't speak for Linux/Apache. ?

Header redirect might work if you set your own referrer header, too.

Don't know -- haven't tried it.
Copy linkTweet thisAlerts:
@phpshift2Dec 25.2006 — A referer URL is only sent when a link is clicked or a form is submitted. You might want to try auto-submittiting an empty form to the page. That would redirect you and it would also send referer info.

<i>
</i>&lt;body onLoad="document.autoredir.submit(); "&gt;
&lt;form action="CGI PAGE URL HERE" method="post" name="autoredir"&gt;
&lt;/form&gt;
Copy linkTweet thisAlerts:
@kmf165authorDec 26.2006 — Thanks for all replies.

Ok phpshift2, I will your way. But still thining if it work for my environment here.

Actually, from my flash, I want to load some variable from external domain but since external domain have htaccess and referer control, and for flash, there is some crossdomain policy to take care, so I am using PHP to include external files and so flash will consider load variable from same domain (PHP file).

Before the referer check, everything ok. But now things like hell after implement the referer check. Any good suggestion on this?

Thanks

kmf165
×

Success!

Help @kmf165 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...